Try to fix timer
This commit is contained in:
parent
05dbf3cb88
commit
7cd8108298
|
@ -2,8 +2,6 @@
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
|
|
||||||
|
|
||||||
-- Local imports
|
-- Local imports
|
||||||
local grid = require("components.layout.grid")
|
local grid = require("components.layout.grid")
|
||||||
|
|
||||||
|
@ -18,6 +16,18 @@ require("utils.signals")
|
||||||
-- Autofocus a new client when previously focused one is closed
|
-- Autofocus a new client when previously focused one is closed
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
|
|
||||||
|
-- Define layouts
|
||||||
|
awful.layout.append_default_layouts({
|
||||||
|
awful.layout.suit.tile,
|
||||||
|
awful.layout.suit.floating,
|
||||||
|
grid.horizontal,
|
||||||
|
awful.layout.suit.fair.horizontal,
|
||||||
|
awful.layout.suit.tile.left,
|
||||||
|
awful.layout.suit.tile.bottom,
|
||||||
|
awful.layout.suit.tile.top,
|
||||||
|
grid,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
-- List of apps to run on start-up
|
-- List of apps to run on start-up
|
||||||
local run_on_start_up = {
|
local run_on_start_up = {
|
||||||
|
@ -28,18 +38,6 @@ local run_on_start_up = {
|
||||||
"feh --no-fehbg --bg-fill " .. gears.filesystem.get_configuration_dir() .. "/images/wallpaper.png",
|
"feh --no-fehbg --bg-fill " .. gears.filesystem.get_configuration_dir() .. "/images/wallpaper.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Define layouts
|
|
||||||
awful.layout.layouts = {
|
|
||||||
awful.layout.suit.tile,
|
|
||||||
awful.layout.suit.floating,
|
|
||||||
grid.horizontal,
|
|
||||||
awful.layout.suit.fair.horizontal,
|
|
||||||
awful.layout.suit.tile.left,
|
|
||||||
awful.layout.suit.tile.bottom,
|
|
||||||
awful.layout.suit.tile.top,
|
|
||||||
grid,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Run all the apps listed in run_on_start_up
|
-- Run all the apps listed in run_on_start_up
|
||||||
for _, app in ipairs(run_on_start_up) do
|
for _, app in ipairs(run_on_start_up) do
|
||||||
local findme = app
|
local findme = app
|
||||||
|
@ -48,7 +46,7 @@ for _, app in ipairs(run_on_start_up) do
|
||||||
findme = app:sub(0, firstspace - 1)
|
findme = app:sub(0, firstspace - 1)
|
||||||
end
|
end
|
||||||
-- Run commands only if it's not already running.
|
-- Run commands only if it's not already running.
|
||||||
awful.spawn.with_shell(string.format("echo 'pgrep -u $USER -x %s > /dev/null || (%s)' | bash -", findme, app), false)
|
awful.spawn.with_shell(string.format("echo 'pgrep -f -u $USER -x %s > /dev/null || (%s)' | bash -", findme, app), false)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Start timers
|
-- Start timers
|
||||||
|
@ -57,7 +55,7 @@ gears.timer {
|
||||||
call_now = true,
|
call_now = true,
|
||||||
autostart = true,
|
autostart = true,
|
||||||
callback = function()
|
callback = function()
|
||||||
awful.spawn.with_shell({"xmodmap", "/home/user/.Xmodmap"}) -- If not repeated it sometimes just stops working
|
awful.spawn({"xmodmap", "/home/user/.Xmodmap"}) -- If not repeated it sometimes just stops working
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue