Turn screensaver binding into a full cmd menu

This commit is contained in:
David Heinemeier Hansson 2025-08-04 12:44:19 +02:00
parent d16c178eb4
commit 02043fa631
3 changed files with 35 additions and 11 deletions

30
bin/omarchy-menu-cmd Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
show_cmd_menu() {
local menu_options="󱄄 Start Screensaver
 Take Screenshot
 Start Screenrecord
󰃉 Pick color
󰍜 Toggle Top Bar
󱫖 Toggle Idle Lock
󰔎 Toggle Nightlight
󰸌 Pick Theme
 Next Background
 Show Keybindings"
local selection=$(echo -e "$menu_options" | walker --dmenu --theme dmenu_250)
case "$selection" in
*Screensaver*) ~/.local/share/omarchy/bin/omarchy-launch-screensaver ;;
*Screenshot*) ~/.local/share/omarchy/bin/omarchy-cmd-screenshot ;;
*Screenrecord*) ~/.local/share/omarchy/bin/omarchy-cmd-screenrecord ;;
*Color*) pkill hyprpicker || hyprpicker -a ;;
*Bar*) pkill -SIGUSR1 waybar ;;
*Idle*) ~/.local/share/omarchy/bin/omarchy-toggle-idle ;;
*Nightlight*) ~/.local/share/omarchy/bin/omarchy-toggle-nightlight ;;
*Theme*) ~/.local/share/omarchy/bin/omarchy-theme-menu ;;
*Background*) ~/.local/share/omarchy/bin/omarchy-theme-bg-next ;;
*Keybindings*) ~/.local/share/omarchy/bin/omarchy-menu-keybindings ;;
esac
}
show_cmd_menu

View File

@ -1,9 +1,7 @@
#!/bin/bash
show_power_menu() {
# The first characters are invisible sort keys.
local menu_options=" Lock
󱄄 Save
󰤄 Suspend
 Relaunch
󰜉 Restart
@ -12,7 +10,6 @@ show_power_menu() {
case "$selection" in
*Lock*) hyprlock ;;
*Save*) ~/.local/share/omarchy/bin/omarchy-launch-screensaver ;;
*Suspend*) systemctl suspend ;;
*Relaunch*) uwsm stop ;;
*Restart*) systemctl reboot ;;

View File

@ -1,5 +1,6 @@
# Launching
bindd = SUPER, space, Launch apps, exec, walker
bindd = SUPER, SPACE, Launch apps, exec, walker
bindd = SUPER ALT, SPACE, Launch commands, exec, ~/.local/share/omarchy/bin/omarchy-menu-cmd
bindd = SUPER, K, Show key bindings, exec, ~/.local/share/omarchy/bin/omarchy-menu-keybindings
# Aesthetics
@ -8,9 +9,9 @@ bindd = SUPER CTRL, SPACE, Next background in theme, exec, ~/.local/share/omarch
bindd = SUPER SHIFT CTRL, SPACE, Pick new theme, exec, ~/.local/share/omarchy/bin/omarchy-theme-menu
# Notifications
bindd = SUPER, comma, Dismiss last notification, exec, makoctl dismiss
bindd = SUPER SHIFT, comma, Dismiss all notifications, exec, makoctl dismiss --all
bindd = SUPER CTRL, comma, Toggle silencing notifications, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications"
bindd = SUPER, COMMA, Dismiss last notification, exec, makoctl dismiss
bindd = SUPER SHIFT, COMMA, Dismiss all notifications, exec, makoctl dismiss --all
bindd = SUPER CTRL, COMMA, Toggle silencing notifications, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications"
# Power menu controls lock, suspend, relaunch, restart, shutdown
bindd = SUPER, ESCAPE, Power menu, exec, ~/.local/share/omarchy/bin/omarchy-menu-power
@ -32,11 +33,7 @@ bindd = SHIFT, PRINT, Screenshot of window, exec, ~/.local/share/omarchy/bin/oma
bindd = CTRL, PRINT, Screenshot of display, exec, ~/.local/share/omarchy/bin/omarchy-cmd-screenshot output
# Screen recordings
bindd = ALT, PRINT, Screen record a region, exec, ~/.local/share/omarchy/bin/omarchy-cmd-screenrecord
bindd = CTRL ALT, PRINT, Screen record display, exec, ~/.local/share/omarchy/bin/omarchy-cmd-screenrecord output
# Screensaver
bindd = SUPER ALT, SPACE, Screensaver, exec, ~/.local/share/omarchy/bin/omarchy-launch-screensaver
# Color picker
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a