mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +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:
@@ -156,6 +156,32 @@ desktop_i3_dotfiles:
|
|||||||
dest: .xinitrc
|
dest: .xinitrc
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
|
desktop_sway_dotfiles:
|
||||||
|
- name: sway config
|
||||||
|
src: .config/sway/
|
||||||
|
dest: .config/sway/
|
||||||
|
mode: preserve
|
||||||
|
- name: Sway session launcher
|
||||||
|
src: .local/bin/start-sway
|
||||||
|
dest: .local/bin/start-sway
|
||||||
|
mode: "0755"
|
||||||
|
- name: dunst config
|
||||||
|
src: .config/dunst/
|
||||||
|
dest: .config/dunst/
|
||||||
|
mode: preserve
|
||||||
|
- name: rofi config
|
||||||
|
src: .config/rofi/
|
||||||
|
dest: .config/rofi/
|
||||||
|
mode: preserve
|
||||||
|
- name: waybar config
|
||||||
|
src: .config/waybar/
|
||||||
|
dest: .config/waybar/
|
||||||
|
mode: preserve
|
||||||
|
- name: alacritty config
|
||||||
|
src: .config/alacritty/
|
||||||
|
dest: .config/alacritty/
|
||||||
|
mode: preserve
|
||||||
|
|
||||||
noctalia_bar_monitors:
|
noctalia_bar_monitors:
|
||||||
- DP-1
|
- DP-1
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ void_packages_base:
|
|||||||
- tealdeer
|
- tealdeer
|
||||||
- tree-sitter-grammars
|
- tree-sitter-grammars
|
||||||
- ufw
|
- ufw
|
||||||
- xdotool
|
|
||||||
- void-repo-nonfree
|
- void-repo-nonfree
|
||||||
- vpm
|
- vpm
|
||||||
- vsv
|
- vsv
|
||||||
@@ -115,10 +114,6 @@ desktop_void_dotfiles:
|
|||||||
src: .bashrc.d/15-runit-desktop.sh
|
src: .bashrc.d/15-runit-desktop.sh
|
||||||
dest: .bashrc.d/15-runit-desktop.sh
|
dest: .bashrc.d/15-runit-desktop.sh
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
- name: alacritty config
|
|
||||||
src: .config/alacritty/
|
|
||||||
dest: .config/alacritty/
|
|
||||||
mode: preserve
|
|
||||||
- name: GTK theme setup script
|
- name: GTK theme setup script
|
||||||
src: .local/bin/setup-gtk-theme
|
src: .local/bin/setup-gtk-theme
|
||||||
dest: .local/bin/setup-gtk-theme
|
dest: .local/bin/setup-gtk-theme
|
||||||
@@ -141,9 +136,11 @@ desktop_void_dotfiles:
|
|||||||
mode: preserve
|
mode: preserve
|
||||||
|
|
||||||
desktop_common_packages:
|
desktop_common_packages:
|
||||||
|
- blueman
|
||||||
- brightnessctl
|
- brightnessctl
|
||||||
- dex
|
- dex
|
||||||
- emptty
|
- emptty
|
||||||
|
- network-manager-applet
|
||||||
- pinentry-emacs
|
- pinentry-emacs
|
||||||
- pinentry-gtk
|
- pinentry-gtk
|
||||||
- turnstile
|
- turnstile
|
||||||
@@ -151,6 +148,7 @@ desktop_common_packages:
|
|||||||
- xdg-desktop-portal
|
- xdg-desktop-portal
|
||||||
- xdg-desktop-portal-gtk
|
- xdg-desktop-portal-gtk
|
||||||
- xdg-user-dirs
|
- xdg-user-dirs
|
||||||
|
- xfce-polkit
|
||||||
|
|
||||||
desktop_i3_packages:
|
desktop_i3_packages:
|
||||||
- arandr
|
- arandr
|
||||||
@@ -162,22 +160,36 @@ desktop_i3_packages:
|
|||||||
- i3lock-color
|
- i3lock-color
|
||||||
- i3status
|
- i3status
|
||||||
- dunst
|
- dunst
|
||||||
- network-manager-applet
|
|
||||||
- picom
|
- picom
|
||||||
- polybar
|
- polybar
|
||||||
- rofi
|
- rofi
|
||||||
- scrot
|
- scrot
|
||||||
- setxkbmap
|
- setxkbmap
|
||||||
- blueman
|
|
||||||
- volumeicon
|
- volumeicon
|
||||||
- xclip
|
- xclip
|
||||||
- xfce-polkit
|
|
||||||
- xfce4-clipman-plugin
|
- xfce4-clipman-plugin
|
||||||
- xfce4-screenshooter
|
- xfce4-screenshooter
|
||||||
- xkbutils
|
- xkbutils
|
||||||
- xorg-fonts
|
- xorg-fonts
|
||||||
- xorg-minimal
|
- xorg-minimal
|
||||||
- xss-lock
|
- xss-lock
|
||||||
|
- xdotool
|
||||||
|
|
||||||
|
desktop_sway_packages:
|
||||||
|
- cliphist
|
||||||
|
- dunst
|
||||||
|
- kanshi
|
||||||
|
- rofi
|
||||||
|
- swayfx
|
||||||
|
- swaybg
|
||||||
|
- swayidle
|
||||||
|
- swaylock-effects
|
||||||
|
- SwayOSD
|
||||||
|
- waybar
|
||||||
|
- wl-clipboard
|
||||||
|
- xfce4-screenshooter
|
||||||
|
- xdg-desktop-portal-wlr
|
||||||
|
- xorg-server-xwayland
|
||||||
|
|
||||||
profile_packages:
|
profile_packages:
|
||||||
- alacritty
|
- alacritty
|
||||||
|
|||||||
@@ -61,6 +61,11 @@
|
|||||||
if 'i3' in (desktop_sessions_enabled | default([]))
|
if 'i3' in (desktop_sessions_enabled | default([]))
|
||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
|
+ (
|
||||||
|
(desktop_sway_packages | default([]))
|
||||||
|
if 'sway' in (desktop_sessions_enabled | default([]))
|
||||||
|
else []
|
||||||
|
)
|
||||||
+ (host_packages | default([]))
|
+ (host_packages | default([]))
|
||||||
)
|
)
|
||||||
| unique
|
| unique
|
||||||
|
|||||||
@@ -246,6 +246,7 @@
|
|||||||
mode: "0755"
|
mode: "0755"
|
||||||
loop:
|
loop:
|
||||||
- /etc/emptty/xsessions
|
- /etc/emptty/xsessions
|
||||||
|
- /etc/emptty/wayland-sessions
|
||||||
when: "'void' in group_names"
|
when: "'void' in group_names"
|
||||||
|
|
||||||
- name: Configure emptty
|
- name: Configure emptty
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ DEFAULT_SESSION_ENV={{ desktop_default_session_env | default('') }}
|
|||||||
DBUS_LAUNCH=false
|
DBUS_LAUNCH=false
|
||||||
XINITRC_LAUNCH=true
|
XINITRC_LAUNCH=true
|
||||||
XORG_SESSIONS_PATH=/etc/emptty/xsessions
|
XORG_SESSIONS_PATH=/etc/emptty/xsessions
|
||||||
|
WAYLAND_SESSIONS_PATH=/etc/emptty/wayland-sessions
|
||||||
VERTICAL_SELECTION=true
|
VERTICAL_SELECTION=true
|
||||||
IDENTIFY_ENVS=true
|
IDENTIFY_ENVS=true
|
||||||
SELECT_LAST_USER=global
|
SELECT_LAST_USER=global
|
||||||
|
|||||||
5
ansible/roles/profile_desktop_sway/files/sway.desktop
Normal file
5
ansible/roles/profile_desktop_sway/files/sway.desktop
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Sway
|
||||||
|
Comment=SwayFX (Wayland)
|
||||||
|
Exec=start-sway
|
||||||
|
Type=Application
|
||||||
41
ansible/roles/profile_desktop_sway/tasks/main.yml
Normal file
41
ansible/roles/profile_desktop_sway/tasks/main.yml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure sway config directories exist
|
||||||
|
tags: [dotfiles, dotfiles:desktop, sway]
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ username }}"
|
||||||
|
group: "{{ user_group }}"
|
||||||
|
mode: "0755"
|
||||||
|
loop:
|
||||||
|
- "{{ user_home }}/.config/alacritty"
|
||||||
|
- "{{ user_home }}/.config/dunst"
|
||||||
|
- "{{ user_home }}/.config/rofi"
|
||||||
|
- "{{ user_home }}/.config/sway"
|
||||||
|
- "{{ user_home }}/.config/sway/scripts"
|
||||||
|
- "{{ user_home }}/.config/sway/wallpapers"
|
||||||
|
- "{{ user_home }}/.config/waybar"
|
||||||
|
when: "'sway' in (desktop_sessions_enabled | default([]))"
|
||||||
|
|
||||||
|
- name: Install allowed emptty Wayland sessions
|
||||||
|
tags: [packages, services, emptty, sway]
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: sway.desktop
|
||||||
|
dest: /etc/emptty/wayland-sessions/sway.desktop
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
when: "'sway' in (desktop_sessions_enabled | default([]))"
|
||||||
|
|
||||||
|
- name: Copy sway desktop dotfiles
|
||||||
|
tags: [dotfiles, dotfiles:desktop, sway]
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
|
||||||
|
dest: "{{ user_home }}/{{ item.dest }}"
|
||||||
|
owner: "{{ username }}"
|
||||||
|
group: "{{ user_group }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
loop: "{{ desktop_sway_dotfiles | default([]) }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.dest }}"
|
||||||
|
when: "'sway' in (desktop_sessions_enabled | default([]))"
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
- services_runit
|
- services_runit
|
||||||
- profile_desktop_common
|
- profile_desktop_common
|
||||||
- profile_desktop_i3
|
- profile_desktop_i3
|
||||||
|
- profile_desktop_sway
|
||||||
- profile_desktop_host
|
- profile_desktop_host
|
||||||
|
|
||||||
- hosts: workstation_dev_ubuntu
|
- hosts: workstation_dev_ubuntu
|
||||||
|
|||||||
238
dotfiles/desktop/.config/sway/config
Normal file
238
dotfiles/desktop/.config/sway/config
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
# Sway / SwayFX config
|
||||||
|
|
||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
font pango:LiterationMono Nerd Font 10
|
||||||
|
|
||||||
|
# vim-like directions
|
||||||
|
set $left h
|
||||||
|
set $down j
|
||||||
|
set $up k
|
||||||
|
set $right l
|
||||||
|
|
||||||
|
# Workspaces (etichette in numeri romani)
|
||||||
|
set $ws1 "1: I"
|
||||||
|
set $ws2 "2: II"
|
||||||
|
set $ws3 "3: III"
|
||||||
|
set $ws4 "4: IV"
|
||||||
|
set $ws5 "5: V"
|
||||||
|
set $ws6 "6: VI"
|
||||||
|
set $ws7 "7: VII"
|
||||||
|
set $ws8 "8: VIII"
|
||||||
|
set $ws9 "9: IX"
|
||||||
|
set $ws10 "10: X"
|
||||||
|
|
||||||
|
# Input devices
|
||||||
|
input * {
|
||||||
|
xkb_layout us
|
||||||
|
xkb_variant intl
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cursor
|
||||||
|
seat * xcursor_theme Yaru 24
|
||||||
|
|
||||||
|
# Outputs
|
||||||
|
output * bg ~/.config/sway/wallpapers/wallpaper-161664.jpg fill
|
||||||
|
|
||||||
|
# SwayFX effects
|
||||||
|
corner_radius 8
|
||||||
|
blur enable
|
||||||
|
blur_passes 2
|
||||||
|
blur_radius 5
|
||||||
|
shadows enable
|
||||||
|
default_dim_inactive 0.1
|
||||||
|
|
||||||
|
# Allow X11 applications
|
||||||
|
xwayland enable
|
||||||
|
|
||||||
|
# General behavior
|
||||||
|
focus_follows_mouse no
|
||||||
|
mouse_warping none
|
||||||
|
floating_modifier $mod
|
||||||
|
tiling_drag modifier titlebar
|
||||||
|
|
||||||
|
# Borders
|
||||||
|
default_border pixel 2
|
||||||
|
default_floating_border pixel 2
|
||||||
|
new_window pixel 2
|
||||||
|
new_float pixel 2
|
||||||
|
hide_edge_borders none
|
||||||
|
|
||||||
|
# Gaps
|
||||||
|
gaps inner 10
|
||||||
|
gaps outer 4
|
||||||
|
smart_gaps on
|
||||||
|
smart_borders on
|
||||||
|
|
||||||
|
# Autostart — XDG and session services
|
||||||
|
exec dex --autostart --environment sway
|
||||||
|
exec gnome-keyring-daemon --start --components=secrets
|
||||||
|
exec_always ~/.config/sway/scripts/setup-gtk-theme.sh
|
||||||
|
exec /usr/libexec/xdg-desktop-portal
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
exec pipewire
|
||||||
|
exec pipewire-pulse
|
||||||
|
exec wireplumber
|
||||||
|
|
||||||
|
# Status bar
|
||||||
|
exec_always waybar
|
||||||
|
|
||||||
|
# OSD daemon (volume/brightness/caps-lock)
|
||||||
|
exec swayosd-server
|
||||||
|
|
||||||
|
# Tray services
|
||||||
|
exec dunst
|
||||||
|
exec /usr/libexec/xfce-polkit
|
||||||
|
exec nm-applet
|
||||||
|
exec blueman-applet
|
||||||
|
exec udiskie
|
||||||
|
|
||||||
|
# Clipboard manager (Wayland-native)
|
||||||
|
exec wl-paste --type text --watch cliphist store
|
||||||
|
exec wl-paste --type image --watch cliphist store
|
||||||
|
|
||||||
|
# Lock on suspend
|
||||||
|
exec swayidle -w before-sleep '~/.config/sway/scripts/lockscreen'
|
||||||
|
|
||||||
|
# Terminal
|
||||||
|
bindsym $mod+Return exec alacritty
|
||||||
|
|
||||||
|
# Emacs client
|
||||||
|
bindsym $mod+Shift+e exec emacsclient -c -n
|
||||||
|
|
||||||
|
# Launcher
|
||||||
|
bindsym $mod+d exec "rofi -show drun -theme ~/.config/rofi/config.rasi"
|
||||||
|
|
||||||
|
# Clipboard history picker
|
||||||
|
bindsym $mod+c exec "cliphist list | rofi -dmenu -theme ~/.config/rofi/config.rasi | cliphist decode | wl-copy"
|
||||||
|
|
||||||
|
# Audio panel control
|
||||||
|
bindsym $mod+Shift+v exec pavucontrol
|
||||||
|
|
||||||
|
# File manager
|
||||||
|
bindsym $mod+Shift+f exec thunar
|
||||||
|
|
||||||
|
# Manual lock screen
|
||||||
|
bindsym $mod+Shift+x exec ~/.config/sway/scripts/lockscreen
|
||||||
|
|
||||||
|
# Kill focused window
|
||||||
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
# Screenshot (xfce4-screenshooter via xdg-desktop-portal-wlr)
|
||||||
|
bindsym Print exec xfce4-screenshooter
|
||||||
|
bindsym Shift+Print exec xfce4-screenshooter -r
|
||||||
|
bindsym Alt+Print exec xfce4-screenshooter -w
|
||||||
|
|
||||||
|
# Focus
|
||||||
|
bindsym $mod+$left focus left
|
||||||
|
bindsym $mod+$down focus down
|
||||||
|
bindsym $mod+$up focus up
|
||||||
|
bindsym $mod+$right focus right
|
||||||
|
|
||||||
|
bindsym $mod+Left focus left
|
||||||
|
bindsym $mod+Down focus down
|
||||||
|
bindsym $mod+Up focus up
|
||||||
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
|
# Move windows
|
||||||
|
bindsym $mod+Shift+$left move left
|
||||||
|
bindsym $mod+Shift+$down move down
|
||||||
|
bindsym $mod+Shift+$up move up
|
||||||
|
bindsym $mod+Shift+$right move right
|
||||||
|
|
||||||
|
bindsym $mod+Shift+Left move left
|
||||||
|
bindsym $mod+Shift+Down move down
|
||||||
|
bindsym $mod+Shift+Up move up
|
||||||
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
|
# Split
|
||||||
|
bindsym $mod+b split h
|
||||||
|
bindsym $mod+v split v
|
||||||
|
|
||||||
|
# Layouts
|
||||||
|
bindsym $mod+f fullscreen toggle
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# Floating / focus mode
|
||||||
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
bindsym $mod+space focus mode_toggle
|
||||||
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
|
# Scratchpad
|
||||||
|
bindsym $mod+Shift+minus move scratchpad
|
||||||
|
bindsym $mod+minus scratchpad show
|
||||||
|
|
||||||
|
# Volume (via swayosd: aggiorna pactl + mostra 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
|
||||||
|
|
||||||
|
# Brightness (via swayosd: aggiorna brightnessctl + mostra OSD)
|
||||||
|
bindsym XF86MonBrightnessUp exec swayosd-client --brightness raise
|
||||||
|
bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower
|
||||||
|
|
||||||
|
# Media keys
|
||||||
|
bindsym XF86AudioPlay exec playerctl play-pause
|
||||||
|
bindsym XF86AudioNext exec playerctl next
|
||||||
|
bindsym XF86AudioPrev exec playerctl previous
|
||||||
|
|
||||||
|
# Workspace switch
|
||||||
|
bindsym $mod+1 workspace number $ws1
|
||||||
|
bindsym $mod+2 workspace number $ws2
|
||||||
|
bindsym $mod+3 workspace number $ws3
|
||||||
|
bindsym $mod+4 workspace number $ws4
|
||||||
|
bindsym $mod+5 workspace number $ws5
|
||||||
|
bindsym $mod+6 workspace number $ws6
|
||||||
|
bindsym $mod+7 workspace number $ws7
|
||||||
|
bindsym $mod+8 workspace number $ws8
|
||||||
|
bindsym $mod+9 workspace number $ws9
|
||||||
|
bindsym $mod+0 workspace number $ws10
|
||||||
|
bindsym $mod+comma workspace prev
|
||||||
|
bindsym $mod+period workspace next
|
||||||
|
|
||||||
|
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||||
|
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||||
|
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||||
|
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||||
|
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||||
|
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||||
|
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||||
|
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||||
|
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||||
|
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||||
|
|
||||||
|
# Reload / exit
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
bindsym $mod+Shift+r reload
|
||||||
|
bindsym $mod+Shift+BackSpace exec swaymsg exit
|
||||||
|
bindsym $mod+Shift+Escape exec ~/.config/sway/scripts/powermenu.sh
|
||||||
|
|
||||||
|
# Resize mode
|
||||||
|
mode "resize" {
|
||||||
|
bindsym $left resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym $down resize grow height 10 px or 10 ppt
|
||||||
|
bindsym $up resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym $right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
bindsym Left resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym Down resize grow height 10 px or 10 ppt
|
||||||
|
bindsym Up resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym Right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
bindsym $mod+r mode "default"
|
||||||
|
}
|
||||||
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
|
# Client colors (border, background, text, indicator, child_border)
|
||||||
|
client.focused #4a90d9 #4a90d9 #ffffff #4a90d9 #4a90d9
|
||||||
|
client.focused_inactive #3a3a46 #2b2b36 #eeeeee #3a3a46 #3a3a46
|
||||||
|
client.unfocused #2b2b36 #1f1f28 #bcbcbc #2b2b36 #2b2b36
|
||||||
|
client.urgent #c7162b #c7162b #ffffff #c7162b #c7162b
|
||||||
|
client.placeholder #1f1f28 #1f1f28 #bcbcbc #1f1f28 #1f1f28
|
||||||
|
client.background #1f1f28
|
||||||
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
|
||||||
BIN
dotfiles/desktop/.config/sway/wallpapers/wallpaper-161664.jpg
Executable file
BIN
dotfiles/desktop/.config/sway/wallpapers/wallpaper-161664.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 118 KiB |
101
dotfiles/desktop/.config/waybar/config.jsonc
Normal file
101
dotfiles/desktop/.config/waybar/config.jsonc
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"height": 26,
|
||||||
|
"spacing": 4,
|
||||||
|
|
||||||
|
"modules-left": ["sway/workspaces"],
|
||||||
|
"modules-center": ["clock"],
|
||||||
|
"modules-right": ["cpu", "memory", "disk", "temperature", "backlight", "network", "pulseaudio", "battery", "tray"],
|
||||||
|
|
||||||
|
"sway/workspaces": {
|
||||||
|
"disable-scroll": true,
|
||||||
|
"all-outputs": false,
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"1": "I",
|
||||||
|
"2": "II",
|
||||||
|
"3": "III",
|
||||||
|
"4": "IV",
|
||||||
|
"5": "V",
|
||||||
|
"6": "VI",
|
||||||
|
"7": "VII",
|
||||||
|
"8": "VIII",
|
||||||
|
"9": "IX",
|
||||||
|
"10": "X"
|
||||||
|
},
|
||||||
|
"persistent-workspaces": {
|
||||||
|
"*": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"clock": {
|
||||||
|
"interval": 60,
|
||||||
|
"format": " {:%Y-%m-%d %H:%M}",
|
||||||
|
"tooltip-format": "<tt>{calendar}</tt>"
|
||||||
|
},
|
||||||
|
|
||||||
|
"cpu": {
|
||||||
|
"interval": 5,
|
||||||
|
"format": " {usage}%"
|
||||||
|
},
|
||||||
|
|
||||||
|
"memory": {
|
||||||
|
"interval": 10,
|
||||||
|
"format": " {used:0.1f}G / {total:0.1f}G"
|
||||||
|
},
|
||||||
|
|
||||||
|
"disk": {
|
||||||
|
"interval": 60,
|
||||||
|
"path": "/",
|
||||||
|
"format": " {used} / {total}"
|
||||||
|
},
|
||||||
|
|
||||||
|
"temperature": {
|
||||||
|
"interval": 10,
|
||||||
|
"critical-threshold": 80,
|
||||||
|
"format": " {temperatureC}°C",
|
||||||
|
"format-critical": " {temperatureC}°C"
|
||||||
|
},
|
||||||
|
|
||||||
|
"backlight": {
|
||||||
|
"format": " {percent}%",
|
||||||
|
"on-scroll-up": "brightnessctl set +5%",
|
||||||
|
"on-scroll-down": "brightnessctl set 5%-"
|
||||||
|
},
|
||||||
|
|
||||||
|
"network": {
|
||||||
|
"interval": 5,
|
||||||
|
"format-wifi": " {essid} {signalStrength}%",
|
||||||
|
"format-ethernet": " {ifname}",
|
||||||
|
"format-disconnected": " offline",
|
||||||
|
"tooltip-format": "{ifname} {ipaddr}"
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": " muted",
|
||||||
|
"format-bluetooth": "{icon} {volume}% ",
|
||||||
|
"format-icons": { "default": ["", "", ""] },
|
||||||
|
"on-click": "swayosd-client --output-volume mute-toggle",
|
||||||
|
"on-click-right": "pavucontrol"
|
||||||
|
},
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"bat": "BAT0",
|
||||||
|
"interval": 30,
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"format-full": " full",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 16,
|
||||||
|
"spacing": 6
|
||||||
|
}
|
||||||
|
}
|
||||||
67
dotfiles/desktop/.config/waybar/style.css
Normal file
67
dotfiles/desktop/.config/waybar/style.css
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
* {
|
||||||
|
font-family: "LiterationMono Nerd Font", "Symbols Nerd Font Mono", monospace;
|
||||||
|
font-size: 10pt;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: #1f1f28;
|
||||||
|
color: #d0d0d0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 8px;
|
||||||
|
margin: 0;
|
||||||
|
color: #9a9a9a;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.visible {
|
||||||
|
color: #d0d0d0;
|
||||||
|
background-color: #2b2b36;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #4a90d9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #c7162b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#battery,
|
||||||
|
#tray {
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock { color: #d0d0d0; }
|
||||||
|
#cpu { color: #bb9af7; }
|
||||||
|
#memory { color: #7dcfff; }
|
||||||
|
#disk { color: #9ec07c; }
|
||||||
|
#temperature { color: #e0af68; }
|
||||||
|
#temperature.critical { color: #c7162b; }
|
||||||
|
#backlight { color: #d0d0d0; }
|
||||||
|
#network { color: #4a90d9; }
|
||||||
|
#network.disconnected { color: #3a3a46; }
|
||||||
|
#pulseaudio { color: #7dcfff; }
|
||||||
|
#pulseaudio.muted { color: #3a3a46; }
|
||||||
|
#battery { color: #d0d0d0; }
|
||||||
|
#battery.charging { color: #9ec07c; }
|
||||||
|
#battery.warning { color: #e0af68; }
|
||||||
|
#battery.critical { color: #c7162b; }
|
||||||
|
#battery.full { color: #9ec07c; }
|
||||||
|
|
||||||
|
#tray { padding: 0 6px; }
|
||||||
24
dotfiles/desktop/.local/bin/start-sway
Executable file
24
dotfiles/desktop/.local/bin/start-sway
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -r /etc/profile ] && . /etc/profile
|
||||||
|
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
|
||||||
|
|
||||||
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
export XDG_SESSION_DESKTOP=sway
|
||||||
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
export QT_QPA_PLATFORM='wayland;xcb'
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export GDK_BACKEND='wayland,x11'
|
||||||
|
|
||||||
|
export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent/socket"
|
||||||
|
|
||||||
|
exec dbus-run-session sh -eu -c '
|
||||||
|
umask 077
|
||||||
|
printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$HOME/.dbus-session-bus-address"
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
"$HOME/.local/bin/update-turnstile-env"
|
||||||
|
exec sway
|
||||||
|
'
|
||||||
@@ -6,11 +6,10 @@ if ! command -v turnstile-update-runit-env >/dev/null 2>&1; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
turnstile-update-runit-env \
|
vars="DISPLAY XAUTHORITY DBUS_SESSION_BUS_ADDRESS SSH_AUTH_SOCK XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE"
|
||||||
DISPLAY \
|
|
||||||
XAUTHORITY \
|
[ -n "${WAYLAND_DISPLAY:-}" ] && vars="$vars WAYLAND_DISPLAY"
|
||||||
DBUS_SESSION_BUS_ADDRESS \
|
[ -n "${SWAYSOCK:-}" ] && vars="$vars SWAYSOCK"
|
||||||
SSH_AUTH_SOCK \
|
|
||||||
XDG_CURRENT_DESKTOP \
|
# shellcheck disable=SC2086
|
||||||
XDG_SESSION_DESKTOP \
|
turnstile-update-runit-env $vars >/dev/null 2>&1 || true
|
||||||
XDG_SESSION_TYPE >/dev/null 2>&1 || true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user