some more seperations of settings
This commit is contained in:
parent
5d7a24b9f0
commit
d362d6a761
3 changed files with 192 additions and 192 deletions
20
.config/awesome/functions.lua
Normal file
20
.config/awesome/functions.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
function file_exists(name)
|
||||
local f = io.open(name, "r")
|
||||
if f~=nil then io.close(f) return true else return false end
|
||||
end
|
||||
|
||||
function run_once(cmd)
|
||||
findme = cmd
|
||||
firstspace = cmd:find(" ")
|
||||
if firstspace then
|
||||
findme = cmd:sub(0, firstspace-1)
|
||||
end
|
||||
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
|
||||
end
|
||||
|
||||
function tablelength(T)
|
||||
local count = 0
|
||||
for _ in pairs(T) do count = count + 1 end
|
||||
return count
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue