diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-18 11:44:56 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-18 11:44:56 +0200 |
| commit | 97a5fc27e011c024393c3b1610f044f3c751bd91 (patch) | |
| tree | b4167224de53db10c2d44abcffbc48c303e42171 /bin/udt-powermenu.sh | |
| parent | 140e0f906a9e8566b26267d84eb0aa1a7e2f0d94 (diff) | |
| download | unified-desktop-theme-97a5fc27e011c024393c3b1610f044f3c751bd91.tar.gz unified-desktop-theme-97a5fc27e011c024393c3b1610f044f3c751bd91.zip | |
feat(rofi): shared wallpaper header for the searchable layouts
The ssh menu's banner, title plate and plated search bar move into
header.rasi, which ssh.rasi, list.rasi and grid.rasi import, so every
searchable menu gets the same header with its -p as the title. The
banner's @WPAPER@ now lives in header.rasi, so that file is generated
and ssh.rasi is linked again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bin/udt-powermenu.sh')
| -rwxr-xr-x | bin/udt-powermenu.sh | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/bin/udt-powermenu.sh b/bin/udt-powermenu.sh deleted file mode 100755 index 6d8fb84..0000000 --- a/bin/udt-powermenu.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env bash - -## Author : Aditya Shakya (adi1090x) -## Github : @adi1090x -## Derived from adi1090x/rofi, GPL-3.0 like upstream. Modifications -## Copyright (C) 2026 Danilo M. <danix@danix.xyz> -# -## Rofi : Power Menu -# -## Available Styles -# -## style-1 style-2 style-3 style-4 style-5 - -# Current Theme -dir="$HOME/.config/rofi/udt" -theme='powermenu' - -# CMDs -uptime="`uptime -p | sed -e 's/up //g'`" -host=`hostname` - -# Options -shutdown='' -reboot='' -logout='' -sleep='' -yes='' -no='' - -# Rofi CMD -rofi_cmd() { - rofi -dmenu \ - -p "'ndi vidimu ${USER}" \ - -mesg "Uptime: $uptime" \ - -theme ${dir}/${theme}.rasi -} - -# Confirmation CMD -confirm_cmd() { - rofi -dmenu \ - -p 'Confirmation' \ - -selected-row 1 \ - -mesg 'Simu Sicuri?' \ - -theme "$HOME/.config/rofi/udt/confirm.rasi" -} - -# Ask for confirmation -confirm_exit() { - echo -e "$yes\n$no" | confirm_cmd -} - -# Pass variables to rofi dmenu -run_rofi() { - echo -e "$shutdown\n$reboot\n$sleep\n$logout" | rofi_cmd -} - -# Execute Command -run_cmd() { - selected="$(confirm_exit)" - if [[ "$selected" == "$yes" ]]; then - if [[ $1 == '--shutdown' ]]; then - notify-send 'system shutdown' 'the system is going to shutdown now' - sleep 1 - /usr/bin/loginctl poweroff - elif [[ $1 == '--reboot' ]]; then - notify-send 'system reboot' 'the system is going to reboot now' - sleep 1 - /usr/bin/loginctl reboot - elif [[ $1 == '--sleep' ]]; then - notify-send 'suspend to ram' 'the system is going to sleep now' - sleep 1 - /usr/bin/loginctl suspend - elif [[ $1 == '--logout' ]]; then - hyprctl dispatch 'hl.dsp.exit()' - fi - else - exit 0 - fi -} - -# Actions -chosen="$(run_rofi)" -case ${chosen} in - $shutdown) - run_cmd --shutdown - ;; - $reboot) - run_cmd --reboot - ;; - $sleep) - run_cmd --sleep - ;; - $logout) - run_cmd --logout - ;; -esac |
