additional work to setup hyprland
This commit is contained in:
Executable
+13
@@ -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
|
||||
Executable
+14
@@ -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
|
||||
Reference in New Issue
Block a user