diff options
| -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 |
