Compare commits

6 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
204ab24f30 sway: use wlogout for powermenu 2026-05-17 22:44:46 +02:00
Fabio Scotto di Santolo
8b647057e0 sway: reduce blur_passes, tune lockscreen indicator 2026-05-17 22:21:25 +02:00
Fabio Scotto di Santolo
6bb1895201 sway: add DND toggle in sway and waybar 2026-05-17 21:58:50 +02:00
Fabio Scotto di Santolo
0aafd5d727 sway: add foot terminal, floating rules for dialogs and apps 2026-05-17 20:44:23 +02:00
Fabio Scotto di Santolo
26c02c8623 sway: tune wlogout appearance and args 2026-05-17 20:24:55 +02:00
Fabio Scotto di Santolo
a69edfbf43 sway: add wlogout, waybar power button, layer effects 2026-05-17 15:32:26 +02:00
11 changed files with 156 additions and 19 deletions

View File

@@ -10,7 +10,10 @@
"Bash(git -C /home/fscotto/AnsiblePlaybook diff --stat)", "Bash(git -C /home/fscotto/AnsiblePlaybook diff --stat)",
"Bash(git -C /home/fscotto/AnsiblePlaybook status --short)", "Bash(git -C /home/fscotto/AnsiblePlaybook status --short)",
"Bash(git -C /home/fscotto/AnsiblePlaybook log --oneline --all -- ansible/inventory/host_vars/nymph.yml ansible/roles/profile_desktop_host/tasks/nymph.yml 'dotfiles/nymph/*')", "Bash(git -C /home/fscotto/AnsiblePlaybook log --oneline --all -- ansible/inventory/host_vars/nymph.yml ansible/roles/profile_desktop_host/tasks/nymph.yml 'dotfiles/nymph/*')",
"Bash(git *)" "Bash(git *)",
"Bash(wlogout --help)",
"Bash(xbps-query *)",
"Bash(xbps-install --dry-run gtklock)"
] ]
} }
} }

View File

@@ -178,29 +178,33 @@ desktop_i3_dotfiles:
mode: "0644" mode: "0644"
desktop_sway_dotfiles: desktop_sway_dotfiles:
- name: sway config - name: alacritty config
src: .config/sway/ src: .config/alacritty/
dest: .config/sway/ dest: .config/alacritty/
mode: preserve mode: preserve
- name: dunst config - name: dunst config
src: .config/dunst/ src: .config/dunst/
dest: .config/dunst/ dest: .config/dunst/
mode: preserve mode: preserve
- name: flameshot config
src: .config/flameshot/
dest: .config/flameshot/
mode: preserve
- name: rofi config - name: rofi config
src: .config/rofi/ src: .config/rofi/
dest: .config/rofi/ dest: .config/rofi/
mode: preserve mode: preserve
- name: sway config
src: .config/sway/
dest: .config/sway/
mode: preserve
- name: waybar config - name: waybar config
src: .config/waybar/ src: .config/waybar/
dest: .config/waybar/ dest: .config/waybar/
mode: preserve mode: preserve
- name: flameshot config - name: wlogout config
src: .config/flameshot/ src: .config/wlogout/
dest: .config/flameshot/ dest: .config/wlogout/
mode: preserve
- name: alacritty config
src: .config/alacritty/
dest: .config/alacritty/
mode: preserve mode: preserve
desktop_flatpak_packages: desktop_flatpak_packages:

View File

@@ -157,6 +157,8 @@ desktop_sway_packages:
- cliphist - cliphist
- dunst - dunst
- flameshot - flameshot
- foot
- foot-terminfo
- grim - grim
- kanshi - kanshi
- rofi - rofi
@@ -168,6 +170,7 @@ desktop_sway_packages:
- SwayOSD - SwayOSD
- Waybar - Waybar
- wl-clipboard - wl-clipboard
- wlogout
- xdg-desktop-portal-wlr - xdg-desktop-portal-wlr
- xorg-server-xwayland - xorg-server-xwayland

View File

@@ -10,11 +10,11 @@
loop: loop:
- "{{ user_home }}/.config/alacritty" - "{{ user_home }}/.config/alacritty"
- "{{ user_home }}/.config/dunst" - "{{ user_home }}/.config/dunst"
- "{{ user_home }}/.config/flameshot"
- "{{ user_home }}/.config/rofi" - "{{ user_home }}/.config/rofi"
- "{{ user_home }}/.config/sway" - "{{ user_home }}/.config/sway"
- "{{ user_home }}/.config/sway/scripts"
- "{{ user_home }}/.config/sway/wallpapers"
- "{{ user_home }}/.config/waybar" - "{{ user_home }}/.config/waybar"
- "{{ user_home }}/.config/wlogout"
when: "'sway' in (desktop_sessions_enabled | default([]))" when: "'sway' in (desktop_sessions_enabled | default([]))"
- name: Install allowed emptty Wayland sessions - name: Install allowed emptty Wayland sessions

