From 3993fb896d4ecd3b6e4f9d4aadbd3ca30faa7e1d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 22:27:49 +0100 Subject: [PATCH 01/10] Move to UWSM --- home/.config/hypr/hyprland.d/exec.conf | 11 ++--------- .../systemd/user/battery-notification.service | 10 ++++++---- home/.config/systemd/user/battery-notification.timer | 7 +++++-- home/.config/systemd/user/clipman.service | 8 ++++++-- .../systemd-lock-handler.service | 1 + home/.config/systemd/user/dunst.service | 10 ---------- home/.config/systemd/user/eww-window@.service | 8 +++----- home/.config/systemd/user/eww.service | 6 +++--- home/.config/systemd/user/gh-notification.service | 11 ++++++----- home/.config/systemd/user/gh-notification.timer | 7 +++++-- .../systemd/user/gpg-agent.service.d/override.conf | 2 ++ .../battery-notification.timer | 0 .../clipman.service | 0 .../eww-window@bar0.service | 0 .../eww.service | 0 .../gh-notification.timer | 0 .../graphical-session.target.wants/hypridle.service | 1 + .../hyprpaper.service | 0 .../policykit-agent.service | 0 .../graphical-session.target.wants/swaync.service | 1 + .../wl-gammarelay.service | 0 home/.config/systemd/user/hypridle.service | 10 ---------- .../systemd/user/hypridle.service.d/override.conf | 2 ++ home/.config/systemd/user/hyprland-monitord.service | 9 ++++++--- home/.config/systemd/user/hyprlock.service | 5 +++-- home/.config/systemd/user/hyprpaper.service | 12 ------------ .../systemd/user/hyprpaper.service.d/override.conf | 3 +++ home/.config/systemd/user/policykit-agent.service | 5 ++++- .../.config/systemd/user/swaync-inhibit-lock.service | 4 +++- .../systemd/user/swaync-inhibit-unlock.service | 3 ++- home/.config/systemd/user/swaync.service | 10 ---------- .../systemd/user/swaync.service.d/override.conf | 2 ++ home/.config/systemd/user/wayland-session.target | 6 ------ .../wayland-session.target.wants/hypridle.service | 1 - .../hyprland-monitord.service | 0 home/.config/systemd/user/wl-gammarelay.service | 9 ++++++--- home/.config/systemd/user/wm-ready.target | 7 ------- home/.config/uwsm/default-id | 1 + home/.config/uwsm/env | 3 +++ install_gui.sh | 3 ++- root/etc/greetd/config.toml | 2 +- 41 files changed, 79 insertions(+), 101 deletions(-) create mode 120000 home/.config/systemd/user/default.target.wants/systemd-lock-handler.service delete mode 100644 home/.config/systemd/user/dunst.service create mode 100644 home/.config/systemd/user/gpg-agent.service.d/override.conf rename home/.config/systemd/user/{wm-ready.target.wants => graphical-session.target.wants}/battery-notification.timer (100%) rename home/.config/systemd/user/{wm-ready.target.wants => graphical-session.target.wants}/clipman.service (100%) rename home/.config/systemd/user/{wm-ready.target.wants => graphical-session.target.wants}/eww-window@bar0.service (100%) rename home/.config/systemd/user/{wm-ready.target.wants => graphical-session.target.wants}/eww.service (100%) rename home/.config/systemd/user/{wm-ready.target.wants => graphical-session.target.wants}/gh-notification.timer (100%) create mode 120000 home/.config/systemd/user/graphical-session.target.wants/hypridle.service rename home/.config/systemd/user/{wayland-session.target.wants => graphical-session.target.wants}/hyprpaper.service (100%) rename home/.config/systemd/user/{wm-ready.target.wants => graphical-session.target.wants}/policykit-agent.service (100%) create mode 120000 home/.config/systemd/user/graphical-session.target.wants/swaync.service rename home/.config/systemd/user/{wayland-session.target.wants => graphical-session.target.wants}/wl-gammarelay.service (100%) delete mode 100644 home/.config/systemd/user/hypridle.service create mode 100644 home/.config/systemd/user/hypridle.service.d/override.conf delete mode 100644 home/.config/systemd/user/hyprpaper.service create mode 100644 home/.config/systemd/user/hyprpaper.service.d/override.conf delete mode 100644 home/.config/systemd/user/swaync.service create mode 100644 home/.config/systemd/user/swaync.service.d/override.conf delete mode 100644 home/.config/systemd/user/wayland-session.target delete mode 120000 home/.config/systemd/user/wayland-session.target.wants/hypridle.service rename home/.config/systemd/user/{wayland-session.target.wants => wayland-session@hyprland.desktop.target.wants}/hyprland-monitord.service (100%) delete mode 100644 home/.config/systemd/user/wm-ready.target create mode 100644 home/.config/uwsm/default-id create mode 100644 home/.config/uwsm/env diff --git a/home/.config/hypr/hyprland.d/exec.conf b/home/.config/hypr/hyprland.d/exec.conf index e517ccb..ee6742e 100644 --- a/home/.config/hypr/hyprland.d/exec.conf +++ b/home/.config/hypr/hyprland.d/exec.conf @@ -1,11 +1,4 @@ -exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE GTK_THEME QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE -exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP GTK_THEME QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE - -# Hyprland socket sometimes isn't yet loaded, sleep for sec -exec-once = sleep 1 && systemctl --user start wayland-session.target - -exec-once = sleep 3 && vesktop -# exec-once = sleep 3 && discord -# exec-once = sleep 3 && webcord --start-minimized +exec-once = uwsm finalize +exec-once = uwsm app vesktop # vi: ft=hyprlang diff --git a/home/.config/systemd/user/battery-notification.service b/home/.config/systemd/user/battery-notification.service index c63c50d..c9dfbd8 100644 --- a/home/.config/systemd/user/battery-notification.service +++ b/home/.config/systemd/user/battery-notification.service @@ -1,13 +1,15 @@ [Unit] -Description="Show a notification when the battery is low" +Description=Show a notification when the battery is low +Requires=graphical-session.target PartOf=graphical-session.target [Service] -ExecStart=%h/.local/bin/scripts/gui/battery-notification Type=oneshot +ExecStart=%h/.local/bin/scripts/gui/battery-notification RemainAfterExit=false Restart=on-failure -RestartSec=3s +Slice=background-graphical.slice [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target + diff --git a/home/.config/systemd/user/battery-notification.timer b/home/.config/systemd/user/battery-notification.timer index cdc31e1..ec0044a 100644 --- a/home/.config/systemd/user/battery-notification.timer +++ b/home/.config/systemd/user/battery-notification.timer @@ -1,9 +1,12 @@ [Unit] -Description="Timer for low battery notification sendout" +Description=Timer for low battery notification sendout +After=graphical-session.target +Requires=graphical-session.target PartOf=graphical-session.target [Timer] OnUnitActiveSec=20s [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target + diff --git a/home/.config/systemd/user/clipman.service b/home/.config/systemd/user/clipman.service index 2c1b376..03ed28f 100644 --- a/home/.config/systemd/user/clipman.service +++ b/home/.config/systemd/user/clipman.service @@ -1,10 +1,14 @@ [Unit] -Description="Clipboard clipboard manager" +Description=Clipman clipboard manager +After=graphical-session.target +Requires=graphical-session.target PartOf=graphical-session.target [Service] ExecStart=/usr/bin/wl-paste -t text --watch /usr/bin/clipman store --no-persist Restart=on-failure +Slice=background-graphical.slice [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target + diff --git a/home/.config/systemd/user/default.target.wants/systemd-lock-handler.service b/home/.config/systemd/user/default.target.wants/systemd-lock-handler.service new file mode 120000 index 0000000..b7c9720 --- /dev/null +++ b/home/.config/systemd/user/default.target.wants/systemd-lock-handler.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/systemd-lock-handler.service \ No newline at end of file diff --git a/home/.config/systemd/user/dunst.service b/home/.config/systemd/user/dunst.service deleted file mode 100644 index 7a67667..0000000 --- a/home/.config/systemd/user/dunst.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description="Dunst daemon" -PartOf=graphical-session.target - -[Service] -ExecStart=/usr/bin/dunst -Restart=on-failure - -[Install] -WantedBy=wm-ready.target diff --git a/home/.config/systemd/user/eww-window@.service b/home/.config/systemd/user/eww-window@.service index 161113d..341cf31 100644 --- a/home/.config/systemd/user/eww-window@.service +++ b/home/.config/systemd/user/eww-window@.service @@ -1,17 +1,15 @@ [Unit] -Description="Open %I eww window" -PartOf=graphical-session.target +Description=Open %I eww window After=eww.service -PartOf=eww.service [Service] +Type=oneshot ExecStartPre=/usr/bin/eww ping ExecStart=/usr/bin/eww open %i ExecStop=/usr/bin/eww close %i -Type=oneshot RemainAfterExit=true Restart=on-failure RestartSec=3s [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target diff --git a/home/.config/systemd/user/eww.service b/home/.config/systemd/user/eww.service index 185beb8..56fe6c3 100644 --- a/home/.config/systemd/user/eww.service +++ b/home/.config/systemd/user/eww.service @@ -1,11 +1,11 @@ [Unit] -Description="Eww daemon" +Description=Eww daemon PartOf=graphical-session.target [Service] ExecStart=/usr/bin/eww daemon --no-daemonize Restart=always -RestartSec=3s +Slice=background-graphical.slice [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target diff --git a/home/.config/systemd/user/gh-notification.service b/home/.config/systemd/user/gh-notification.service index 4d6ec65..c72e9fe 100644 --- a/home/.config/systemd/user/gh-notification.service +++ b/home/.config/systemd/user/gh-notification.service @@ -1,14 +1,15 @@ [Unit] -Description="Show unread GitHub notifications" +Description=Show unread GitHub notifications +Requires=graphical-session.target PartOf=graphical-session.target -After=dunst.service [Service] -ExecStart=%h/.local/bin/scripts/gui/gh-notification -vv Type=oneshot +ExecStart=%h/.local/bin/scripts/gui/gh-notification -vv RemainAfterExit=false Restart=on-failure -RestartSec=3s +Slice=background-graphical.slice [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target + diff --git a/home/.config/systemd/user/gh-notification.timer b/home/.config/systemd/user/gh-notification.timer index b7e8ff4..8350a3c 100644 --- a/home/.config/systemd/user/gh-notification.timer +++ b/home/.config/systemd/user/gh-notification.timer @@ -1,9 +1,12 @@ [Unit] -Description="Timer for GitHub notification sendout" +Description=Timer for GitHub notification sendout +After=graphical-session.target +Requires=graphical-session.target PartOf=graphical-session.target [Timer] OnUnitActiveSec=1m [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target + diff --git a/home/.config/systemd/user/gpg-agent.service.d/override.conf b/home/.config/systemd/user/gpg-agent.service.d/override.conf new file mode 100644 index 0000000..4a95f51 --- /dev/null +++ b/home/.config/systemd/user/gpg-agent.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +Environment="GNUPGHOME=%h/.local/share/gnupg" diff --git a/home/.config/systemd/user/wm-ready.target.wants/battery-notification.timer b/home/.config/systemd/user/graphical-session.target.wants/battery-notification.timer similarity index 100% rename from home/.config/systemd/user/wm-ready.target.wants/battery-notification.timer rename to home/.config/systemd/user/graphical-session.target.wants/battery-notification.timer diff --git a/home/.config/systemd/user/wm-ready.target.wants/clipman.service b/home/.config/systemd/user/graphical-session.target.wants/clipman.service similarity index 100% rename from home/.config/systemd/user/wm-ready.target.wants/clipman.service rename to home/.config/systemd/user/graphical-session.target.wants/clipman.service diff --git a/home/.config/systemd/user/wm-ready.target.wants/eww-window@bar0.service b/home/.config/systemd/user/graphical-session.target.wants/eww-window@bar0.service similarity index 100% rename from home/.config/systemd/user/wm-ready.target.wants/eww-window@bar0.service rename to home/.config/systemd/user/graphical-session.target.wants/eww-window@bar0.service diff --git a/home/.config/systemd/user/wm-ready.target.wants/eww.service b/home/.config/systemd/user/graphical-session.target.wants/eww.service similarity index 100% rename from home/.config/systemd/user/wm-ready.target.wants/eww.service rename to home/.config/systemd/user/graphical-session.target.wants/eww.service diff --git a/home/.config/systemd/user/wm-ready.target.wants/gh-notification.timer b/home/.config/systemd/user/graphical-session.target.wants/gh-notification.timer similarity index 100% rename from home/.config/systemd/user/wm-ready.target.wants/gh-notification.timer rename to home/.config/systemd/user/graphical-session.target.wants/gh-notification.timer diff --git a/home/.config/systemd/user/graphical-session.target.wants/hypridle.service b/home/.config/systemd/user/graphical-session.target.wants/hypridle.service new file mode 120000 index 0000000..55da293 --- /dev/null +++ b/home/.config/systemd/user/graphical-session.target.wants/hypridle.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/hypridle.service \ No newline at end of file diff --git a/home/.config/systemd/user/wayland-session.target.wants/hyprpaper.service b/home/.config/systemd/user/graphical-session.target.wants/hyprpaper.service similarity index 100% rename from home/.config/systemd/user/wayland-session.target.wants/hyprpaper.service rename to home/.config/systemd/user/graphical-session.target.wants/hyprpaper.service diff --git a/home/.config/systemd/user/wm-ready.target.wants/policykit-agent.service b/home/.config/systemd/user/graphical-session.target.wants/policykit-agent.service similarity index 100% rename from home/.config/systemd/user/wm-ready.target.wants/policykit-agent.service rename to home/.config/systemd/user/graphical-session.target.wants/policykit-agent.service diff --git a/home/.config/systemd/user/graphical-session.target.wants/swaync.service b/home/.config/systemd/user/graphical-session.target.wants/swaync.service new file mode 120000 index 0000000..9c6a60f --- /dev/null +++ b/home/.config/systemd/user/graphical-session.target.wants/swaync.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/swaync.service \ No newline at end of file diff --git a/home/.config/systemd/user/wayland-session.target.wants/wl-gammarelay.service b/home/.config/systemd/user/graphical-session.target.wants/wl-gammarelay.service similarity index 100% rename from home/.config/systemd/user/wayland-session.target.wants/wl-gammarelay.service rename to home/.config/systemd/user/graphical-session.target.wants/wl-gammarelay.service diff --git a/home/.config/systemd/user/hypridle.service b/home/.config/systemd/user/hypridle.service deleted file mode 100644 index f4721b5..0000000 --- a/home/.config/systemd/user/hypridle.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description="Idle management daemon" -PartOf=graphical-session.target - -[Service] -ExecStart=/usr/bin/stdbuf -oL /usr/bin/hypridle -Restart=on-failure - -[Install] -WantedBy=wayland-session.target diff --git a/home/.config/systemd/user/hypridle.service.d/override.conf b/home/.config/systemd/user/hypridle.service.d/override.conf new file mode 100644 index 0000000..e639392 --- /dev/null +++ b/home/.config/systemd/user/hypridle.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +Slice=background-graphical.slice diff --git a/home/.config/systemd/user/hyprland-monitord.service b/home/.config/systemd/user/hyprland-monitord.service index 3b2836d..90bcdfc 100644 --- a/home/.config/systemd/user/hyprland-monitord.service +++ b/home/.config/systemd/user/hyprland-monitord.service @@ -1,10 +1,13 @@ [Unit] -Description="Daemon watching for Hyprland monitor updates" -PartOf=graphical-session.target +Description=Daemon watching for Hyprland monitor updates +After=wayland-session@hyprland.desktop.target +Requires=wayland-session@hyprland.desktop.target +PartOf=wayland-session@hyprland.desktop.target [Service] ExecStart=%h/.local/bin/scripts/gui/hyprland/hyprland-monitord Restart=on-failure +Slice=background-graphical.slice [Install] -WantedBy=wayland-session.target +WantedBy=wayland-session@hyprland.desktop.target diff --git a/home/.config/systemd/user/hyprlock.service b/home/.config/systemd/user/hyprlock.service index 7e408c9..3140220 100644 --- a/home/.config/systemd/user/hyprlock.service +++ b/home/.config/systemd/user/hyprlock.service @@ -1,6 +1,6 @@ [Unit] Description=Run hyprlock screenlocker on lock dbus event (using systemd-lock-handler) -Requisite=wm-ready.target +Requisite=graphical-session.target # if hyprlock exists cleanly, enter a 'unlock' target OnSuccess=unlock.target # When lock.target is stopped, stop this unit too @@ -9,9 +9,10 @@ PartOf=lock.target [Service] ExecStart=/usr/bin/hyprlock StandardOutput=journal -ExecStop=/bin/kill -s SIGUSR1 $MAINPID ExecStopPost=/bin/loginctl unlock-session Restart=on-failure +Slice=background-graphical.slice [Install] WantedBy=lock.target + diff --git a/home/.config/systemd/user/hyprpaper.service b/home/.config/systemd/user/hyprpaper.service deleted file mode 100644 index ae0545e..0000000 --- a/home/.config/systemd/user/hyprpaper.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description="Hyprpaper (Hyprland wallpaper daemon" -PartOf=graphical-session.target -After=graphical-session.target - -[Service] -Type=simple -ExecStart=/usr/bin/hyprpaper -Restart=on-failure - -[Install] -WantedBy=wayland-session.target diff --git a/home/.config/systemd/user/hyprpaper.service.d/override.conf b/home/.config/systemd/user/hyprpaper.service.d/override.conf new file mode 100644 index 0000000..ac8a77e --- /dev/null +++ b/home/.config/systemd/user/hyprpaper.service.d/override.conf @@ -0,0 +1,3 @@ +[Service] +ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "Hyprland" "" +Slice=background-graphical.slice diff --git a/home/.config/systemd/user/policykit-agent.service b/home/.config/systemd/user/policykit-agent.service index 2523617..5f7d9c7 100644 --- a/home/.config/systemd/user/policykit-agent.service +++ b/home/.config/systemd/user/policykit-agent.service @@ -1,10 +1,13 @@ [Unit] Description="PolicyKit authentication agent" +After=graphical-session.target +Requires=graphical-session.target PartOf=graphical-session.target [Service] ExecStart=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 Restart=on-failure +Slice=background-graphical.slice [Install] -WantedBy=wm-ready.target +WantedBy=graphical-session.target diff --git a/home/.config/systemd/user/swaync-inhibit-lock.service b/home/.config/systemd/user/swaync-inhibit-lock.service index 8361f71..fab3e5d 100644 --- a/home/.config/systemd/user/swaync-inhibit-lock.service +++ b/home/.config/systemd/user/swaync-inhibit-lock.service @@ -4,8 +4,10 @@ Requisite=swaync.service Before=lock.target [Service] -ExecStart=/usr/bin/swaync-client --inhibitor-add screen-locker Type=oneshot +ExecStart=/usr/bin/swaync-client --inhibitor-add screen-locker +Slice=background-graphical.slice [Install] WantedBy=lock.target + diff --git a/home/.config/systemd/user/swaync-inhibit-unlock.service b/home/.config/systemd/user/swaync-inhibit-unlock.service index 6b36c81..1497e13 100644 --- a/home/.config/systemd/user/swaync-inhibit-unlock.service +++ b/home/.config/systemd/user/swaync-inhibit-unlock.service @@ -4,8 +4,9 @@ Requisite=swaync.service After=unlock.target [Service] -ExecStart=/usr/bin/swaync-client --inhibitor-remove screen-locker Type=oneshot +ExecStart=/usr/bin/swaync-client --inhibitor-remove screen-locker +Slice=background-graphical.slice [Install] WantedBy=unlock.target diff --git a/home/.config/systemd/user/swaync.service b/home/.config/systemd/user/swaync.service deleted file mode 100644 index e26d41e..0000000 --- a/home/.config/systemd/user/swaync.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description="Swaync daemon" -PartOf=graphical-session.target - -[Service] -ExecStart=/usr/bin/swaync -Restart=on-failure - -[Install] -WantedBy=wayland-session.target diff --git a/home/.config/systemd/user/swaync.service.d/override.conf b/home/.config/systemd/user/swaync.service.d/override.conf new file mode 100644 index 0000000..e639392 --- /dev/null +++ b/home/.config/systemd/user/swaync.service.d/override.conf @@ -0,0 +1,2 @@ +[Service] +Slice=background-graphical.slice diff --git a/home/.config/systemd/user/wayland-session.target b/home/.config/systemd/user/wayland-session.target deleted file mode 100644 index e7b42ca..0000000 --- a/home/.config/systemd/user/wayland-session.target +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=Waylnad compositor loaded and ready -BindsTo=wm-ready.target -Wants=xdg-desktop-portal.service -Wants=xdg-desktop-portal-hyprland.service -Wants=systemd-lock-handler.service diff --git a/home/.config/systemd/user/wayland-session.target.wants/hypridle.service b/home/.config/systemd/user/wayland-session.target.wants/hypridle.service deleted file mode 120000 index 0646888..0000000 --- a/home/.config/systemd/user/wayland-session.target.wants/hypridle.service +++ /dev/null @@ -1 +0,0 @@ -/home/itsdrike/.config/systemd/user/hypridle.service \ No newline at end of file diff --git a/home/.config/systemd/user/wayland-session.target.wants/hyprland-monitord.service b/home/.config/systemd/user/wayland-session@hyprland.desktop.target.wants/hyprland-monitord.service similarity index 100% rename from home/.config/systemd/user/wayland-session.target.wants/hyprland-monitord.service rename to home/.config/systemd/user/wayland-session@hyprland.desktop.target.wants/hyprland-monitord.service diff --git a/home/.config/systemd/user/wl-gammarelay.service b/home/.config/systemd/user/wl-gammarelay.service index 86e8ff7..2a026fb 100644 --- a/home/.config/systemd/user/wl-gammarelay.service +++ b/home/.config/systemd/user/wl-gammarelay.service @@ -1,10 +1,13 @@ [Unit] -Description="Redshift and brightness control for Wayland" -BindsTo=wayland-session.target +Description=Redshift and brightness control for Wayland +After=graphical-session.target +Requires=graphical-session.target +PartOf=graphical-session.target [Service] ExecStart=/usr/bin/wl-gammarelay-rs run Restart=on-failure +Slice=background-graphical.slice [Install] -WantedBy=wayland-session.target +WantedBy=graphical-session.target diff --git a/home/.config/systemd/user/wm-ready.target b/home/.config/systemd/user/wm-ready.target deleted file mode 100644 index 33ae807..0000000 --- a/home/.config/systemd/user/wm-ready.target +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Window Manager loaded and ready -BindsTo=graphical-session.target -Wants=wireplumber.service -Wants=pipewire-pulse.socket -Wants=usbguard-notifier.service -Wants=gnome-keyring-daemon.service diff --git a/home/.config/uwsm/default-id b/home/.config/uwsm/default-id new file mode 100644 index 0000000..1dd96b8 --- /dev/null +++ b/home/.config/uwsm/default-id @@ -0,0 +1 @@ +hyprland-uwsm.desktop diff --git a/home/.config/uwsm/env b/home/.config/uwsm/env new file mode 100644 index 0000000..545b154 --- /dev/null +++ b/home/.config/uwsm/env @@ -0,0 +1,3 @@ +#!/bin/bash + +source "$HOME"/.config/shell/environment diff --git a/install_gui.sh b/install_gui.sh index a799dc9..47ec471 100755 --- a/install_gui.sh +++ b/install_gui.sh @@ -99,7 +99,8 @@ paru -S --noconfirm --needed \ # Wayland WM essentials paru -S --noconfirm --needed \ - wl-clipboard xdg-desktop-portal xdg-desktop-portal-gtk qt5-wayland qt6-wayland wev wl-gammarelay-rs wdisplays + wl-clipboard xdg-desktop-portal xdg-desktop-portal-gtk qt5-wayland qt6-wayland wev wl-gammarelay-rs wdisplays \ + uwsm # Utilities paru -S --noconfirm --needed \ diff --git a/root/etc/greetd/config.toml b/root/etc/greetd/config.toml index 3bb1a06..2ac1c1a 100644 --- a/root/etc/greetd/config.toml +++ b/root/etc/greetd/config.toml @@ -7,7 +7,7 @@ vt = 1 # If the user logs out, greetd will render the default session [initial_session] user = "itsdrike" -command = "/usr/local/bin/greetd-session-wrapper Hyprland" +command = "/usr/local/bin/greetd-session-wrapper uwsm start hyprland.desktop" # The default session, also known as the greeter. [default_session] From 35dceab233e3c833ee522548eb509d4125a569ec Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 22:44:57 +0100 Subject: [PATCH 02/10] Fix hypridle config typo --- home/.config/hypr/hypridle.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.config/hypr/hypridle.conf b/home/.config/hypr/hypridle.conf index 63be9da..12557f2 100644 --- a/home/.config/hypr/hypridle.conf +++ b/home/.config/hypr/hypridle.conf @@ -47,7 +47,7 @@ listener { # On low battery, or after HibernateDelaySec (/etc/systemd/sleep.conf), the system # will enter full hibernation listener { - timeout = 600, + timeout = 600 on-timeout = systemctl suspend-then-hibernate } From d68284ed85484df623c68eed650cbdd1224d4fbf Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 22:49:19 +0100 Subject: [PATCH 03/10] Use bash compliant syntax for extending PATH --- home/.config/shell/environment | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/home/.config/shell/environment b/home/.config/shell/environment index c923617..03369a7 100755 --- a/home/.config/shell/environment +++ b/home/.config/shell/environment @@ -8,18 +8,17 @@ # which means the XDG definitions will be ignored anyway, and # defining them may break programs when root is actually logged in. - # Add all folders in ~/.local/bin into PATH # Some window managers require this line to be in profile not in .zshenv if [ -d "$HOME/.local/bin" ]; then - PATH+=":${$(find -L ~/.local/bin -type d | tr '\n' ':')%%:}" + PATH+=":$(find -L ~/.local/bin -type d | tr '\n' ':' | sed 's/:$//')" fi if [ -d "$HOME/.local/share/npm/bin" ]; then - PATH+=":$HOME/.local/share/npm/bin" + PATH+=":$HOME/.local/share/npm/bin" fi -# Prepend rye shims to PATH, to have rye python executables +# Prepend rye shims to PATH, to have rye python executables # take priority over the system-wide python. if [ -d "${RYE_HOME:-$HOME/.rye}/shims" ]; then PATH="${RYE_HOME:-$HOME/.rye}/shims:$PATH" From 1abeb1e9ab8480722e25b6dcfdf0b5b350dea6c2 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 22:49:42 +0100 Subject: [PATCH 04/10] Add omnisharp home XDG envvar --- home/.config/shell/environment | 1 + 1 file changed, 1 insertion(+) diff --git a/home/.config/shell/environment b/home/.config/shell/environment index 03369a7..5a90cef 100755 --- a/home/.config/shell/environment +++ b/home/.config/shell/environment @@ -96,6 +96,7 @@ export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history" export DOTNET_CLI_HOME="$XDG_DATA_HOME/dotnet" export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter" export RYE_HOME="$XDG_CONFIG_HOME/rye" +export OMNISHARPHOME="$XDG_CONFIG_HOME"/omnisharp # Theming export GTK_THEME="Tokyonight-Dark" From fbc693674db87dd52e0e12c0e601bf841dfc0ac6 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 23:05:50 +0100 Subject: [PATCH 05/10] Adjust systemd services to work better with UWSM --- home/.config/systemd/user/battery-notification.service | 1 - home/.config/systemd/user/clipman.service | 1 - home/.config/systemd/user/eww-window@.service | 3 +++ home/.config/systemd/user/eww.service | 5 ++++- home/.config/systemd/user/gh-notification.service | 1 - home/.config/systemd/user/hyprland-monitord.service | 3 ++- home/.config/systemd/user/policykit-agent.service | 1 - home/.config/systemd/user/wl-gammarelay.service | 1 - 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/home/.config/systemd/user/battery-notification.service b/home/.config/systemd/user/battery-notification.service index c9dfbd8..bb03ae7 100644 --- a/home/.config/systemd/user/battery-notification.service +++ b/home/.config/systemd/user/battery-notification.service @@ -1,7 +1,6 @@ [Unit] Description=Show a notification when the battery is low Requires=graphical-session.target -PartOf=graphical-session.target [Service] Type=oneshot diff --git a/home/.config/systemd/user/clipman.service b/home/.config/systemd/user/clipman.service index 03ed28f..a0815bb 100644 --- a/home/.config/systemd/user/clipman.service +++ b/home/.config/systemd/user/clipman.service @@ -2,7 +2,6 @@ Description=Clipman clipboard manager After=graphical-session.target Requires=graphical-session.target -PartOf=graphical-session.target [Service] ExecStart=/usr/bin/wl-paste -t text --watch /usr/bin/clipman store --no-persist diff --git a/home/.config/systemd/user/eww-window@.service b/home/.config/systemd/user/eww-window@.service index 341cf31..158eb1f 100644 --- a/home/.config/systemd/user/eww-window@.service +++ b/home/.config/systemd/user/eww-window@.service @@ -1,6 +1,8 @@ [Unit] Description=Open %I eww window +After=graphical-session.target After=eww.service +PartOf=eww.service [Service] Type=oneshot @@ -10,6 +12,7 @@ ExecStop=/usr/bin/eww close %i RemainAfterExit=true Restart=on-failure RestartSec=3s +Slice=background-graphical.slice [Install] WantedBy=graphical-session.target diff --git a/home/.config/systemd/user/eww.service b/home/.config/systemd/user/eww.service index 56fe6c3..c4038f2 100644 --- a/home/.config/systemd/user/eww.service +++ b/home/.config/systemd/user/eww.service @@ -1,6 +1,9 @@ [Unit] Description=Eww daemon -PartOf=graphical-session.target +After=graphical-session.target +After=pipewire.service +Requires=graphical-session.target +Requires=pipewire.service [Service] ExecStart=/usr/bin/eww daemon --no-daemonize diff --git a/home/.config/systemd/user/gh-notification.service b/home/.config/systemd/user/gh-notification.service index c72e9fe..c4cabf0 100644 --- a/home/.config/systemd/user/gh-notification.service +++ b/home/.config/systemd/user/gh-notification.service @@ -1,7 +1,6 @@ [Unit] Description=Show unread GitHub notifications Requires=graphical-session.target -PartOf=graphical-session.target [Service] Type=oneshot diff --git a/home/.config/systemd/user/hyprland-monitord.service b/home/.config/systemd/user/hyprland-monitord.service index 90bcdfc..b954eaf 100644 --- a/home/.config/systemd/user/hyprland-monitord.service +++ b/home/.config/systemd/user/hyprland-monitord.service @@ -1,8 +1,9 @@ [Unit] Description=Daemon watching for Hyprland monitor updates After=wayland-session@hyprland.desktop.target +After=eww.service +Requires=eww.service Requires=wayland-session@hyprland.desktop.target -PartOf=wayland-session@hyprland.desktop.target [Service] ExecStart=%h/.local/bin/scripts/gui/hyprland/hyprland-monitord diff --git a/home/.config/systemd/user/policykit-agent.service b/home/.config/systemd/user/policykit-agent.service index 5f7d9c7..a41b847 100644 --- a/home/.config/systemd/user/policykit-agent.service +++ b/home/.config/systemd/user/policykit-agent.service @@ -2,7 +2,6 @@ Description="PolicyKit authentication agent" After=graphical-session.target Requires=graphical-session.target -PartOf=graphical-session.target [Service] ExecStart=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 diff --git a/home/.config/systemd/user/wl-gammarelay.service b/home/.config/systemd/user/wl-gammarelay.service index 2a026fb..3ce392a 100644 --- a/home/.config/systemd/user/wl-gammarelay.service +++ b/home/.config/systemd/user/wl-gammarelay.service @@ -2,7 +2,6 @@ Description=Redshift and brightness control for Wayland After=graphical-session.target Requires=graphical-session.target -PartOf=graphical-session.target [Service] ExecStart=/usr/bin/wl-gammarelay-rs run From bcff64f0fce952ed066e27599db0b83467a8643d Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 23:19:32 +0100 Subject: [PATCH 06/10] Make hyprland-monitord start eww windows with systemd --- home/.config/hyprland-monitord/added.sh | 3 ++- home/.config/hyprland-monitord/init.sh | 8 ++++++-- home/.config/hyprland-monitord/removed.sh | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/home/.config/hyprland-monitord/added.sh b/home/.config/hyprland-monitord/added.sh index 2ae53cb..41a6f90 100755 --- a/home/.config/hyprland-monitord/added.sh +++ b/home/.config/hyprland-monitord/added.sh @@ -5,4 +5,5 @@ MONITOR_ID="$1" MONITOR_NAME="$2" MONITOR_DESCRIPTION="$3" -eww open bar1 +systemctl --user start eww-window@bar1.service +#eww open bar1 diff --git a/home/.config/hyprland-monitord/init.sh b/home/.config/hyprland-monitord/init.sh index 4236d92..23fffde 100755 --- a/home/.config/hyprland-monitord/init.sh +++ b/home/.config/hyprland-monitord/init.sh @@ -9,11 +9,15 @@ if [ "$MONITORS_AMT" -lt 1 ]; then fi if [ "$MONITORS_AMT" -eq 2 ]; then - eww open bar1 + systemctl --user start eww-window@bar1.service + #eww open bar1 fi if [ "$MONITORS_AMT" -eq 1 ]; then - eww active-windows | grep "bar1" && eww close bar1 + if eww active-windows | grep "bar1"; then + systemctl --user stop eww-window@bar1.service + #eww close bar1 + fi fi if [ "$MONITORS_AMT" -gt 2 ]; then diff --git a/home/.config/hyprland-monitord/removed.sh b/home/.config/hyprland-monitord/removed.sh index e9b0900..b9b7a10 100755 --- a/home/.config/hyprland-monitord/removed.sh +++ b/home/.config/hyprland-monitord/removed.sh @@ -3,4 +3,5 @@ set -euo pipefail MONITOR_NAME="$1" -eww close bar1 +systemctl --user stop eww-window@bar1.service +# eww close bar1 From c51ae232c674e2240fb782a4aec574ea6bcbf885 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 23:28:39 +0100 Subject: [PATCH 07/10] Run keybind apps through uwsm app --- home/.config/hypr/hyprland.d/keybinds.conf | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/home/.config/hypr/hyprland.d/keybinds.conf b/home/.config/hypr/hyprland.d/keybinds.conf index d794599..728acae 100644 --- a/home/.config/hypr/hyprland.d/keybinds.conf +++ b/home/.config/hypr/hyprland.d/keybinds.conf @@ -23,23 +23,23 @@ bind = SUPER_SHIFT, S, layoutmsg, togglesplit # ### PROGRAMS ### # ################ -bind = SUPER, R, exec, wofi --show drun -bind = SUPER_SHIFT, Return, exec, wofi --show run -bind = SUPER_SHIFT, V, exec, clipman pick -t wofi +bind = SUPER, R, exec, uwsm app wofi --show drun +bind = SUPER_SHIFT, Return, exec, uwsm app wofi --show run +bind = SUPER_SHIFT, V, exec, uwsm clipman pick -t wofi -bind = SUPER, Return, exec, kitty -bind = SUPER, X, exec, pcmanfm-qt -bind = SUPER, B, exec, firefox -bind = SUPER, C, exec, qalculate-gtk -bind = , XF86Calculator, exec, qalculate-gtk +bind = SUPER, Return, exec, uwsm app kitty +bind = SUPER, X, exec, uwsm app pcmanfm-qt +bind = SUPER, B, exec, uwsm app firefox +bind = SUPER, C, exec, uwsm app qalculate-gtk +bind = , XF86Calculator, exec, uwsm app qalculate-gtk # ##################### # ### DE/WM CONTROL ### # ##################### -bind = SUPER_SHIFT, Q, exec, menuquit +bind = SUPER_SHIFT, Q, exec, uwsm app menuquit bind = SUPER_CTRL, L, exec, loginctl lock-session -bind = SUPER_SHIFT, L, exec, wlogout -p layer-shell +bind = SUPER_SHIFT, L, exec, uwsm app wlogout -p layer-shell bind = SUPER_SHIFT, T, exec, toggle-idle # ################### @@ -63,8 +63,8 @@ bind = SUPER_ALT, Print, exec, ocr && notify-send "OCR" "Text copied to clipboar # XF86Favorites key for recording # (don't question me, I had it free) -bind = , 164, exec, quick-record --notify toggle -bind = SUPER, 164, exec, quick-record toggle +bind = , 164, exec, uwsm app quick-record --notify toggle +bind = SUPER, 164, exec, uwsm app quick-record toggle # ##################### # ### NOTIFICATIONS ### From 409723adf6716c54711dbb424f881db0a2c93f07 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 24 Feb 2025 23:29:17 +0100 Subject: [PATCH 08/10] Mention binding to quit keybind isolation in notif --- home/.config/hypr/hyprland.d/keybinds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.config/hypr/hyprland.d/keybinds.conf b/home/.config/hypr/hyprland.d/keybinds.conf index 728acae..ad0028b 100644 --- a/home/.config/hypr/hyprland.d/keybinds.conf +++ b/home/.config/hypr/hyprland.d/keybinds.conf @@ -283,7 +283,7 @@ bind = CTRL, F10, pass, ^(com\.obsproject\.Studio)$ # Isolating group to prevent keybind capturing (for games etc) # SUPER + End -bind = SUPER, End, exec, hyprctl dispatch submap isolate && notify-send "Keybind isolation" "Keybind isolation on" +bind = SUPER, End, exec, hyprctl dispatch submap isolate && notify-send "Keybind isolation" "Keybind isolation on (Super + END to disable)" submap = isolate bind = SUPER, End, exec, hyprctl dispatch submap reset && notify-send "Keybind isolation" "Keybind isolation off" submap = reset From fcf1762b1ccdd979deb812dd50be060b66b7f3d4 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 25 Feb 2025 00:07:59 +0100 Subject: [PATCH 09/10] Fix UWSM app launching --- home/.config/hypr/hyprland.d/keybinds.conf | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/home/.config/hypr/hyprland.d/keybinds.conf b/home/.config/hypr/hyprland.d/keybinds.conf index ad0028b..941e987 100644 --- a/home/.config/hypr/hyprland.d/keybinds.conf +++ b/home/.config/hypr/hyprland.d/keybinds.conf @@ -23,23 +23,22 @@ bind = SUPER_SHIFT, S, layoutmsg, togglesplit # ### PROGRAMS ### # ################ -bind = SUPER, R, exec, uwsm app wofi --show drun -bind = SUPER_SHIFT, Return, exec, uwsm app wofi --show run -bind = SUPER_SHIFT, V, exec, uwsm clipman pick -t wofi +bind = SUPER, R, exec, uwsm app -- $(uwsm app -- wofi --show drun --define=drun-print_desktop_file=true) +bind = SUPER_SHIFT, V, exec, uwsm app -- clipman pick -t wofi -bind = SUPER, Return, exec, uwsm app kitty -bind = SUPER, X, exec, uwsm app pcmanfm-qt -bind = SUPER, B, exec, uwsm app firefox -bind = SUPER, C, exec, uwsm app qalculate-gtk -bind = , XF86Calculator, exec, uwsm app qalculate-gtk +bind = SUPER, Return, exec, uwsm app -- kitty +bind = SUPER, X, exec, uwsm app -- pcmanfm-qt +bind = SUPER, B, exec, uwsm app -- firefox +bind = SUPER, C, exec, uwsm app -- qalculate-gtk +bind = , XF86Calculator, exec, uwsm app -- qalculate-gtk # ##################### # ### DE/WM CONTROL ### # ##################### -bind = SUPER_SHIFT, Q, exec, uwsm app menuquit +bind = SUPER_SHIFT, Q, exec, uwsm app -- menuquit bind = SUPER_CTRL, L, exec, loginctl lock-session -bind = SUPER_SHIFT, L, exec, uwsm app wlogout -p layer-shell +bind = SUPER_SHIFT, L, exec, uwsm app -- wlogout -p layer-shell bind = SUPER_SHIFT, T, exec, toggle-idle # ################### @@ -63,8 +62,8 @@ bind = SUPER_ALT, Print, exec, ocr && notify-send "OCR" "Text copied to clipboar # XF86Favorites key for recording # (don't question me, I had it free) -bind = , 164, exec, uwsm app quick-record --notify toggle -bind = SUPER, 164, exec, uwsm app quick-record toggle +bind = , 164, exec, uwsm app -- quick-record --notify toggle +bind = SUPER, 164, exec, uwsm -- app quick-record toggle # ##################### # ### NOTIFICATIONS ### From ee9469230fd33b73a5689c82527131ea0967899f Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 25 Feb 2025 00:19:56 +0100 Subject: [PATCH 10/10] Use systemd in toggle-idle --- .../bin/scripts/gui/hyprland/toggle-idle | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/home/.local/bin/scripts/gui/hyprland/toggle-idle b/home/.local/bin/scripts/gui/hyprland/toggle-idle index 4edf63c..ecc1361 100755 --- a/home/.local/bin/scripts/gui/hyprland/toggle-idle +++ b/home/.local/bin/scripts/gui/hyprland/toggle-idle @@ -1,18 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -idleprog="hypridle" # or swayidle +serv="hypridle.service" -pid="$(pidof "$idleprog" || true)" -if [ -n "$pid" ]; then - # is process suspended? - if ps -o stat= -p "$pid" | grep T >/dev/null; then - kill -CONT "$pid" - notify-send "Idle-Toggle" "Idle timeouts enabled" - else - kill -STOP "$pid" - notify-send "Idle-Toggle" "Idle timeouts disabled" - fi +if systemctl --user is-active --quiet "$serv"; then + systemctl --user stop "$serv" + notify-send "Idle-Toggle" "Idle timeouts disabled" else - notify-send "Idle-Toggle" "$idleprog not running!" + systemctl --user start "$serv" + notify-send "Idle-Toggle" "Idle timeouts enabled" fi