Browse Source

Fix desktop session breakage!

master
josiah 2 years ago
parent
commit
9db0087ed0
  1. 21
      gamemode.lua

21
gamemode.lua

@ -16,10 +16,7 @@ local gears = require("gears")
local XRANDR_GAME_RESOLUTION_COMMAND = "xrandr --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal --primary --output DP-2 --mode 1920x1080 --right-of HDMI-0 --rotate left --output DP-4 --mode 1920x1080 --left-of HDMI-0 --rotate right --output DP-0 --off"
local XRANDR_NORMAL_RESOLUTION_COMMAND = "xrandr --output HDMI-0 --mode 2560x1440 --pos 0x0 --rotate normal --primary --output DP-2 --mode 1920x1080 --right-of HDMI-0 --rotate left --output DP-4 --mode 1920x1080 --left-of HDMI-0 --rotate right --output DP-0 --off"
local iconpath = "/home/josiah/.config/awesome/gamemode.png"
local toggle = 0
local demoMode_widget = wibox.widget {
@ -49,22 +46,6 @@ function activate_game_mode()
}
end
function activate_normal_mode()
gears.timer {
timeout = XSCREENSAVER_TIMER,
autostart = true,
callback = function()
awful.util.spawn_with_shell(XRANDR_NORMAL_RESOLUTION_COMMAND)
--naughty.notify{
--title= "Notification status",
--text = tostring(not naughty.is_suspended()),
--ignore_suspend = true,
--}
end,
single_shot = false,
}
end
demoMode_widget:buttons(awful.util.table.join(
awful.button({ }, 1, function ()
if toggle == 0 then
@ -72,8 +53,8 @@ demoMode_widget:buttons(awful.util.table.join(
toggle = 1
demoMode_widget.bg = beautiful.fg_urgent
else
activate_normal_mode()
demoMode_widget.bg = beautiful.bg_normal
awesome.restart()
toggle = 0
end
--naughty.notify{

Loading…
Cancel
Save