diff --git a/.config/dconf/user b/.config/dconf/user index 01ef436..b51341a 100644 Binary files a/.config/dconf/user and b/.config/dconf/user differ diff --git a/.config/fish/functions/menu.fish b/.config/fish/functions/menu.fish new file mode 100644 index 0000000..089a532 --- /dev/null +++ b/.config/fish/functions/menu.fish @@ -0,0 +1,11 @@ +function menu --description 'Opens a menu of a list of Strings and writes the result to stdout' + argparse h/help -- $argv + or return + + if set -ql _flag_help + echo "menu [-h|--help] [STRING ...]" + return 0 + end + + string join -- \n $argv | fuzzel --dmenu -l (count $argv) || exit 0 +end diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index 8a8d8ca..c7cfd52 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -376,7 +376,8 @@ binds { Mod+M hotkey-overlay-title="Search mpd Library: fuzzel" { spawn-sh "musicmenu.fish"; } Mod+Shift+M hotkey-overlay-title="Browse mpd Playlist: fuzzel" { spawn-sh "playlistmenu.fish"; } - Mod+P hotkey-overlay-title="Browse mpd Playlist: fuzzel" { spawn-sh "powermenu.fish"; } + Mod+P hotkey-overlay-title="Show the Power menu: fuzzel" { spawn-sh "powermenu.fish"; } + Mod+A hotkey-overlay-title="Show the Action menu: fuzzel" { spawn-sh "actionmenu.fish"; } // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. // For example, this is a standard bind to toggle the screen reader (orca). diff --git a/.config/qutebrowser/autoconfig.yml b/.config/qutebrowser/autoconfig.yml index 80980b9..1bba316 100644 --- a/.config/qutebrowser/autoconfig.yml +++ b/.config/qutebrowser/autoconfig.yml @@ -24,6 +24,8 @@ settings: global: '#d5c4a1' colors.prompts.selected.bg: global: '#504945' + colors.prompts.selected.fg: + global: white colors.statusbar.private.fg: global: '#d3869b' colors.statusbar.progress.bg: diff --git a/.local/scripts/actionmenu.fish b/.local/scripts/actionmenu.fish new file mode 100755 index 0000000..3b46756 --- /dev/null +++ b/.local/scripts/actionmenu.fish @@ -0,0 +1,12 @@ +#!/usr/bin/env fish + +set options "󰐓 Clear Playlist" "󰌾 Lock" +set input (menu $options) + +switch $input + case $options[1] + mpc clear + + case $options[2] + exec swaylock +end diff --git a/.local/scripts/playlistmenu.fish b/.local/scripts/playlistmenu.fish index c873d3c..1522698 100755 --- a/.local/scripts/playlistmenu.fish +++ b/.local/scripts/playlistmenu.fish @@ -1,8 +1,6 @@ #!/usr/bin/env fish -set playlist (string split (mpc playlist)) -set input (mpc playlist | fuzzel -w 100 --dmenu || exit 0) +set playlist (string split \n (mpc playlist)) +set input (menu $playlist) -echo $input - -mpc play (math (contains -i $input $playlist) + 1) +mpc play (contains -i $input $playlist) diff --git a/.local/scripts/powermenu.fish b/.local/scripts/powermenu.fish index f2db3ab..a1789e1 100755 --- a/.local/scripts/powermenu.fish +++ b/.local/scripts/powermenu.fish @@ -1,23 +1,25 @@ #!/usr/bin/env fish +set input_options "󰤄 Suspend" "󰐥 Poweroff" "󰜉 Reboot" -set input (echo -e '󰤄 Suspend\n󰐥 Poweroff\n󰜉 Reboot' | fuzzel --dmenu -l 3 || exit 0) +set input (menu $input_options) -set check (echo -e 'Cancel\nProceed' | fuzzel --dmenu -l 2 || exit 0) +set check_options "Cancel" "Proceed" -if test $check = "Cancel" +set check (menu $check_options) + +if test $check = $check_options[1] exit 0 end -set option (string sub --start=3 $input) - -switch $option - case Suspend +switch $input + case $input_options[1] + swaylock -f systemctl suspend - case Poweroff + case $input_options[2] systemctl poweroff - case Reboot + case $input_options[2] systemctl reboot end