Migrate nymph desktop to SwayFX and Noctalia

This commit is contained in:
Fabio Scotto di Santolo
2026-04-21 23:04:52 +02:00
parent f954dd70b3
commit 3a95e4d226
15 changed files with 170 additions and 419 deletions

View File

@@ -1,46 +1,16 @@
set $mod Mod4
set $terminal alacritty
set $fallback_terminal st
set $menu rofi -show drun -theme ~/.config/rofi/config.rasi
set $locker ~/.local/bin/lock-session
set $powermenu ~/.local/bin/powermenu
set $screenshot ~/.local/bin/screenshot-wayland
# Host-specific overrides
include ~/.config/sway/host.conf
include ~/.config/sway/shell.conf
font pango:Liberation Mono 10
# Session bootstrap
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XCURSOR_THEME XCURSOR_SIZE
exec systemctl --user import-environment WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XCURSOR_THEME XCURSOR_SIZE
exec ~/.local/bin/update-turnstile-env
exec dex --autostart --environment sway
exec gnome-keyring-daemon --start --components=secrets
exec ~/.local/bin/setup-gtk-theme
exec waybar -c ~/.config/waybar/config-sway.jsonc -s ~/.config/waybar/style.css
# Session services
exec pipewire
exec pipewire-pulse
exec wireplumber
exec kanshi
exec swayidle -w timeout 600 '~/.local/bin/lock-session' timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '~/.local/bin/lock-session'
# Tray and desktop applets
exec dunst
exec swayosd-server
exec /usr/libexec/xfce-polkit
exec nm-applet
exec blueman-applet
exec udiskie
exec xfce4-clipman
# Input and output defaults
seat seat0 xcursor_theme Yaru 24
output * bg ~/.config/sway/wallpapers/dont_like_wallpapers.jpg fill
input type:keyboard {
xkb_layout us
xkb_variant intl
@@ -74,15 +44,15 @@ bindsym $mod+Return exec $terminal
bindsym $mod+Shift+Return exec $fallback_terminal
bindsym $mod+Shift+e exec emacsclient -c -n
bindsym $mod+d exec $menu
bindsym $mod+Shift+v exec pavucontrol
bindsym $mod+Shift+v exec $audio_panel
bindsym $mod+Shift+f exec thunar
bindsym $mod+Shift+x exec $locker
bindsym $mod+Shift+q kill
# Screenshots
bindsym Print exec sh -c 'xfce4-screenshooter -f || ~/.local/bin/screenshot-wayland full'
bindsym Shift+Print exec sh -c 'xfce4-screenshooter -r || ~/.local/bin/screenshot-wayland region'
bindsym Alt+Print exec sh -c 'xfce4-screenshooter -w || ~/.local/bin/screenshot-wayland output'
bindsym Print exec $screenshot_full
bindsym Shift+Print exec $screenshot_region
bindsym Alt+Print exec $screenshot_window
# Focus
bindsym $mod+$left focus left
@@ -122,13 +92,13 @@ bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# Volume and brightness OSD
bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise
bindsym XF86AudioLowerVolume exec swayosd-client --output-volume lower
bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle
bindsym XF86AudioMicMute exec swayosd-client --input-volume mute-toggle
bindsym XF86AudioRaiseVolume exec $audio_raise
bindsym XF86AudioLowerVolume exec $audio_lower
bindsym XF86AudioMute exec $audio_mute
bindsym XF86AudioMicMute exec $audio_mic_mute
bindsym XF86MonBrightnessUp exec swayosd-client --brightness raise
bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower
bindsym XF86MonBrightnessUp exec $brightness_up
bindsym XF86MonBrightnessDown exec $brightness_down
# Media keys
bindsym XF86AudioPlay exec playerctl play-pause

View File

@@ -1,104 +0,0 @@
{
"layer": "top",
"position": "bottom",
"height": 28,
"spacing": 4,
"modules-left": [
"sway/workspaces"
],
"modules-right": [
"pulseaudio",
"backlight",
"network",
"battery",
"temperature",
"memory",
"clock",
"tray",
"custom/powermenu"
],
"sway/workspaces": {
"disable-scroll": true,
"format": "{name}",
"sort-by-number": true
},
"pulseaudio": {
"scroll-step": 1,
"format": "󰕾 {volume}%",
"format-bluetooth": "󰂯 {volume}%",
"format-muted": "󰖁",
"on-click": "pavucontrol",
"tooltip": false
},
"backlight": {
"device": "intel_backlight",
"on-scroll-up": "brightnessctl set +5%",
"on-scroll-down": "brightnessctl set 5%-",
"format": "󰃠 {percent}%"
},
"network": {
"interval": 1,
"tooltip": true,
"format-wifi": "󰖩",
"format-ethernet": "󰈀",
"format-linked": "󰈀",
"format-disconnected": "󰖪",
"tooltip-format": "{ifname}",
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
"tooltip-format-ethernet": "{ifname}",
"tooltip-format-disconnected": "Disconnected",
"on-click": "nm-connection-editor"
},
"battery": {
"interval": 10,
"states": {
"warning": 20,
"critical": 10
},
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-plugged": "󰂄 {capacity}%",
"format-alt": "{time}"
,"format-icons": ["󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
"temperature": {
"critical-threshold": 80,
"format": "󰔏 {temperatureC}C",
"tooltip": false
},
"memory": {
"interval": 5,
"format": "󰍛 {percentage}%",
"states": {
"warning": 85
}
},
"clock": {
"interval": 60,
"timezone": "Europe/Rome",
"format": "󰥔 {:%Y-%m-%d %H:%M}",
"format-alt": "{:%A %d/%m/%Y}",
"tooltip-format": "{:%A %d %B %Y\n%H:%M:%S %Z}"
},
"custom/powermenu": {
"format": "⏻",
"on-click": "~/.local/bin/powermenu",
"tooltip": false
},
"tray": {
"icon-size": 15,
"spacing": 4
}
}

View File

@@ -1,103 +0,0 @@
* {
border: none;
border-radius: 0;
min-height: 0;
padding: 0;
margin: 0;
}
window#waybar {
background: #1f1f28;
color: #d0d0d0;
border-top: 2px solid #3a3a46;
font-family: "Liberation Mono", "Symbols Nerd Font", monospace;
font-size: 12px;
}
window#waybar * {
font-family: inherit;
font-size: inherit;
}
#workspaces,
#pulseaudio,
#backlight,
#network,
#bluetooth,
#battery,
#temperature,
#memory,
#clock,
#custom-powermenu,
#tray {
padding: 0 8px;
margin: 3px 0;
}
#workspaces {
padding-left: 10px;
}
#workspaces button {
background: transparent;
color: #9a9a9a;
padding: 0 7px;
margin: 0 2px;
border-top: 2px solid transparent;
}
#workspaces button:hover {
color: #d0d0d0;
background: transparent;
}
#workspaces button.active,
#workspaces button.focused {
background: #4a90d9;
color: #ffffff;
border-top: 2px solid #6daeea;
}
#workspaces button.urgent {
color: #ffffff;
background: #c7162b;
}
#pulseaudio,
#backlight,
#network,
#bluetooth,
#battery,
#temperature,
#memory {
color: #d0d0d0;
}
#clock,
#custom-powermenu {
color: #ffffff;
}
#clock {
padding: 0 12px;
}
#custom-powermenu {
padding: 0 12px;
}
#tray {
padding: 0 8px;
}
menu,
menuitem {
font-family: "Liberation Sans", sans-serif;
font-size: 11px;
}
tooltip {
background: #1f1f28;
border: 1px solid #4a90d9;
color: #d0d0d0;
}

View File

@@ -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

View File

@@ -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

View File

@@ -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