View File

@@ -40,11 +40,14 @@ output * bg ~/.config/sway/wallpapers/wallpaper-161664.jpg center
# SwayFX effects # SwayFX effects
corner_radius 8 corner_radius 8
blur enable blur enable
blur_passes 2 blur_passes 1
blur_radius 5 blur_radius 5
shadows enable shadows enable
default_dim_inactive 0.1 default_dim_inactive 0.1
# Layer effects (Waybar etc.) — sfrutta il blur globale già attivo
layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows disable
# Allow X11 applications # Allow X11 applications
xwayland enable xwayland enable
@@ -73,6 +76,36 @@ for_window [app_id="(?i)polkit"] floating enable
for_window [class="(?i)polkit"] floating enable for_window [class="(?i)polkit"] floating enable
for_window [title="^Authentication Required"] floating enable for_window [title="^Authentication Required"] floating enable
# Floating: dialog X11 (open/save/print, generic transient dialogs)
for_window [window_role="pop-up"] floating enable
for_window [window_role="dialog"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="utility"] floating enable
# Floating: Bluetooth manager
for_window [app_id="blueman-manager"] floating enable
for_window [class="Blueman-manager"] floating enable
# Floating: NetworkManager connection editor / VPN / pinentry
for_window [app_id="nm-connection-editor"] floating enable
for_window [class="Nm-connection-editor"] floating enable
for_window [app_id="(?i)pinentry"] floating enable
for_window [class="(?i)pinentry"] floating enable
# Floating: Firefox auxiliary windows (Library/Downloads, About, Preferences, Manager)
for_window [class="(?i)firefox" title="^Library$"] floating enable
for_window [app_id="(?i)firefox" title="^Library$"] floating enable
for_window [class="(?i)firefox" title="^About Mozilla Firefox$"] floating enable
for_window [app_id="(?i)firefox" title="^About Mozilla Firefox$"] floating enable
for_window [class="(?i)firefox" window_role="Preferences"] floating enable
for_window [class="(?i)firefox" window_role="Manager"] floating enable
for_window [class="(?i)firefox" window_role="Dialog"] floating enable
for_window [class="(?i)firefox" window_role="Popup"] floating enable
# Floating: file pickers GTK (open/save) — già coperti da window_type=dialog ma ridondante per portal
for_window [app_id="org.freedesktop.impl.portal.desktop.gtk"] floating enable
# Autostart — XDG and session services # Autostart — XDG and session services
# Propagate Wayland env to dbus so xdg-desktop-portal backends inherit # Propagate Wayland env to dbus so xdg-desktop-portal backends inherit
# WAYLAND_DISPLAY/SWAYSOCK when dbus-activated (otherwise they crash). # WAYLAND_DISPLAY/SWAYSOCK when dbus-activated (otherwise they crash).
@@ -119,6 +152,9 @@ exec swayidle -w \
# Terminal # Terminal
bindsym $mod+Return exec $terminal bindsym $mod+Return exec $terminal
# Emergency terminal fallback
bindsym $mod+Shift+Return exec foot
# Emacs client # Emacs client
bindsym $mod+Shift+e exec emacsclient -c -n bindsym $mod+Shift+e exec emacsclient -c -n
@@ -134,6 +170,9 @@ bindsym $mod+Shift+v exec pavucontrol
# File manager # File manager
bindsym $mod+Shift+f exec thunar bindsym $mod+Shift+f exec thunar
# Do not disturb (dunst pause toggle)
bindsym $mod+Shift+d exec dunstctl set-paused toggle
# Manual lock screen # Manual lock screen
bindsym $mod+Shift+x exec ~/.config/sway/scripts/lockscreen bindsym $mod+Shift+x exec ~/.config/sway/scripts/lockscreen
@@ -233,7 +272,7 @@ bindsym $mod+Shift+0 move container to workspace number $ws10
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
bindsym $mod+Shift+r reload bindsym $mod+Shift+r reload
bindsym $mod+Shift+BackSpace exec swaymsg exit bindsym $mod+Shift+BackSpace exec swaymsg exit
bindsym $mod+Shift+Escape exec ~/.config/sway/scripts/powermenu.sh bindsym $mod+Shift+Escape exec wlogout -n -b 3 -c 16 -r 16 -L 1344 -R 1344 -T 650 -B 650
# Resize mode # Resize mode
mode "resize" { mode "resize" {

View File

@@ -3,7 +3,7 @@
exec swaylock \ exec swaylock \
--image "$HOME/.config/sway/wallpapers/maxresdefault.jpg" \ --image "$HOME/.config/sway/wallpapers/maxresdefault.jpg" \
--scaling fill \ --scaling fill \
--indicator-idle-visible \ --indicator-radius 100 \
--ring-color 2f4058 \ --ring-color 2f4058 \
--inside-color 1f1f28 \ --inside-color 1f1f28 \
--line-color 00000000 \ --line-color 00000000 \

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

View File

@@ -6,7 +6,7 @@
"modules-left": ["sway/workspaces"], "modules-left": ["sway/workspaces"],
"modules-center": [], "modules-center": [],
"modules-right": ["cpu", "memory", "disk", "temperature", "backlight", "network", "pulseaudio", "battery", "tray", "clock"], "modules-right": ["cpu", "memory", "disk", "temperature", "backlight", "network", "pulseaudio", "battery", "tray", "clock", "custom/dnd", "custom/power"],
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true, "disable-scroll": true,
@@ -97,5 +97,19 @@
"tray": { "tray": {
"icon-size": 16, "icon-size": 16,
"spacing": 6 "spacing": 6
},
"custom/dnd": {
"exec": "dunstctl is-paused | grep -q true && echo '{\"text\":\"󰂛\",\"class\":\"paused\"}' || echo '{\"text\":\"󰂚\",\"class\":\"\"}'",
"return-type": "json",
"interval": 2,
"on-click": "dunstctl set-paused toggle",
"tooltip": false
},
"custom/power": {
"format": "⏻",
"tooltip": false,
"on-click": "wlogout -n -b 3 -c 16 -r 16 -L 1344 -R 1344 -T 650 -B 650"
} }
} }

