diff --git a/debian/changelog b/debian/changelog index 06f2ea6..24b9aa5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +tileos-settings-sway (1.0~tileos) unstable; urgency=medium + + * Move some scripts and commands back to Sway config + + -- Aleksey Samoilov Sat, 16 Sep 2023 11:53:16 +0400 + tileos-settings-sway (0.44~tileos) unstable; urgency=medium * Adjust PCmanFM-Qt window diff --git a/etc/sway/config.d/40-autostart-applications.conf b/etc/sway/config.d/40-autostart-applications.conf index 64cb6cb..4108daf 100644 --- a/etc/sway/config.d/40-autostart-applications.conf +++ b/etc/sway/config.d/40-autostart-applications.conf @@ -9,9 +9,14 @@ exec { $help_menu $cliphist_store $cliphist_watch + $autoname_workspaces + $switch_toplevel + $pcmanfm_daemon } exec_always { $kanshi + $nwg_drawer_daemon $watch_playerctl + $calendar_daemon $update_rofi_theme } diff --git a/etc/sway/variables b/etc/sway/variables index d214484..9e785fe 100644 --- a/etc/sway/variables +++ b/etc/sway/variables @@ -94,18 +94,33 @@ set $wlsunset '[ -x "$(command -v wlsunset)" ] && /usr/share/sway/scripts/sunset # Autotiling script set $autotiling '[ -x "$(command -v autotiling)" ] && autotiling -w 1 3 5 7 9' +# Automatic workspace names +set $autoname_workspaces '[ -f /usr/share/sway/scripts/autoname-workspaces.py ] && /usr/share/sway/scripts/autoname-workspaces.py' + +# switch between top-level containers (windows) in a workspace +set $switch_toplevel '[ -f /usr/share/sway/scripts/switch-top-level.py ] && /usr/share/sway/scripts/switch-top-level.py' + # restart kanshi https://github.com/emersion/kanshi/issues/43#issuecomment-531679213 set $kanshi '[ -x "$(command -v kanshi)" ] && pkill kanshi; exec kanshi' +# Start PCmanFM-Qt as a daemon +set $pcmanfm_daemon '[ -x "$(command -v pcmanfm)" ] && pcmanfm-qt -d' + # Clipboard manager set $cliphist_store '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch cliphist store' set $cliphist_watch '[ -x "$(command -v wl-paste)" ] && [ -x "$(command -v cliphist)" ] && wl-paste --watch pkill -RTMIN+9 waybar' +# Start nwg-drawer as a daemon +set $nwg_drawer_daemon '[ -x "$(command -v nwg-drawer)" ] && nwg-drawer -r' + # Start playerctl as daemon set $watch_playerctl '[ -x "$(command -v playerctl)" ] && pkill playerctl; playerctl -a metadata --format \'{{status}} {{title}}\' --follow | while read line; do pkill -RTMIN+5 waybar; done' # Update Rofi theme based on $rofi_theme colors set $update_rofi_theme mkdir -p $HOME/.config/rofi/ && echo $rofi_theme > $HOME/.config/rofi/config.rasi +# Start Calcurse calendar as a daemon +set $calendar_daemon 'calcurse --daemon' + # Notifications from Swappy set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh' diff --git a/usr/lib/systemd/user/autoname-workspaces.service b/usr/lib/systemd/user/autoname-workspaces.service deleted file mode 100644 index 4c2b2a7..0000000 --- a/usr/lib/systemd/user/autoname-workspaces.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Requires=sway-session.target -ConditionPathExists=/usr/share/sway/scripts/autoname-workspaces.py - -[Service] -ExecStart=/usr/share/sway/scripts/autoname-workspaces.py -Restart=on-failure -RestartSec=1 - -[Install] -WantedBy=sway-session.target diff --git a/usr/lib/systemd/user/calcurse.service b/usr/lib/systemd/user/calcurse.service deleted file mode 100644 index c6ceeff..0000000 --- a/usr/lib/systemd/user/calcurse.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Requires=sway-session.target -ConditionPathExists=/usr/bin/calcurse - -[Service] -ExecStart=/usr/bin/calcurse --daemon -Restart=on-failure -RestartSec=1 - -[Install] -WantedBy=sway-session.target diff --git a/usr/lib/systemd/user/nwg-drawer.service b/usr/lib/systemd/user/nwg-drawer.service deleted file mode 100644 index 2d7c062..0000000 --- a/usr/lib/systemd/user/nwg-drawer.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Requires=sway-session.target -ConditionPathExists=/usr/bin/nwg-drawer - -[Service] -ExecStart=/usr/bin/nwg-drawer -r -Restart=on-failure -RestartSec=1 - -[Install] -WantedBy=sway-session.target diff --git a/usr/lib/systemd/user/pcmanfm-qt.service b/usr/lib/systemd/user/pcmanfm-qt.service deleted file mode 100644 index 2e873f1..0000000 --- a/usr/lib/systemd/user/pcmanfm-qt.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Requires=sway-session.target -ConditionPathExists=/usr/bin/pcmanfm-qt - -[Service] -ExecStart=/usr/bin/pcmanfm-qt -d -Restart=on-failure -RestartSec=1 - -[Install] -WantedBy=sway-session.target diff --git a/usr/lib/systemd/user/switch-top-level.service b/usr/lib/systemd/user/switch-top-level.service deleted file mode 100644 index d2a4fe5..0000000 --- a/usr/lib/systemd/user/switch-top-level.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Requires=sway-session.target -ConditionPathExists=/usr/share/sway/scripts/switch-top-level.py - -[Service] -ExecStart=/usr/share/sway/scripts/switch-top-level.py -Restart=on-failure -RestartSec=1 - -[Install] -WantedBy=sway-session.target