November 11 2023 update
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
-- {{{ Modules
|
||||
local awful = require("awful")
|
||||
|
||||
local options = require("options")
|
||||
-- }}}
|
||||
|
||||
-- {{{ Variables
|
||||
@@ -27,25 +29,31 @@ local function kill_apps()
|
||||
end
|
||||
end
|
||||
|
||||
local function restart()
|
||||
kill_apps()
|
||||
awesome.restart()
|
||||
end
|
||||
|
||||
local function quit()
|
||||
kill_apps()
|
||||
awesome.quit()
|
||||
end
|
||||
|
||||
local function start()
|
||||
for _, cmd in ipairs(start_applications) do
|
||||
awful.spawn.single_instance(cmd)
|
||||
end
|
||||
end
|
||||
|
||||
local function restart()
|
||||
kill_apps()
|
||||
awesome.restart()
|
||||
awful.spawn(options.terminal .. "-e xmodmap ~/.Xmodmap")
|
||||
end
|
||||
-- }}}
|
||||
|
||||
--- {{{ Script
|
||||
for _, cmd in ipairs(start_applications) do
|
||||
awful.spawn.single_instance(cmd)
|
||||
end
|
||||
start()
|
||||
|
||||
return {
|
||||
kill_apps = kill_apps,
|
||||
restart = restart,
|
||||
start = start,
|
||||
quit = quit
|
||||
}
|
||||
-- }}}
|
||||
|
@@ -19,21 +19,21 @@ local function spawnIfNoInstance(command, class)
|
||||
end
|
||||
|
||||
local function work_apps()
|
||||
spawnIfNoInstance("slack", "Slack")
|
||||
spawnIfNoInstance("firefox --class WorkFirefox", "WorkFirefox")
|
||||
spawnIfNoInstance("brave", "Brave")
|
||||
spawnIfNoInstance("phpstorm", "jetbrains-phpstorm")
|
||||
spawnIfNoInstance("sh -c 'alacritty --class WorkAlacritty -e tmux new-session -c ~/repos/rockar-peppermint'", "WorkAlacritty")
|
||||
awful.spawn.with_shell("cd ~/repos/rockar-peppermint; make up")
|
||||
--spawnIfNoInstance("slack", "Slack")
|
||||
--spawnIfNoInstance("firefox --class WorkFirefox", "WorkFirefox")
|
||||
--spawnIfNoInstance("brave", "Brave")
|
||||
--spawnIfNoInstance("phpstorm", "jetbrains-phpstorm")
|
||||
--spawnIfNoInstance("sh -c 'alacritty --class WorkAlacritty -e tmux new-session -c ~/repos'", "WorkAlacritty")
|
||||
--awful.spawn.with_shell("cd ~/repos/rockar-peppermint; make up")
|
||||
--spawnIfNoInstance("dbeaver", "DBeaver")
|
||||
end
|
||||
|
||||
local function end_work()
|
||||
awful.spawn("pkill slack")
|
||||
awful.spawn("xdotool search --class jetbrains-phpstorm windowkill")
|
||||
awful.spawn("xdotool search --class WorkAlacritty windowquit")
|
||||
awful.spawn("xdotool search --class WorkFirefox windowkill")
|
||||
awful.spawn.with_shell("cd ~/repos/rockar-peppermint; make stop")
|
||||
--awful.spawn("pkill slack")
|
||||
--awful.spawn("xdotool search --class jetbrains-phpstorm windowkill")
|
||||
--awful.spawn("xdotool search --class WorkAlacritty windowquit")
|
||||
--awful.spawn("xdotool search --class WorkFirefox windowkill")
|
||||
--awful.spawn.with_shell("cd ~/repos/rockar-peppermint; make stop")
|
||||
-- Dbeaver requires to be killed twice
|
||||
--awful.spawn("xdotool search --class DBeaver windowkill")
|
||||
--awful.spawn("xdotool search --class DBeaver windowkill")
|
||||
|
@@ -62,29 +62,29 @@ awful.rules.rules = {
|
||||
}, properties = { tag = "1" }
|
||||
},
|
||||
|
||||
{ rule_any = {class = { "WorkFirefox" }
|
||||
}, properties = { tag = "1" }
|
||||
},
|
||||
|
||||
{ rule_any = {class = { "WorkAlacritty" }
|
||||
}, properties = { tag = "2" }
|
||||
},
|
||||
|
||||
{ rule_any = {class = { "jetbrains-phpstorm" }
|
||||
}, properties = { tag = "3" }
|
||||
},
|
||||
|
||||
{ rule_any = {class = { "DBeaver" }
|
||||
}, properties = { tag = "9" }
|
||||
},
|
||||
|
||||
{ rule_any = {
|
||||
class = { "DBeaver" },
|
||||
}, properties = { tag = "9" }
|
||||
},
|
||||
|
||||
{ rule_any = {class = { "Slack" }
|
||||
}, properties = { tag = "0" }
|
||||
},
|
||||
-- { rule_any = {class = { "WorkFirefox" }
|
||||
-- }, properties = { tag = "1" }
|
||||
-- },
|
||||
--
|
||||
-- { rule_any = {class = { "WorkAlacritty" }
|
||||
-- }, properties = { tag = "2" }
|
||||
-- },
|
||||
--
|
||||
-- { rule_any = {class = { "jetbrains-phpstorm" }
|
||||
-- }, properties = { tag = "3" }
|
||||
-- },
|
||||
--
|
||||
-- { rule_any = {class = { "DBeaver" }
|
||||
-- }, properties = { tag = "9" }
|
||||
-- },
|
||||
--
|
||||
-- { rule_any = {
|
||||
-- class = { "DBeaver" },
|
||||
-- }, properties = { tag = "9" }
|
||||
-- },
|
||||
--
|
||||
-- { rule_any = {class = { "Slack" }
|
||||
-- }, properties = { tag = "0" }
|
||||
-- },
|
||||
}
|
||||
-- }}}
|
||||
|
Reference in New Issue
Block a user