瀏覽代碼

autostart workspace app

pull/1/head
父節點
當前提交
a3a68a35c8
共有 2 個檔案被更改,包括 10 行新增5 行删除
  1. +8
    -3
      files/bin/on-focus-workspace
  2. +2
    -2
      files/bin/on-space-shortcut

+ 8
- 3
files/bin/on-focus-workspace 查看文件

@@ -5,10 +5,15 @@ if count $argv
else
set ws (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.focused == true).name')
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
i3-msg mode default
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 查看文件

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

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
end