mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-01-25 09:37:14 +08:00
Change performance_mode app function to compositor toggling script
This commit is contained in:
parent
20f3fcab06
commit
412e838e0e
2 changed files with 5 additions and 12 deletions
|
|
@ -62,16 +62,9 @@ apps.editor = function ()
|
|||
-- helpers.run_or_raise({class = 'editor'}, false, user.editor, { switchtotag = true })
|
||||
end
|
||||
|
||||
apps.performance_mode = function ()
|
||||
-- local cmd = "pgrep compton > /dev/null && (pkill compton && sudo cpufreq-set -g performance && echo 'ON') || (echo 'OFF' && compton --config ~/.config/compton/compton.conf & sudo cpufreq-set -g powersave &)"
|
||||
-- awful.spawn.easy_async_with_shell(cmd, function(out)
|
||||
-- if out:match('ON') then
|
||||
-- naughty.notify({ title = "Performance mode", message = "Activated!" })
|
||||
-- else
|
||||
-- naughty.notify({ title = "Performance mode", message = "Deactivated!" })
|
||||
-- end
|
||||
-- end)
|
||||
awful.spawn.with_shell("performance_mode")
|
||||
-- Toggle compositor
|
||||
apps.compositor = function ()
|
||||
awful.spawn.with_shell("sh -c 'pgrep picom > /dev/null && pkill picom || picom --config ~/.config/picom/picom.conf & disown'")
|
||||
end
|
||||
|
||||
local night_mode_notif
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ local record = create_button("", x.color4, x.color12, apps.record, "r")
|
|||
local lutris = create_button("", x.color6, x.color14, apps.lutris, "l")
|
||||
local steam = create_button("", x.color2, x.color10, apps.steam, "s")
|
||||
local org = create_button("", x.color2, x.color10, apps.org, "o")
|
||||
local performance = create_button("", x.color5, x.color13, apps.performance_mode, "z")
|
||||
local compositor = create_button("", x.color5, x.color13, apps.compositor, "z")
|
||||
|
||||
local restart_awesome = create_button("", x.color4, x.color12)
|
||||
restart_awesome:buttons(gears.table.join(
|
||||
|
|
@ -198,7 +198,7 @@ app_drawer:setup {
|
|||
create_stripe({browser, youtube, discord, telegram}, "#00000000"),
|
||||
create_stripe({mail, org, files, passwords}, x.color8.."20"),
|
||||
create_stripe({gimp, record, lutris, steam}, x.color8.."40"),
|
||||
create_stripe({networks, night_mode, performance, restart_awesome}, x.color8.."60"),
|
||||
create_stripe({networks, night_mode, compositor, restart_awesome}, x.color8.."60"),
|
||||
layout = wibox.layout.flex.vertical
|
||||
},
|
||||
bg = x.background,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue