Browse Source

autostart workspace app

pull/1/head
parent
commit
a3a68a35c8
2 changed files with 10 additions and 5 deletions
  1. +8
    -3
      files/bin/on-focus-workspace
  2. +2
    -2
      files/bin/on-space-shortcut

+ 8
- 3
files/bin/on-focus-workspace View File

@@ -5,10 +5,15 @@ if count $argv
else else
set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name') set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
end end
set script ~/.workspaces/$ws.focus


if type -q $script
$script
set focus_script ~/.workspaces/$ws.focus
if type -q $focus_script
$focus_script
else else
i3-msg mode default i3-msg mode default
end end

set space_script ~/.workspaces/$ws.space
if type -q $space_script
systemctl --user start workspace-app@$ws.service
end

+ 2
- 2
files/bin/on-space-shortcut View File

@@ -1,8 +1,8 @@
#!/usr/bin/fish #!/usr/bin/fish


set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name') set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
set script ~/.workspaces/$ws.space


if type -q $script
set space_script ~/.workspaces/$ws.space
if type -q $space_script
systemctl --user restart workspace-app@$ws.service systemctl --user restart workspace-app@$ws.service
end end