additional work to setup hyprland

This commit is contained in:
2026-08-14 21:27:58 -06:00
parent 2b7b18c66d
commit 6e1ed76eed
13 changed files with 149 additions and 20 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Open btop fullscreen in a ghostty window; focus it if it is already open.
# Intended as the on-click action for the waybar cpu/memory modules.
set -uo pipefail
if hyprctl clients -j 2>/dev/null | jq -e 'any(.[]; ((.title // "") + " " + (.class // "")) | ascii_downcase | contains("btop"))' >/dev/null 2>&1; then
hyprctl dispatch 'hl.dsp.focus({ window = "title:btop" })' 2>/dev/null || true
exit 0
fi
ghostty -e btop &
sleep 0.5
hyprctl dispatch 'hl.dsp.window.fullscreen({ action = "set" })' 2>/dev/null || true
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# sudo-askpass: GUI password prompt for sudo via $SUDO_ASKPASS.
#
# sudo calls the program pointed to by $SUDO_ASKPASS when it cannot prompt on a
# terminal (or with `sudo -A`) and reads the password from its stdout. zenity's
# --password dialog does exactly that. If the dialog is cancelled or times out
# zenity exits non-zero and sudo aborts.
set -uo pipefail
exec zenity --title="sudo authentication" \
--password \
--text="Enter password for $(id -un):" \
--timeout=120 2>/dev/null