1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2026-03-23 05:55:12 +00:00

auto change theme at start

This commit is contained in:
Crescent617 2024-09-26 13:12:16 +08:00
parent ed41889d27
commit ec1ae2cf76

55
rc.lua
View file

@ -98,6 +98,7 @@ awful.spawn.with_shell(
-- Change keymaps -- Change keymaps
awful.spawn.with_shell "if [ -f ~/.Xmodmap ]; then xmodmap ~/.Xmodmap; fi" awful.spawn.with_shell "if [ -f ~/.Xmodmap ]; then xmodmap ~/.Xmodmap; fi"
awful.spawn.with_shell "[ -f ~/scripts/auto_change_color_scheme.sh ] && sh ~/scripts/auto_change_color_scheme.sh"
-- }}} -- }}}
-- {{{ Variable definitions -- {{{ Variable definitions
@ -532,33 +533,33 @@ globalkeys = mytable.join(
-- {description = "volume 0%", group = "hotkeys"}), -- {description = "volume 0%", group = "hotkeys"}),
-- MPD control -- MPD control
awful.key({ altkey, "Control" }, "Up", function() -- awful.key({ altkey, "Control" }, "Up", function()
os.execute "mpc toggle" -- os.execute "mpc toggle"
beautiful.mpd.update() -- beautiful.mpd.update()
end, { description = "mpc toggle", group = "widgets" }), -- end, { description = "mpc toggle", group = "widgets" }),
awful.key({ altkey, "Control" }, "Down", function() -- awful.key({ altkey, "Control" }, "Down", function()
os.execute "mpc stop" -- os.execute "mpc stop"
beautiful.mpd.update() -- beautiful.mpd.update()
end, { description = "mpc stop", group = "widgets" }), -- end, { description = "mpc stop", group = "widgets" }),
awful.key({ altkey, "Control" }, "Left", function() -- awful.key({ altkey, "Control" }, "Left", function()
os.execute "mpc prev" -- os.execute "mpc prev"
beautiful.mpd.update() -- beautiful.mpd.update()
end, { description = "mpc prev", group = "widgets" }), -- end, { description = "mpc prev", group = "widgets" }),
awful.key({ altkey, "Control" }, "Right", function() -- awful.key({ altkey, "Control" }, "Right", function()
os.execute "mpc next" -- os.execute "mpc next"
beautiful.mpd.update() -- beautiful.mpd.update()
end, { description = "mpc next", group = "widgets" }), -- end, { description = "mpc next", group = "widgets" }),
awful.key({ altkey }, "0", function() -- awful.key({ altkey }, "0", function()
local common = { text = "MPD widget ", position = "top_middle", timeout = 2 } -- local common = { text = "MPD widget ", position = "top_middle", timeout = 2 }
if beautiful.mpd.timer.started then -- if beautiful.mpd.timer.started then
beautiful.mpd.timer:stop() -- beautiful.mpd.timer:stop()
common.text = common.text .. lain.util.markup.bold "OFF" -- common.text = common.text .. lain.util.markup.bold "OFF"
else -- else
beautiful.mpd.timer:start() -- beautiful.mpd.timer:start()
common.text = common.text .. lain.util.markup.bold "ON" -- common.text = common.text .. lain.util.markup.bold "ON"
end -- end
naughty.notify(common) -- naughty.notify(common)
end, { description = "mpc on/off", group = "widgets" }), -- end, { description = "mpc on/off", group = "widgets" }),
-- Copy primary to clipboard (terminals to gtk) -- Copy primary to clipboard (terminals to gtk)
-- awful.key({ modkey }, "c", function() -- awful.key({ modkey }, "c", function()