diff options
| author | Moritz Meißelbach <m.meisselbach@inpsyde.com> | 2021-07-20 14:19:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-20 14:19:28 +0200 |
| commit | 3c1c56380a82116e7f22a395e2b7a3febbbecd18 (patch) | |
| tree | 36a96499d5010b03e979945cdd60ad24e4e36b9a | |
| parent | 74ed255995f5935804235daf731471a422d44075 (diff) | |
| parent | 0785d73d008e10057d7743fa79844e5b2dd2dcf7 (diff) | |
| download | sway-launcher-desktop-master.tar.gz sway-launcher-desktop-master.zip | |
Don’t autostart applications with Hidden=true
| -rwxr-xr-x | sway-launcher-desktop.sh | 4 | ||||
| -rw-r--r-- | tests/data/autostart-folders/0/autostart/vim.desktop | 7 | ||||
| -rw-r--r-- | tests/data/autostart-folders/1/autostart/firefox.desktop | 1 | ||||
| -rw-r--r-- | tests/data/autostart-folders/1/autostart/vim.desktop | 6 |
4 files changed, 17 insertions, 1 deletions
diff --git a/sway-launcher-desktop.sh b/sway-launcher-desktop.sh index 555edba..6c795be 100755 --- a/sway-launcher-desktop.sh +++ b/sway-launcher-desktop.sh @@ -227,6 +227,7 @@ function list-autostart() { BEGINFILE{ application=0; block=""; + disabled=0; a=0 id=desktopFileID(FILENAME) @@ -239,8 +240,9 @@ function list-autostart() { /^\[Desktop Entry\]/{block="entry"} /^Type=Application/{application=1} /^Name=/{ iname=$2 } + /^Hidden=true/{disabled=1} ENDFILE{ - if (application){ + if (application && !disabled){ print FILENAME; } }' \ diff --git a/tests/data/autostart-folders/0/autostart/vim.desktop b/tests/data/autostart-folders/0/autostart/vim.desktop new file mode 100644 index 0000000..21036e9 --- /dev/null +++ b/tests/data/autostart-folders/0/autostart/vim.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Version=1.0 +Name=Vim +Exec=/sbin/vim +Terminal=true +Type=Application +Hidden=true diff --git a/tests/data/autostart-folders/1/autostart/firefox.desktop b/tests/data/autostart-folders/1/autostart/firefox.desktop index c3f3b0e..df6dd74 100644 --- a/tests/data/autostart-folders/1/autostart/firefox.desktop +++ b/tests/data/autostart-folders/1/autostart/firefox.desktop @@ -1,6 +1,7 @@ [Desktop Entry] Version=1.0 Name=Firefox +Hidden=true GenericName=Web Browser GenericName[ar]=متصفح ويب GenericName[ast]=Restolador Web diff --git a/tests/data/autostart-folders/1/autostart/vim.desktop b/tests/data/autostart-folders/1/autostart/vim.desktop new file mode 100644 index 0000000..b1e6c70 --- /dev/null +++ b/tests/data/autostart-folders/1/autostart/vim.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Version=1.0 +Name=Vim +Exec=/sbin/vim +Terminal=true +Type=Application |
