Skip to content

Commit

Permalink
Merge pull request #49 from kubajaburek/master
Browse files Browse the repository at this point in the history
Don’t autostart applications with Hidden=true
  • Loading branch information
Biont authored Jul 20, 2021
2 parents 74ed255 + 0785d73 commit 3c1c563
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sway-launcher-desktop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ function list-autostart() {
BEGINFILE{
application=0;
block="";
disabled=0;
a=0
id=desktopFileID(FILENAME)
Expand All @@ -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;
}
}' \
Expand Down
7 changes: 7 additions & 0 deletions tests/data/autostart-folders/0/autostart/vim.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Version=1.0
Name=Vim
Exec=/sbin/vim
Terminal=true
Type=Application
Hidden=true
1 change: 1 addition & 0 deletions tests/data/autostart-folders/1/autostart/firefox.desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Desktop Entry]
Version=1.0
Name=Firefox
Hidden=true
GenericName=Web Browser
GenericName[ar]=متصفح ويب
GenericName[ast]=Restolador Web
Expand Down
6 changes: 6 additions & 0 deletions tests/data/autostart-folders/1/autostart/vim.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Version=1.0
Name=Vim
Exec=/sbin/vim
Terminal=true
Type=Application

0 comments on commit 3c1c563

Please sign in to comment.