From ae439adcc43e0dfd608001b5696dbcc23ba7ee11 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 20 Oct 2025 18:01:15 +0200 Subject: [PATCH] Add various elephant menus --- home/.config/elephant/menus/hyprland.toml | 18 +++++++ home/.config/elephant/menus/power.toml | 40 +++++++++++++++ home/.config/elephant/menus/screenshots.toml | 53 ++++++++++++++++++++ home/.config/elephant/menus/system.toml | 46 +++++++++++++++++ home/.config/hypr/hyprland.d/keybinds.conf | 3 +- 5 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 home/.config/elephant/menus/hyprland.toml create mode 100644 home/.config/elephant/menus/power.toml create mode 100644 home/.config/elephant/menus/screenshots.toml create mode 100644 home/.config/elephant/menus/system.toml diff --git a/home/.config/elephant/menus/hyprland.toml b/home/.config/elephant/menus/hyprland.toml new file mode 100644 index 0000000..198189c --- /dev/null +++ b/home/.config/elephant/menus/hyprland.toml @@ -0,0 +1,18 @@ +name = "hyprland" +name_pretty = "Hyprland" +icon = "applications-other" + +[[entries]] +text = "Stop hyprsunset" +icon = "weather-clear" +actions = { "" = "hyprctl hyprsunset identity" } + +[[entries]] +text = "Start hyprsunset" +icon = "weather-clear-night" +actions = { "" = "hyprctl hyprsunset temperature 2700" } + +[[entries]] +text = "Zoom Toggle" +icon = "zoom-in" +actions = { "" = "hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float) | if . > 1 then 1 else 1.5 end')" } diff --git a/home/.config/elephant/menus/power.toml b/home/.config/elephant/menus/power.toml new file mode 100644 index 0000000..f910d2b --- /dev/null +++ b/home/.config/elephant/menus/power.toml @@ -0,0 +1,40 @@ +name = "power" +name_pretty = "Power" +global_search = true +fixed_order = true +icon = "system-shutdown" + +[[entries]] +icon = "system-lock-screen" +text = "Lock" +actions = { "lock" = "loginctl lock-session" } + +[[entries]] +icon = "system-suspend" +text = "Suspend" +actions = { "suspend" = "systemctl suspend" } + +[[entries]] +icon = "system-hibernate" +text = "Hibernate" +actions = { "hibernate" = "systemctl hibernate" } + +[[entries]] +icon = "system-log-out" +text = "Log out" +actions = { "logout" = "loginctl terminate-user" } + +[[entries]] +icon = "system-reboot" +text = "Soft Reboot" +actions = { "soft_reboot" = "systemctl soft-reboot" } + +[[entries]] +icon = "system-reboot" +text = "Restart" +actions = { "restart" = "systemctl reboot" } + +[[entries]] +icon = "system-shutdown" +text = "Shutdown" +actions = { "shutdown" = "systemctl poweroff" } diff --git a/home/.config/elephant/menus/screenshots.toml b/home/.config/elephant/menus/screenshots.toml new file mode 100644 index 0000000..029ac6c --- /dev/null +++ b/home/.config/elephant/menus/screenshots.toml @@ -0,0 +1,53 @@ +name = "screenshots" +name_pretty = "Screenshots" +global_search = true +fixed_order = true +icon = "insert-image" + +[[entries]] +text = "OCR" +icon = "edit-select-text" +keywords = ["ocr", "text", "reader", "optical", "character", "recognition"] +actions = { "run" = "sleep 0.5 && ocr && notify-send 'OCR' 'Text copied to clipboard'" } + +[[entries]] +text = "Color Picker" +icon = "color-picker" +keywords = ["color", "picker", "hypr"] +actions = { "cp_use" = "sleep 0.5 && wl-copy --type image/png \"$(hyprpicker)\" && notify-send 'Picked color' \"$(wl-paste) (saved to clipboard)\"" } + +[[entries]] +text = "Area" +icon = "edit-paste" + +[entries.actions] +"to_clipboard" = "hyprland-screenshot --notify --target area --copy" +"to_file" = "hyprland-screenshot --notify --target area --save ~/Media/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png" +"to_swappy" = "hyprland-screenshot --notify --target area --copy --edit" + +[[entries]] +text = "Window" +icon = "window-new" + +[entries.actions] +"to_clipboard" = "hyprland-screenshot --notify --target window --copy" +"to_file" = "hyprland-screenshot --notify --target window --save ~/Media/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png" +"to_swappy" = "hyprland-screenshot --notify --target window --copy --edit" + +[[entries]] +text = "Current monitor" +icon = "video-display" + +[entries.actions] +"to_clipboard" = "hyprshot --notify --target activemon --copy" +"to_file" = "hyprland-screenshot --notify --target activemon --save ~/Media/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png" +"to_swappy" = "hyprland-screenshot --notify --target activemon --copy --edit" + +[[entries]] +text = "Fullscreen" +icon = "view-fullscreen" + +[entries.actions] +"to_clipboard" = "hyprshot --notify --target all --copy" +"to_file" = "hyprland-screenshot --notify --target all --save ~/Media/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H-%M-%S).png" +"to_swappy" = "hyprland-screenshot --notify --target all --copy --edit" diff --git a/home/.config/elephant/menus/system.toml b/home/.config/elephant/menus/system.toml new file mode 100644 index 0000000..b06c1f9 --- /dev/null +++ b/home/.config/elephant/menus/system.toml @@ -0,0 +1,46 @@ +name = "system" +name_pretty = "System" +icon = "applications-other" + +[[entries]] +keywords = ["disk", "drive", "space"] +text = "Disk" +actions = { "disk_copy" = "wl-copy '%VALUE%'" } +async = """echo $(df -h / | tail -1 | awk '{print "Used: " $3 " - Available: " $4 " - Total: " $2}')""" +icon = "drive-harddisk" + +[[entries]] +text = "System" +async = """echo $(echo "Memory: $(free -h | awk '/^Mem:/ {printf "%s/%s", $3, $2}') | CPU: $(top -bn1 | grep 'Cpu(s)' | awk '{printf "%.1f%%", 100 - $8}')")""" +icon = "computer" + +[[entries]] +text = "Today" +keywords = ["date", "today", "calendar"] +async = """echo $(date "+%H:%M - %d.%m. %A - KW %V")""" +icon = "clock" +actions = { "open_cal" = "xdg-open https://calendar.google.com" } + +[[entries]] +text = "Volume" +async = "echo $(wpctl get-volume @DEFAULT_AUDIO_SINK@)" +icon = "audio-volume-high" + +[entries.actions] +"volume_raise" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+" +"volume_lower" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-" +"volume_mute" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0" +"volume_unmute" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1" +"volume_set" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ %VALUE%" + +[[entries]] +text = "Mic" +async = "echo $(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)" +icon = "audio-input-microphone" +actions = { "mic_set" = "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ %VALUE%" } + +[[entries]] +text = "uuctl" +keywords = ["uuctl"] +icon = "applications-system" +submenu = "dmenu:uuctl" diff --git a/home/.config/hypr/hyprland.d/keybinds.conf b/home/.config/hypr/hyprland.d/keybinds.conf index 6356a53..e201e58 100644 --- a/home/.config/hypr/hyprland.d/keybinds.conf +++ b/home/.config/hypr/hyprland.d/keybinds.conf @@ -99,8 +99,7 @@ bind = CTRL, $PRINTSCR_KEY, exec, hyprland-screenshot --notify --copy --target a bind = SUPER SHIFT, $PRINTSCR_KEY, exec, hyprland-screenshot --notify --save $SCREENSHOT_FORMAT --target area --edit bind = SUPER CTRL, $PRINTSCR_KEY, exec, hyprland-screenshot --notify --copy --target area --delay $SCREENSHOT_DELAY --edit bind = SUPER SHIFT CTRL, $PRINTSCR_KEY, exec, hyprland-screenshot --notify --save $SCREENSHOT_FORMAT --target area --delay $SCREENSHOT_DELAY --edit -bind = SUPER ALT, $PRINTSCR_KEY, exec, ocr && notify-send "OCR" "Text copied to clipboard" -bind = ALT, $PRINTSCR_KEY, exec, wl-copy --type image/png "$(hyprpicker)" && notify-send 'Picked color' "$(wl-paste) (saved to clipboard)" +bind = ALT, $PRINTSCR_KEY, exec, walker -m "menus:screenshots" # XF86Favorites key for recording # (don't question me, I had it free)