diff --git a/awesome/bling b/awesome/bling index 0fb8534..048cf41 160000 --- a/awesome/bling +++ b/awesome/bling @@ -1 +1 @@ -Subproject commit 0fb85341916b6de1c5cd6ddf3e8472292a93a303 +Subproject commit 048cf41e0aa5a391948d62e6168d6e54279cf627 diff --git a/awesome/init.fnl b/awesome/init.fnl index 31bbee9..bef3278 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -8,7 +8,7 @@ (local beautiful (require "beautiful")) (local xresources (require "beautiful.xresources")) ;; Notification library -(local naughty (require "naughty")) +;; (local naughty (require "naughty")) (local menubar (require "menubar")) ;; Enable hotkeys help widget for VIM and other apps ;; when client with a matching name is opened: @@ -20,27 +20,27 @@ ;; my splits (local clientrules (require "rules")) (local keybindings (require "keybindings")) -(local notifications (require "notifications")) +;; (local notifications (require "notifications")) ;; Error handling ;; Check if awesome encountered an error during startup and fall back to ;; another config (This code will only ever execute for the fallback config) -(when awesome.startup_errors - (naughty.notify {:preset naughty.config.presets.critical - :title "Oops, there were errors during startup!" - :text awesome.startup_errors})) +;; (when awesome.startup_errors +;; (naughty.notify {:preset naughty.config.presets.critical +;; :title "Oops, there were errors during startup!" +;; :text awesome.startup_errors})) ;; Handle runtime errors after startup -(do - (var in_error false) - (awesome.connect_signal "debug::error" (fn [err] - ;; Make sure we don't go into an endless error loop - (when (not in_error) - (set in_error true) - (naughty.notify {:preset naughty.config.presets.critical - :title "Oops, an error happened!" - :text (tostring err)}) - (set in_error false))))) +;; (do +;; (var in_error false) +;; (awesome.connect_signal "debug::error" (fn [err] +;; ;; Make sure we don't go into an endless error loop +;; (when (not in_error) +;; (set in_error true) +;; (naughty.notify {:preset naughty.config.presets.critical +;; :title "Oops, an error happened!" +;; :text (tostring err)}) +;; (set in_error false))))) @@ -616,18 +616,18 @@ ;; Rules (ruled.client.append_rules clientrules) -(ruled.notification.connect_signal - "request::rules" - (fn [] - (ruled.notification.append_rules notifications - ;; { - ;; :rule { } - ;; :properties { - ;; :border-width 0 - ;; :border_color "#000000" - ;; :opacity 0.9 - ;; :shape gears.shape.rounded_rect}} - ))) +;; (ruled.notification.connect_signal +;; "request::rules" +;; (fn [] +;; (ruled.notification.append_rules notifications +;; ;; { +;; ;; :rule { } +;; ;; :properties { +;; ;; :border-width 0 +;; ;; :border_color "#000000" +;; ;; :opacity 0.9 +;; ;; :shape gears.shape.rounded_rect}} +;; ))) ;; Signals ;; Signal function to execute when a new client appears. @@ -688,14 +688,15 @@ (awful.screen.focus 1) -(awful.spawn "picom --experimental-backend") -(awful.spawn "/usr/lib/polkit-kde-authentication-agent-1") -(awful.spawn "feh --bg-fill /usr/share/wallpapers/Flow/contents/images/5120x2880.jpg") -(awful.spawn "caffeine") -(awful.spawn "bluetoothctl power on") -(awful.spawn "nextcloud --background") -(awful.spawn "rbw-agent") -(awful.spawn "jellyfin-mpv-shim") -(awful.spawn "xset r rate 220 90") - -(awful.spawn "autorandr -c") +(awful.spawn.once "picom --experimental-backend") +(awful.spawn.once "/usr/lib/polkit-kde-authentication-agent-1") +(awful.spawn.once "feh --bg-fill /usr/share/wallpapers/Flow/contents/images/5120x2880.jpg") +(awful.spawn.once "caffeine") +(awful.spawn.once "bluetoothctl power on") +(awful.spawn.once "nextcloud --background") +(awful.spawn.once "rbw-agent") +(awful.spawn.once "jellyfin-mpv-shim") +(awful.spawn.once "xset r rate 220 90") +(awful.spawn.once "autorandr -c") +(awful.spawn.once "xcape -e 'Super_L=Super_L|Control_L|Escape'") +(awful.spawn.once "latte-dock") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 9267845..bb45486 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -176,6 +176,8 @@ ;; rofi (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) {:description "launch rofi" :group "launcher"}) + (awful.key [modkey ctrl] "Escape" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) + {:description "launch rofi" :group "launcher"}) (awful.key [modkey] "space" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) {:description "launch rofi" :group "launcher"}) (awful.key [modkey] "w" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/windows.sh")) diff --git a/eww/eww.yuck b/eww/eww.yuck index 9fa69e8..50483ff 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -1,12 +1,23 @@ (defwindow example :monitor 0 :geometry (geometry :x "0%" - :y "20px" - :width "90%" - :height "30px" + :y "80px" + :width "20%" + :height "60px" :anchor "top center") :stacking "fg" - :reserve (struts :distance "40px" :side "top") - :windowtype "dock" - :wm-ignore false - "example content") + :windowtype "dialog" + :wm-ignore true + volslider) + +(deflisten volume + :initial "getvol" + 'tail -F /tmp/vol') + +(defwidget volslider [] + (box :orientation "horizontal" + :halign "center" + volume + (scale :value volume + :min 0 + :max 100))) diff --git a/lolcate/default/config.toml b/lolcate/default/config.toml index ffd659d..c0ea731 100644 --- a/lolcate/default/config.toml +++ b/lolcate/default/config.toml @@ -4,6 +4,7 @@ description = "" # Directories to index. dirs = [ "~/dotfiles", + "~/.dotfiles", "~/org", "~/Downloads", "~/Documents", @@ -14,6 +15,8 @@ dirs = [ "~/nextcloud", "~/.dotemacs", "~/.emacs.d", + "~/storage/tfc", + "~/storage/nextcloud", ] Dirs = [ diff --git a/nyxt/init.lisp b/nyxt/init.lisp index 93ebd16..103d015 100644 --- a/nyxt/init.lisp +++ b/nyxt/init.lisp @@ -21,11 +21,13 @@ ((session-restore-prompt :always-restore))) (define-configuration (prompt-buffer) - ((default-modes (append '(vi-insert-mode - ) %slot-default%)))) + ((default-modes + (append + '(vi-insert-mode) + %slot-default%)))) (define-configuration browser - ((external-editor-program '("/usr/bin/emacsclient")))) + ((external-editor-program '("/usr/bin/emacsclient")))) ;; Create a function to launch mpv with given url (defun mpv (url) @@ -34,32 +36,37 @@ ;; Create a function to download videos with youtube-dl in alacritty (defun youtube-dl (url) - "Download videos and audio with youtube-dl in alacritty for feedback" - (uiop:run-program (list "alacritty" "-e" "youtube-dl" "-o ~/Videos/%(title)s.%(ext)s" url))) + "Download videos and audio with youtube-dl in alacritty for feedback" + (uiop:run-program + (list "alacritty" "-e" "youtube-dl" "-o ~/Videos/%(title)s.%(ext)s" url))) ;; Let's create a function to hint videos, convert the url to a sting, and play them in MPV (define-command hint-mpv (&key nyxt/web-mode::annotate-visible-only-p) - "Show a set of element hints, and copy the URL of the user inputted one." + "Show a set of element hints, and copy the URL of the user inputted one." (nyxt/web-mode:query-hints "Copy element URL" (lambda (nyxt/web-mode::result) - ;; this converts the url to a string to be used in mpv - (let* ((url (format nil "~a" - (url (first nyxt/web-mode::result))))) - ;; here we take that string and pipe it into mpv - (mpv url))) + ;; this converts the url to a string to be used in mpv + (let* + ((url + (format nil "~a" + (url (first nyxt/web-mode::result))))) + ;; here we take that string and pipe it into mpv + (mpv url))) :annotate-visible-only-p nyxt/web-mode::annotate-visible-only-p)) ;; Let's create a function to hint videos, convert the url to a sting, and download with ytdl (define-command hint-ytdl (&key nyxt/web-mode::annotate-visible-only-p) - "Show a set of element hints, and copy the URL of the user inputted one." + "Show a set of element hints, and copy the URL of the user inputted one." (nyxt/web-mode:query-hints "Copy element URL" (lambda (nyxt/web-mode::result) - ;; this converts the url to a string to be used in mpv - (let* ((url (format nil "~a" - (url (first nyxt/web-mode::result))))) - ;; here we take that string and pipe it into mpv - (youtube-dl url))) + ;; this converts the url to a string to be used in mpv + (let* + ((url + (format nil "~a" + (url (first nyxt/web-mode::result))))) + ;; here we take that string and pipe it into mpv + (youtube-dl url))) :annotate-visible-only-p nyxt/web-mode::annotate-visible-only-p)) @@ -79,17 +86,20 @@ (define-mode chris-mode () "Dummy mode for the custom key bindings in `*chris-keymap*'." - ((keymap-scheme (keymap:make-scheme - scheme:vi-normal *chris-keymap*)) + ((keymap-scheme + (keymap:make-scheme + scheme:vi-normal *chris-keymap*)) (visible-in-status-p nil))) (define-configuration buffer - ((default-modes (append '(vi-normal-mode - auto-mode - reduce-tracking-mode - force-https-mode - chris-mode) - %slot-default%)))) + ((default-modes + (append + '(vi-normal-mode + auto-mode + reduce-tracking-mode + force-https-mode + chris-mode) + %slot-default%)))) (define-configuration buffer ((search-engines diff --git a/rofi/config.rasi b/rofi/config.rasi index 9b20b5e..b75cdd5 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -13,6 +13,14 @@ configuration { threads: 0; scroll-method: 0; disable-history: false; + kb-accept-entry: "Return"; + kb-remove-to-eol: "Control-D"; + kb-remove-char-back: "BackSpace"; + kb-mode-complete: "Control-M"; + kb-row-down: "Control-j"; + kb-row-up: "Control-k"; + kb-row-left: "Control-h"; + kb-row-right: "Control-l"; } * { diff --git a/rofi/launchers-git/emoji.sh b/rofi/launchers-git/emoji.sh index 3af81d9..e29ef14 100755 --- a/rofi/launchers-git/emoji.sh +++ b/rofi/launchers-git/emoji.sh @@ -8,4 +8,11 @@ else #echo "this is not hidpi" fi -rofi -no-lazy-grab -show emoji -modi emoji -theme launchers-git/"$style".rasi +rofi -no-lazy-grab -show emoji -modi emoji -theme launchers-git/"$style".rasi $@ & +c=0 +while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +done + diff --git a/rofi/launchers-git/launcher.sh b/rofi/launchers-git/launcher.sh index c0649bd..249226b 100755 --- a/rofi/launchers-git/launcher.sh +++ b/rofi/launchers-git/launcher.sh @@ -8,4 +8,10 @@ else #echo "this is not hidpi" fi -rofi -no-lazy-grab -show drun -modi drun -theme launchers-git/"$style".rasi +rofi -no-lazy-grab -show drun -modi drun -theme launchers-git/"$style".rasi $@ & +c=0 +while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +done diff --git a/rofi/launchers-git/run.sh b/rofi/launchers-git/run.sh index 8bdf8f8..1dfd9c7 100755 --- a/rofi/launchers-git/run.sh +++ b/rofi/launchers-git/run.sh @@ -8,4 +8,10 @@ else #echo "this is not hidpi" fi -rofi -no-lazy-grab -show run -modi run -theme launchers-git/"$style".rasi +rofi -no-lazy-grab -show run -modi run -theme launchers-git/"$style".rasi $@ & +c=0 +while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +done diff --git a/scripts/filesearch b/scripts/filesearch index 6340454..8378019 100755 --- a/scripts/filesearch +++ b/scripts/filesearch @@ -7,4 +7,10 @@ else #echo "this is not hidpi" fi -lolcate | rofi -dmenu -p "File Search:" -i -matching regex -theme ~/.config/rofi/launchers-git/$style-rbw.rasi | xargs -r0 xdg-open +lolcate | rofi -dmenu -p "File Search:" -i -matching regex -theme ~/.config/rofi/launchers-git/$style-rbw.rasi | xargs -r0 xdg-open $@ & +c=0 +while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +done diff --git a/scripts/getvol b/scripts/getvol new file mode 100755 index 0000000..e1d5718 --- /dev/null +++ b/scripts/getvol @@ -0,0 +1,4 @@ +#!/bin/sh + +echo $(pamixer --get-volume-human) >> /tmp/vol + diff --git a/scripts/plasma-startup.sh b/scripts/plasma-startup.sh index d726797..d3a79ac 100755 --- a/scripts/plasma-startup.sh +++ b/scripts/plasma-startup.sh @@ -2,6 +2,7 @@ exec ydotoold & exec libinput-gestures-setup start service & +exec xcape -e 'Super_L=Super_L|Control_L|Escape' sleep 2 diff --git a/scripts/qblof b/scripts/qblof index d2369e0..4ba3c76 100755 --- a/scripts/qblof +++ b/scripts/qblof @@ -1,7 +1,7 @@ #!/bin/sh # Check to see if firefox is running -if [ $(pgrep -c qutebrowser) -gt 0 ]; then +if pgrep -x qutebrowser > /dev/null; then if [ $XDG_SESSION_TYPE = "x11" ]; then #X11 diff --git a/scripts/rofi-plasma-blur.sh b/scripts/rofi-plasma-blur.sh new file mode 100755 index 0000000..d67760c --- /dev/null +++ b/scripts/rofi-plasma-blur.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ $(ps --no-header -p $PPID -o comm) =~ '^yakuake|dolphin$' ]]; then + for wid in $(xdotool search --pid $PPID); do + xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $wid; + done +fi diff --git a/scripts/rofi-plasma-settings.sh b/scripts/rofi-plasma-settings.sh new file mode 100755 index 0000000..8b7a413 --- /dev/null +++ b/scripts/rofi-plasma-settings.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +systemsettings5 --list | rg - | awk '{print $1}' | rofi -dmenu | xargs -r systemsettings5 diff --git a/scripts/rofi-rbw b/scripts/rofi-rbw index 922a83f..bf32613 100755 --- a/scripts/rofi-rbw +++ b/scripts/rofi-rbw @@ -24,7 +24,15 @@ list_passwords() { passwords=$(rbw list) prompt='search for passwords...' -SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi) +SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi $@ & + c=0 + while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds + done + + ) # Ask whether pass, user or both are required @@ -34,7 +42,15 @@ options=("Password" \ "QR-Code" \ "OTP") -option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi) +option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="..." -theme ~/.config/rofi/launchers-git/$style.rasi $@ & + c=0 + while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds + done + + ) echo $option diff --git a/scripts/rofiblur.sh b/scripts/rofiblur.sh new file mode 100644 index 0000000..784001a --- /dev/null +++ b/scripts/rofiblur.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Wrapper to run rofi with blurred background + +/usr/bin/rofi -theme $HOME/.config/rofi/config.rasi $@ & +c=0 +while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +done