mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
desktop: add sway/swayfx profile (dormant) with waybar, kanshi, cliphist
New profile_desktop_sway role gated by desktop_sessions_enabled, with SwayFX effects, Waybar bar (1:1 with Polybar layout + pulseaudio), swayidle + swaylock-effects for locking, swayosd for OSD, cliphist for clipboard history and kanshi for multi-monitor profiles. Emptty gains WAYLAND_SESSIONS_PATH + wayland-sessions dir. start-sway wrapper handles session env (dbus-run-session, gpg-agent, turnstile env). Profile stays dormant until a host opts in via desktop_sessions_enabled. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
20
dotfiles/desktop/.config/sway/scripts/lockscreen
Executable file
20
dotfiles/desktop/.config/sway/scripts/lockscreen
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec swaylock-effects \
|
||||
--image "$HOME/.config/sway/wallpapers/wallpaper-161664.jpg" \
|
||||
--scaling fill \
|
||||
--clock \
|
||||
--indicator \
|
||||
--effect-blur 7x5 \
|
||||
--fade-in 0.3 \
|
||||
--ring-color 2f4058 \
|
||||
--inside-color 1f1f28 \
|
||||
--line-color 00000000 \
|
||||
--separator-color 3a3a46 \
|
||||
--key-hl-color 6daeea \
|
||||
--bs-hl-color c7162b \
|
||||
--ring-ver-color 4a90d9 \
|
||||
--inside-ver-color 1f1f28 \
|
||||
--ring-wrong-color c7162b \
|
||||
--inside-wrong-color 1f1f28 \
|
||||
--text-color d0d0d0
|
||||
29
dotfiles/desktop/.config/sway/scripts/powermenu.sh
Executable file
29
dotfiles/desktop/.config/sway/scripts/powermenu.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
choice="$(printf "⏻ Shutdown\n Reboot\n Logout\n Lock\n⏾ Suspend" \
|
||||
| rofi -dmenu \
|
||||
-i \
|
||||
-p "Power" \
|
||||
-theme ~/.config/rofi/config.rasi \
|
||||
-theme-str 'window { width: 20%; location: center; anchor: center; } listview { columns: 1; spacing: 6px; }')"
|
||||
|
||||
[ -z "$choice" ] && exit 0
|
||||
|
||||
case "$choice" in
|
||||
*Lock)
|
||||
~/.config/sway/scripts/lockscreen
|
||||
;;
|
||||
*Logout)
|
||||
swaymsg exit
|
||||
;;
|
||||
*Suspend)
|
||||
~/.config/sway/scripts/lockscreen
|
||||
loginctl suspend
|
||||
;;
|
||||
*Reboot)
|
||||
loginctl reboot
|
||||
;;
|
||||
*Shutdown)
|
||||
loginctl poweroff
|
||||
;;
|
||||
esac
|
||||
53
dotfiles/desktop/.config/sway/scripts/setup-gtk-theme.sh
Executable file
53
dotfiles/desktop/.config/sway/scripts/setup-gtk-theme.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
THEME="Yaru-blue-dark"
|
||||
ICONS="Yaru-blue-dark"
|
||||
CURSOR="Yaru"
|
||||
|
||||
FONT_UI="Liberation Sans 10"
|
||||
|
||||
mkdir -p "$HOME/.config/gtk-3.0"
|
||||
mkdir -p "$HOME/.config/gtk-4.0"
|
||||
|
||||
cat > "$HOME/.gtkrc-2.0" <<EOF
|
||||
gtk-theme-name="$THEME"
|
||||
gtk-icon-theme-name="$ICONS"
|
||||
gtk-cursor-theme-name="$CURSOR"
|
||||
gtk-font-name="$FONT_UI"
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
EOF
|
||||
|
||||
cat > "$HOME/.config/gtk-3.0/settings.ini" <<EOF
|
||||
[Settings]
|
||||
gtk-theme-name=$THEME
|
||||
gtk-icon-theme-name=$ICONS
|
||||
gtk-cursor-theme-name=$CURSOR
|
||||
gtk-font-name=$FONT_UI
|
||||
gtk-application-prefer-dark-theme=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
EOF
|
||||
|
||||
cat > "$HOME/.config/gtk-4.0/settings.ini" <<EOF
|
||||
[Settings]
|
||||
gtk-theme-name=$THEME
|
||||
gtk-icon-theme-name=$ICONS
|
||||
gtk-cursor-theme-name=$CURSOR
|
||||
gtk-font-name=$FONT_UI
|
||||
gtk-application-prefer-dark-theme=1
|
||||
EOF
|
||||
|
||||
# esporta variabili utili
|
||||
export GTK_THEME=$THEME
|
||||
export XCURSOR_THEME=$CURSOR
|
||||
export XCURSOR_SIZE=24
|
||||
|
||||
if command -v gsettings >/dev/null 2>&1; then
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "$THEME" >/dev/null 2>&1 || true
|
||||
gsettings set org.gnome.desktop.interface icon-theme "$ICONS" >/dev/null 2>&1 || true
|
||||
gsettings set org.gnome.desktop.interface cursor-theme "$CURSOR" >/dev/null 2>&1 || true
|
||||
gsettings set org.gnome.desktop.interface color-scheme prefer-dark >/dev/null 2>&1 || true
|
||||
fi
|
||||
Reference in New Issue
Block a user