View File

@@ -5,7 +5,7 @@
} }
window#waybar { window#waybar {
background-color: #1f1f28; background-color: rgba(31, 31, 40, 0.55);
color: #d0d0d0; color: #d0d0d0;
border: none; border: none;
} }
@@ -43,7 +43,9 @@ window#waybar {
#network, #network,
#pulseaudio, #pulseaudio,
#battery, #battery,
#tray { #tray,
#custom-dnd,
#custom-power {
padding: 0 8px; padding: 0 8px;
} }
@@ -65,3 +67,23 @@ window#waybar {
#battery.full { color: #9ec07c; } #battery.full { color: #9ec07c; }
#tray { padding: 0 6px; } #tray { padding: 0 6px; }
#custom-dnd {
color: #8e8e9a;
font-size: 11pt;
}
#custom-dnd.paused {
color: #e0af68;
}
#custom-dnd:hover {
background-color: rgba(224, 175, 104, 0.15);
}
#custom-power {
color: #c7162b;
padding: 0 10px;
font-size: 12pt;
}
#custom-power:hover {
background-color: rgba(199, 22, 43, 0.15);
}

View File

@@ -0,0 +1,3 @@
{"label": "logout", "action": "swaymsg exit", "text": "Logout", "keybind": "l"}
{"label": "reboot", "action": "loginctl reboot", "text": "Reboot", "keybind": "r"}
{"label": "shutdown", "action": "loginctl poweroff", "text": "Shutdown", "keybind": "s"}

View File

@@ -0,0 +1,49 @@
* {
background-image: none;
box-shadow: none;
font-family: "LiterationMono Nerd Font", "Symbols Nerd Font Mono", monospace;
font-size: 10pt;
min-width: 0;
min-height: 0;
margin: 0;
padding: 0;
}
window {
background-color: rgba(31, 31, 40, 0.75);
}
button {
color: #d0d0d0;
background-color: #2b2b36;
border: 1px solid #3a3a46;
border-radius: 10px;
margin: 0;
padding: 0 0 12px 0;
min-width: 240px;
min-height: 140px;
background-repeat: no-repeat;
background-position: center 28%;
background-size: 80px 80px;
}
button:focus,
button:active,
button:hover {
color: #ffffff;
background-color: #4a90d9;
border-color: #4a90d9;
outline-style: none;
}
#logout {
background-image: image(url("/usr/share/wlogout/icons/logout.png"));
}
#reboot {
background-image: image(url("/usr/share/wlogout/icons/reboot.png"));
}
#shutdown {
background-image: image(url("/usr/share/wlogout/icons/shutdown.png"));
}