From 51e0d82ce98a1d2110c3f2bab360b3d5b3d8780f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 23 Sep 2020 16:47:42 +0200 Subject: [PATCH] i3: Remove i3 autostart package The application autostart takes too long and is more intrusive than anticipated. If I want to use qutebrowser, I can just start qutebrowser on my and don't need to wait for i3 to do it for me --- especially since the starting procedure takes a while and the application starts on the wrong workspace anyways when it autostarts while I change desktops. Spotify is not installed currently and throws an error each time, so that is also not very useful. An option for this to make a return might be as automatically starting systemd services, which quickly switch to the correct workspace when the application actually starts up -- but it is probably not worth the hassle. Lastly, this let's me get rid of a script in the i3 configuration directory, which did not really belong there anyways with the XDG distinction of 'configuration' and 'data'. --- i3/.config/i3/config | 5 --- .../i3/scripts/i3-applications-autostart | 34 ------------------- 2 files changed, 39 deletions(-) delete mode 100755 i3/.config/i3/scripts/i3-applications-autostart diff --git a/i3/.config/i3/config b/i3/.config/i3/config index a5c23a1..a3bfd8f 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -199,8 +199,3 @@ for_window [class="^spotify$"] move to workspace 10 for_window [class="floating"] floating enable for_window [class="scratchpad"] floating enable for_window [class="scratchpad"] move scratchpad - -# autostart often used apps -# needs to be done like this to both automatically start the apps on correct workspace -# and not confine them there forever -exec $XDG_CONFIG_HOME/i3/scripts/i3-applications-autostart diff --git a/i3/.config/i3/scripts/i3-applications-autostart b/i3/.config/i3/scripts/i3-applications-autostart deleted file mode 100755 index 70857a1..0000000 --- a/i3/.config/i3/scripts/i3-applications-autostart +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# Wait for program coming up -wait_for_program() { - n=0 - while true; do - # PID of last background command - if xdotool search --onlyvisible --pid $! 2>/dev/null; then - break - else - if [ $n -gt 200 ]; then - notify-send -u critical "Error during start: last program $! did not start fast enough" - break - else - n=$((n + 1)) - sleep 0.1 - fi - fi - done -} - -i3-msg "workspace number 2" -alacritty & -wait_for_program - -i3-msg "workspace number 10" -spotify & -wait_for_program - -i3-msg "workspace number 1" -qutebrowser & -wait_for_program - -i3-msg "workspace number 3"