diff --git a/AGENTS.md b/AGENTS.md index 4b65049..3ad5402 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,7 +39,6 @@ Ansible-driven personal infrastructure repo for Void desktops, Linux workstation - Server: `ansible-playbook ansible/site.yml --limit prometheus --check --diff` - Focused checks: - Emacs dotfiles only: `ansible-playbook ansible/site.yml --limit ikaros --tags emacs --check --diff` or `--limit nymph --tags emacs --check --diff` -- Waybar JSON: `python3 -m json.tool dotfiles/desktop/.config/waybar/config-sway.jsonc >/dev/null` - Mail bootstrap: `sh -n scripts/bootstrap_mail.sh` and `shellcheck scripts/bootstrap_mail.sh` - Windows bootstrap parse: `pwsh -NoProfile -Command "[void][System.Management.Automation.Language.Parser]::ParseFile('scripts/bootstrap_windows_workstation.ps1', [ref]$null, [ref]$null)"` - Server compose render: `docker compose -f /opt/docker/server/docker-compose.yml config` diff --git a/README.md b/README.md index fae2f2f..2a22746 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Sistema operativo: Sessioni desktop: - `ikaros`: i3 -- `nymph`: i3 + Sway con scelta sessione a login +- `nymph`: SwayFX Macchine: @@ -82,8 +82,8 @@ Queste macchine condividono la stessa configurazione base desktop e vengono mant Lo stato attuale del profilo desktop include, tra le altre cose: - dotfiles comuni e desktop -- sessione i3 su tutti i desktop Void e sessione Sway opzionale su `nymph` -- `emptty` con scelta sessione a login su `nymph` e default host-specific sugli altri desktop +- sessione i3 su `ikaros` e sessione SwayFX su `nymph` +- `emptty` con default host-specific per il desktop attivo su ogni host - pacchetti Void Linux e servizi runit - `turnstile` per i servizi utente, inclusi `emacs` e `ssh-agent` - `ssh-agent` con socket stabile condiviso tra shell, SSH ed Emacs in `~/.local/state/ssh-agent/socket` @@ -92,7 +92,7 @@ Lo stato attuale del profilo desktop include, tra le altre cose: - `tmux` con plugin gestiti da TPM al bootstrap del profilo desktop - Flatpak con remoto Flathub - GNOME Keyring e bootstrap della posta via script dedicato -- `Waybar` per Sway con `style.css` condiviso +- shell Noctalia per SwayFX su `nymph`, con plugin per clipboard, polkit e screenshot - `kanshi` su `nymph` per il profilo monitor Wayland, con workspace Sway deterministici: in dual monitor `1` resta su `eDP-1` e `2-10` vanno su `DP-1`, mentre in laptop-only tutti tornano su `eDP-1` --- @@ -450,13 +450,7 @@ ansible-playbook ansible/site.yml --limit deadalus-fedora --tags packages,vscode ansible-playbook ansible/site.yml --limit prometheus --tags services,dotfiles:server --check --diff ``` -Se tocchi `Waybar`, valida anche i config JSONC con: - -```bash -python3 -m json.tool dotfiles/desktop/.config/waybar/config-sway.jsonc >/dev/null -``` - ---- +--- # Bootstrap di una nuova macchina diff --git a/ansible/inventory/group_vars/desktop.yml b/ansible/inventory/group_vars/desktop.yml index 4544b61..80aec64 100644 --- a/ansible/inventory/group_vars/desktop.yml +++ b/ansible/inventory/group_vars/desktop.yml @@ -13,15 +13,11 @@ desktop_ollama_enabled: false desktop_common_packages: - brightnessctl - dex - - dunst - emptty - - network-manager-applet - pinentry-emacs - pinentry-gtk - - rofi - turnstile - udiskie - - xfce-polkit - xdg-desktop-portal - xdg-desktop-portal-gtk - xdg-user-dirs @@ -35,10 +31,15 @@ desktop_i3_packages: - i3blocks-blocklets - i3lock-color - i3status + - dunst + - network-manager-applet + - rofi - scrot - setxkbmap + - blueman - volumeicon - xclip + - xfce-polkit - xfce4-clipman-plugin - xfce4-screenshooter - xkbutils @@ -50,20 +51,13 @@ desktop_sway_packages: - grim - kanshi - slurp - - SwayOSD - - sway - - swayidle - - swaylock - - Waybar + - swayfx - wl-clipboard - - xfce4-clipman-plugin - - xfce4-screenshooter - xdg-desktop-portal-wlr profile_packages: - alacritty - bluez - - blueman - bridge-utils - celluloid - ctags @@ -168,10 +162,6 @@ desktop_common_dotfiles: src: .config/autostart/ dest: .config/autostart/ mode: preserve - - name: dunst config - src: .config/dunst/ - dest: .config/dunst/ - mode: preserve - name: alacritty config src: .config/alacritty/ dest: .config/alacritty/ @@ -180,10 +170,6 @@ desktop_common_dotfiles: src: .config/Thunar/ dest: .config/Thunar/ mode: preserve - - name: rofi config - src: .config/rofi/ - dest: .config/rofi/ - mode: preserve - name: MIME application defaults src: .config/mimeapps.list dest: .config/mimeapps.list @@ -248,14 +234,6 @@ desktop_common_dotfiles: src: .local/bin/setup-gtk-theme dest: .local/bin/setup-gtk-theme mode: "0755" - - name: Lock session script - src: .local/bin/lock-session - dest: .local/bin/lock-session - mode: "0755" - - name: Powermenu script - src: .local/bin/powermenu - dest: .local/bin/powermenu - mode: "0755" - name: Turnstile environment update script src: .local/bin/update-turnstile-env dest: .local/bin/update-turnstile-env @@ -280,10 +258,18 @@ desktop_i3_dotfiles: src: .config/i3/ dest: .config/i3/ mode: preserve + - name: dunst config + src: .config/dunst/ + dest: .config/dunst/ + mode: preserve - name: i3blocks config src: .config/i3blocks/ dest: .config/i3blocks/ mode: preserve + - name: rofi config + src: .config/rofi/ + dest: .config/rofi/ + mode: preserve - name: .xinitrc src: .xinitrc dest: .xinitrc @@ -294,10 +280,6 @@ desktop_sway_dotfiles: src: .config/sway/ dest: .config/sway/ mode: preserve - - name: Waybar config - src: .config/waybar/ - dest: .config/waybar/ - mode: preserve - name: Sway wallpaper assets src: .config/i3/wallpapers/ dest: .config/sway/wallpapers/ @@ -306,10 +288,6 @@ desktop_sway_dotfiles: src: .local/bin/start-sway-session dest: .local/bin/start-sway-session mode: "0755" - - name: Wayland screenshot script - src: .local/bin/screenshot-wayland - dest: .local/bin/screenshot-wayland - mode: "0755" desktop_flatpak_packages: - be.alexandervanhee.gradia diff --git a/ansible/inventory/host_vars/nymph.yml b/ansible/inventory/host_vars/nymph.yml index 612add7..9fd156d 100644 --- a/ansible/inventory/host_vars/nymph.yml +++ b/ansible/inventory/host_vars/nymph.yml @@ -2,29 +2,58 @@ hostname: nymph desktop_sessions_enabled: - - i3 - sway -desktop_prompt_for_session: true +desktop_default_session: sway +desktop_default_session_env: wayland desktop_emptty_session_error_logging: rotate +host_xbps_repositories: + - name: noctalia + url: https://universalrepo.r1xelelo.workers.dev/void + host_packages: + - cliphist + - grimshot - nvidia + - noctalia-shell + - power-profiles-daemon - mesa-dri - vulkan-loader - mesa-vulkan-intel - intel-video-accel - tlp - tlp-rdw + - upower + +host_remove_packages: + - arandr + - autorandr + - feh + - i3 + - i3blocks + - i3blocks-blocklets + - i3lock-color + - i3status + - dunst + - network-manager-applet + - rofi + - scrot + - setxkbmap + - blueman + - volumeicon + - xclip + - xfce-polkit + - xfce4-clipman-plugin + - xfce4-screenshooter + - xkbutils + - xorg-fonts + - xorg-minimal + - xss-lock host_enabled_services: - tlp -host_i3_dotfiles: - - src: .config/autorandr/ - dest: .config/autorandr/ - mode: preserve - host_sway_dotfiles: - src: .config/sway/host.conf dest: .config/sway/host.conf diff --git a/ansible/roles/packages_void/tasks/main.yml b/ansible/roles/packages_void/tasks/main.yml index c28e0a6..8e921d8 100644 --- a/ansible/roles/packages_void/tasks/main.yml +++ b/ansible/roles/packages_void/tasks/main.yml @@ -67,7 +67,16 @@ else [] ) + (host_packages | default([])) - ) | unique + ) + | unique }} state: present update_cache: false + +- name: Remove host-specific packages on Void Linux + tags: [packages] + community.general.xbps: + name: "{{ (host_remove_packages | default([])) | unique }}" + state: absent + update_cache: false + when: (host_remove_packages | default([])) | length > 0 diff --git a/ansible/roles/profile_desktop_sway/tasks/main.yml b/ansible/roles/profile_desktop_sway/tasks/main.yml index 22d6a79..9128f52 100644 --- a/ansible/roles/profile_desktop_sway/tasks/main.yml +++ b/ansible/roles/profile_desktop_sway/tasks/main.yml @@ -9,10 +9,23 @@ mode: "0755" loop: - "{{ user_home }}/.config/sway" - - "{{ user_home }}/.config/waybar" - "{{ user_home }}/.config/kanshi" when: "'sway' in (desktop_sessions_enabled | default([]))" +- name: Ensure Noctalia config directories exist + tags: [dotfiles, dotfiles:desktop, sway, noctalia] + ansible.builtin.file: + path: "{{ item }}" + state: directory + owner: "{{ username }}" + group: "{{ user_group }}" + mode: "0755" + loop: + - "{{ user_home }}/.config/noctalia" + - "{{ user_home }}/.config/noctalia/plugins" + - "{{ user_home }}/.local/share/noctalia-plugins" + when: "'sway' in (desktop_sessions_enabled | default([]))" + - name: Install Sway emptty session entry tags: [packages, services, emptty, sway] ansible.builtin.template: @@ -35,3 +48,18 @@ loop_control: label: "{{ item.dest }}" when: "'sway' in (desktop_sessions_enabled | default([]))" + +- name: Render Sway shell config + tags: [dotfiles, dotfiles:desktop, sway] + ansible.builtin.template: + src: shell.conf.j2 + dest: "{{ user_home }}/.config/sway/shell.conf" + owner: "{{ username }}" + group: "{{ user_group }}" + mode: "0644" + when: "'sway' in (desktop_sessions_enabled | default([]))" + +- name: Manage Noctalia shell plugins + tags: [dotfiles, dotfiles:desktop, sway, noctalia] + ansible.builtin.include_tasks: noctalia.yml + when: "'sway' in (desktop_sessions_enabled | default([]))" diff --git a/ansible/roles/profile_desktop_sway/tasks/noctalia.yml b/ansible/roles/profile_desktop_sway/tasks/noctalia.yml new file mode 100644 index 0000000..23e6f95 --- /dev/null +++ b/ansible/roles/profile_desktop_sway/tasks/noctalia.yml @@ -0,0 +1,32 @@ +--- +- name: Bootstrap official Noctalia plugins checkout + ansible.builtin.git: + repo: https://github.com/noctalia-dev/noctalia-plugins.git + dest: "{{ user_home }}/.local/share/noctalia-plugins/official" + version: main + update: true + become_user: "{{ username }}" + environment: + HOME: "{{ user_home }}" + +- name: Bootstrap Clipper plugin checkout + ansible.builtin.git: + repo: https://github.com/blackbartblues/noctalia-clipper.git + dest: "{{ user_home }}/.config/noctalia/plugins/clipper" + version: master + update: true + become_user: "{{ username }}" + environment: + HOME: "{{ user_home }}" + +- name: Link official Noctalia plugins + ansible.builtin.file: + src: "{{ user_home }}/.local/share/noctalia-plugins/official/{{ item }}" + dest: "{{ user_home }}/.config/noctalia/plugins/{{ item }}" + state: link + force: true + owner: "{{ username }}" + group: "{{ user_group }}" + loop: + - polkit-agent + - screenshot diff --git a/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 b/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 new file mode 100644 index 0000000..d69c8e5 --- /dev/null +++ b/ansible/roles/profile_desktop_sway/templates/shell.conf.j2 @@ -0,0 +1,29 @@ +set $menu qs -c noctalia-shell ipc call launcher toggle +set $audio_panel qs -c noctalia-shell ipc call volume openPanel +set $locker qs -c noctalia-shell ipc call lockScreen lock +set $powermenu qs -c noctalia-shell ipc call sessionMenu toggle +set $screenshot_full qs -c noctalia-shell ipc call plugin:screenshot takeScreenshot output +set $screenshot_region qs -c noctalia-shell ipc call plugin:screenshot takeScreenshot region +set $screenshot_window qs -c noctalia-shell ipc call plugin:screenshot takeScreenshot window +set $audio_raise qs -c noctalia-shell ipc call volume increase +set $audio_lower qs -c noctalia-shell ipc call volume decrease +set $audio_mute qs -c noctalia-shell ipc call volume muteOutput +set $audio_mic_mute qs -c noctalia-shell ipc call volume muteInput +set $brightness_up qs -c noctalia-shell ipc call brightness increase +set $brightness_down qs -c noctalia-shell ipc call brightness decrease + +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 pipewire +exec pipewire-pulse +exec wireplumber +exec kanshi +exec udiskie +exec wl-paste --watch cliphist store +exec qs -c noctalia-shell + +bindsym $mod+c exec qs -c noctalia-shell ipc call launcher clipboard diff --git a/dotfiles/desktop/.config/sway/config b/dotfiles/desktop/.config/sway/config index 0597c24..3b653c3 100644 --- a/dotfiles/desktop/.config/sway/config +++ b/dotfiles/desktop/.config/sway/config @@ -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 diff --git a/dotfiles/desktop/.config/waybar/config-sway.jsonc b/dotfiles/desktop/.config/waybar/config-sway.jsonc deleted file mode 100644 index 5f31197..0000000 --- a/dotfiles/desktop/.config/waybar/config-sway.jsonc +++ /dev/null @@ -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 - } -} diff --git a/dotfiles/desktop/.config/waybar/style.css b/dotfiles/desktop/.config/waybar/style.css deleted file mode 100644 index 124635d..0000000 --- a/dotfiles/desktop/.config/waybar/style.css +++ /dev/null @@ -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; -} diff --git a/dotfiles/desktop/.local/bin/lock-session b/dotfiles/desktop/.local/bin/lock-session deleted file mode 100644 index 786d136..0000000 --- a/dotfiles/desktop/.local/bin/lock-session +++ /dev/null @@ -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 diff --git a/dotfiles/desktop/.local/bin/powermenu b/dotfiles/desktop/.local/bin/powermenu deleted file mode 100644 index 7b14acd..0000000 --- a/dotfiles/desktop/.local/bin/powermenu +++ /dev/null @@ -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 diff --git a/dotfiles/desktop/.local/bin/screenshot-wayland b/dotfiles/desktop/.local/bin/screenshot-wayland deleted file mode 100644 index b35d332..0000000 --- a/dotfiles/desktop/.local/bin/screenshot-wayland +++ /dev/null @@ -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 diff --git a/dotfiles/nymph/.config/sway/host.conf b/dotfiles/nymph/.config/sway/host.conf index 28c111d..c51d06a 100644 --- a/dotfiles/nymph/.config/sway/host.conf +++ b/dotfiles/nymph/.config/sway/host.conf @@ -1,5 +1,9 @@ set $terminal ~/.local/bin/prime-run /usr/bin/alacritty +gaps inner 10 +gaps outer 5 +corner_radius 10 + workspace 1 output eDP-1 workspace 2 output DP-1 workspace 3 output DP-1