Reorganize desktop roles: extract common bootstrap and host-specific layers

- Add profile_desktop_common with shared desktop bootstrap (emptty, PAM,
  dotfiles, templates, GPG, Maildir, Flatpak, st, external tools)
- Add profile_desktop_host with host-specific tasks (NVIDIA/PRIME on nymph)
- Reduce profile_desktop_i3 to i3/X11-only tasks
- Create profile_desktop_hyprland for Hyprland Wayland session
- Add dual-session support (i3 + Hyprland) on nymph with session choice
- Create shared Hyprland/Waybar dotfiles under dotfiles/desktop/
- Fix Waybar: bottom position, no persistent workspaces, sort by number
- Rename host_dotfiles to host_i3_dotfiles for clarity
- Make emptty restart manual by default to avoid session drops
This commit is contained in:
Fabio Scotto di Santolo
2026-03-30 12:43:41 +02:00
parent 56d634c64e
commit 0a80706ea2
34 changed files with 1342 additions and 1013 deletions

View File

View File

@@ -0,0 +1,16 @@
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = pidof hyprlock || hyprlock
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = 600
on-timeout = pidof hyprlock || hyprlock
}
listener {
timeout = 900
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}

View File

@@ -0,0 +1,171 @@
$mod = SUPER
$terminal = alacritty
$fallback_terminal = st
$menu = rofi -show drun -theme ~/.config/rofi/config.rasi
$powermenu = ~/.local/bin/powermenu
$locker = ~/.local/bin/lock-session
$screenshot = ~/.local/bin/screenshot-wayland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = dex --autostart --environment Hyprland
exec-once = gnome-keyring-daemon --start --components=secrets
exec-once = ~/.local/bin/setup-gtk-theme
exec-once = hyprpaper
exec-once = waybar
exec-once = hypridle
exec-once = dunst
exec-once = pipewire
exec-once = pipewire-pulse
exec-once = wireplumber
exec-once = /usr/libexec/xfce-polkit
exec-once = nm-applet
exec-once = blueman-applet
exec-once = udiskie --tray --automount
env = XCURSOR_THEME,Yaru
env = XCURSOR_SIZE,24
env = GTK_THEME,Yaru-blue-dark
source = ~/.config/hypr/host.conf
monitor = ,preferred,auto,1
input {
kb_layout = us
kb_variant = intl
follow_mouse = 1
sensitivity = 0
touchpad {
natural_scroll = true
}
}
general {
layout = dwindle
gaps_in = 0
gaps_out = 0
border_size = 2
col.active_border = rgb(4a90d9)
col.inactive_border = rgb(3a3a46)
allow_tearing = false
}
dwindle {
preserve_split = yes
}
decoration {
rounding = 0
blur {
enabled = false
}
}
animations {
enabled = no
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
windowrulev2 = float,class:^(Rofi)$
windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = float,class:^(nm-connection-editor)$
windowrulev2 = float,class:^(blueman-manager)$
bind = $mod, Return, exec, $terminal
bind = $mod SHIFT, Return, exec, $fallback_terminal
bind = $mod, D, exec, $menu
bind = $mod SHIFT, V, exec, pavucontrol
bind = $mod SHIFT, F, exec, thunar
bind = $mod SHIFT, X, exec, $locker
bind = $mod SHIFT, Q, killactive
bind = $mod, F, fullscreen, 1
bind = $mod, SPACE, togglefloating
bind = $mod SHIFT, SPACE, togglefloating
bind = $mod, V, togglesplit
bind = $mod, B, togglesplit
bind = $mod, minus, togglespecialworkspace, scratchpad
bind = $mod SHIFT, minus, movetoworkspace, special:scratchpad
bind = $mod, H, movefocus, l
bind = $mod, J, movefocus, d
bind = $mod, K, movefocus, u
bind = $mod, L, movefocus, r
bind = $mod, left, movefocus, l
bind = $mod, down, movefocus, d
bind = $mod, up, movefocus, u
bind = $mod, right, movefocus, r
bind = $mod SHIFT, H, movewindow, l
bind = $mod SHIFT, J, movewindow, d
bind = $mod SHIFT, K, movewindow, u
bind = $mod SHIFT, L, movewindow, r
bind = $mod SHIFT, left, movewindow, l
bind = $mod SHIFT, down, movewindow, d
bind = $mod SHIFT, up, movewindow, u
bind = $mod SHIFT, right, movewindow, r
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspace, 10
bind = $mod SHIFT, C, exec, hyprctl reload
bind = $mod SHIFT, R, exec, hyprctl reload
bind = $mod SHIFT, BackSpace, exit
bind = $mod SHIFT, Escape, exec, $powermenu
bind = , Print, exec, $screenshot full
bind = SHIFT, Print, exec, $screenshot region
bind = ALT, Print, exec, $screenshot output
bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
bind = $mod, R, submap, resize
submap = resize
bind = , H, resizeactive, -40 0
bind = , J, resizeactive, 0 40
bind = , K, resizeactive, 0 -40
bind = , L, resizeactive, 40 0
bind = , left, resizeactive, -40 0
bind = , down, resizeactive, 0 40
bind = , up, resizeactive, 0 -40
bind = , right, resizeactive, 40 0
bind = , escape, submap, reset
bind = , Return, submap, reset
bind = $mod, R, submap, reset
submap = reset
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow

View File

@@ -0,0 +1,46 @@
general {
hide_cursor = true
grace = 2
no_fade_in = false
}
background {
monitor =
color = rgba(1f1f28ff)
}
label {
monitor =
text = cmd[update:1000] echo "$(date +'%H:%M')"
color = rgba(d0d0d0ff)
font_size = 42
position = 0, 80
halign = center
valign = center
}
label {
monitor =
text = cmd[update:60000] echo "$(date +'%Y-%m-%d')"
color = rgba(9a9a9aff)
font_size = 18
position = 0, 35
halign = center
valign = center
}
input-field {
monitor =
size = 280, 56
outline_thickness = 2
dots_size = 0.2
dots_spacing = 0.2
outer_color = rgba(4a90d9ff)
inner_color = rgba(1f1f28ff)
font_color = rgba(d0d0d0ff)
fade_on_empty = false
placeholder_text = Password...
position = 0, -20
halign = center
valign = center
}

View File

@@ -0,0 +1,4 @@
preload = ~/.config/i3/wallpapers/dont_like_wallpapers.jpg
wallpaper = ,~/.config/i3/wallpapers/dont_like_wallpapers.jpg
splash = false
ipc = on

View File

@@ -0,0 +1,111 @@
{
"layer": "top",
"position": "bottom",
"height": 28,
"spacing": 4,
"modules-left": [
"hyprland/workspaces"
],
"modules-right": [
"pulseaudio",
"backlight",
"network",
"bluetooth",
"battery",
"temperature",
"memory",
"clock",
"custom/powermenu",
"tray"
],
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{name}",
"on-click": "activate",
"sort-by-number": true
},
"pulseaudio": {
"scroll-step": 1,
"format": "VOL {volume}%",
"format-muted": "MUTE",
"on-click": "pavucontrol",
"tooltip": false
},
"backlight": {
"device": "intel_backlight",
"on-scroll-up": "brightnessctl set +5%",
"on-scroll-down": "brightnessctl set 5%-",
"format": "BL {percent}%"
},
"network": {
"interval": 1,
"tooltip": true,
"format-wifi": "WIFI",
"format-ethernet": "ETH",
"format-linked": "LINK",
"format-disconnected": "OFF",
"tooltip-format": "{ifname}",
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
"tooltip-format-ethernet": "{ifname}",
"tooltip-format-disconnected": "Disconnected",
"on-click": "nm-connection-editor"
},
"bluetooth": {
"format": "BT",
"format-connected": "BT {device_alias}",
"format-off": "BT OFF",
"on-click": "blueman-manager"
},
"battery": {
"interval": 10,
"states": {
"warning": 20,
"critical": 10
},
"format": "BAT {capacity}%",
"format-charging": "BAT {capacity}% AC",
"format-plugged": "BAT {capacity}% AC",
"format-alt": "{time}"
},
"temperature": {
"critical-threshold": 80,
"format": "TMP {temperatureC}C",
"tooltip": false
},
"memory": {
"interval": 5,
"format": "MEM {percentage}%",
"states": {
"warning": 85
}
},
"clock": {
"interval": 60,
"timezone": "Europe/Rome",
"format": "{:%Y-%m-%d %H:%M}",
"format-alt": "{:%A %d/%m/%Y}"
},
"custom/powermenu": {
"format": "POWER",
"on-click": "~/.local/bin/powermenu",
"tooltip": false
},
"tray": {
"icon-size": 15,
"spacing": 6
}
}

