diff --git a/config/awesome/apps.lua b/config/awesome/apps.lua index f875cdb..6663da1 100644 --- a/config/awesome/apps.lua +++ b/config/awesome/apps.lua @@ -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 diff --git a/config/awesome/elemental/app_drawer.lua b/config/awesome/elemental/app_drawer.lua index 4e876ac..7073fa0 100644 --- a/config/awesome/elemental/app_drawer.lua +++ b/config/awesome/elemental/app_drawer.lua @@ -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,