mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
Migrate nymph desktop to SwayFX and Noctalia
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
case "${XDG_CURRENT_DESKTOP:-}" in
|
||||
*sway*|*Sway*)
|
||||
exec swaylock -f \
|
||||
--color 000000ff \
|
||||
--inside-color 1f1f28ff \
|
||||
--ring-color 2f4058ff \
|
||||
--separator-color 3a3a46ff \
|
||||
--line-color 00000000 \
|
||||
--key-hl-color 6daeeaff \
|
||||
--bs-hl-color c7162bff \
|
||||
--inside-ver-color 1f1f28ff \
|
||||
--inside-wrong-color 1f1f28ff \
|
||||
--ring-ver-color 4a90d9ff \
|
||||
--ring-wrong-color c7162bff \
|
||||
--text-color d0d0d0ff \
|
||||
--text-ver-color d0d0d0ff \
|
||||
--text-wrong-color d0d0d0ff \
|
||||
--indicator \
|
||||
--clock
|
||||
;;
|
||||
*i3*|*I3*)
|
||||
exec "$HOME/.config/i3/scripts/lockscreen"
|
||||
;;
|
||||
esac
|
||||
|
||||
if command -v swaylock >/dev/null 2>&1; then
|
||||
exec swaylock -f
|
||||
fi
|
||||
|
||||
if [ -x "$HOME/.config/i3/scripts/lockscreen" ]; then
|
||||
exec "$HOME/.config/i3/scripts/lockscreen"
|
||||
fi
|
||||
|
||||
printf '%s\n' 'No supported lock command found.' >&2
|
||||
exit 1
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
choice="$(printf 'Shutdown\nReboot\nLogout\nLock\nSuspend' \
|
||||
| rofi -dmenu \
|
||||
-i \
|
||||
-p 'Power' \
|
||||
-theme ~/.config/rofi/config.rasi \
|
||||
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
|
||||
|
||||
[ -n "$choice" ] || exit 0
|
||||
|
||||
case "$choice" in
|
||||
Lock)
|
||||
"$HOME/.local/bin/lock-session"
|
||||
;;
|
||||
Logout)
|
||||
case "${XDG_CURRENT_DESKTOP:-}" in
|
||||
*sway*|*Sway*)
|
||||
swaymsg exit
|
||||
;;
|
||||
*i3*|*I3*)
|
||||
i3-msg exit
|
||||
;;
|
||||
*)
|
||||
printf '%s\n' 'Unsupported desktop session for logout.' >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Suspend)
|
||||
"$HOME/.local/bin/lock-session" || true
|
||||
loginctl suspend
|
||||
;;
|
||||
Reboot)
|
||||
loginctl reboot
|
||||
;;
|
||||
Shutdown)
|
||||
loginctl poweroff
|
||||
;;
|
||||
esac
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
mode=${1:-full}
|
||||
target_dir="$HOME/Pictures/Screenshots"
|
||||
target_file="$target_dir/$(date +%Y-%m-%d-%H%M%S).png"
|
||||
|
||||
mkdir -p "$target_dir"
|
||||
|
||||
case "$mode" in
|
||||
full)
|
||||
grim "$target_file"
|
||||
;;
|
||||
region)
|
||||
grim -g "$(slurp)" "$target_file"
|
||||
;;
|
||||
output)
|
||||
grim -g "$(slurp -o)" "$target_file"
|
||||
;;
|
||||
*)
|
||||
printf 'Usage: %s [full|region|output]\n' "$0" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if command -v wl-copy >/dev/null 2>&1; then
|
||||
wl-copy < "$target_file"
|
||||
fi
|
||||
|
||||
if command -v notify-send >/dev/null 2>&1; then
|
||||
notify-send "Screenshot saved" "$target_file"
|
||||
fi
|
||||
Reference in New Issue
Block a user