View File

@@ -0,0 +1,90 @@
* {
border: none;
border-radius: 0;
min-height: 0;
padding: 0;
margin: 0;
font-family: "Liberation Mono", monospace;
font-size: 12px;
}
window#waybar {
background: #1f1f28;
color: #d0d0d0;
border-top: 2px solid #3a3a46;
}
#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 {
color: #ffffff;
border-top: 2px solid #4a90d9;
}
#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-right: 12px;
}
tooltip {
background: #1f1f28;
border: 1px solid #4a90d9;
color: #d0d0d0;
}

View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -eu
case "${XDG_CURRENT_DESKTOP:-}" in
*Hyprland*|*hyprland*)
exec hyprlock
;;
*i3*|*I3*)
exec "$HOME/.config/i3/scripts/lockscreen"
;;
esac
if command -v hyprlock >/dev/null 2>&1; then
exec hyprlock
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

@@ -0,0 +1,42 @@
#!/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
*Hyprland*|*hyprland*)
hyprctl dispatch 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

@@ -0,0 +1,33 @@
#!/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

View File

@@ -0,0 +1,38 @@
#!/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/.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
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

View File

@@ -0,0 +1,22 @@
#!/bin/sh
[ $# -gt 0 ] || set -- Hyprland
[ -r /etc/profile ] && . /etc/profile
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
set -e
session_name=${1##*/}
export XDG_CURRENT_DESKTOP="$session_name"
export XDG_SESSION_DESKTOP="$session_name"
export XDG_SESSION_TYPE=wayland
exec dbus-run-session sh -eu -c '
umask 077
printf "%s\n" "$DBUS_SESSION_BUS_ADDRESS" > "$HOME/.dbus-session-bus-address"
eval "$(ssh-agent -s)" >/dev/null
gpgconf --launch gpg-agent
exec "$@"
' sh "$@"