Compare commits
No commits in common. "857c36192d9ca3443f55ea740b3112e63a0756cc" and "35fee185e78df4a3bf3c041e05c0223287e428d1" have entirely different histories.
857c36192d
...
35fee185e7
2 changed files with 5 additions and 20 deletions
|
@ -1,4 +0,0 @@
|
|||
save_config('gtk', [[
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme = {dark}
|
||||
]], theme)
|
21
themer.lua
21
themer.lua
|
@ -2,6 +2,11 @@
|
|||
|
||||
local templater = require 'utils/template'
|
||||
|
||||
theme = require 'themes/rose-pine-moon'
|
||||
|
||||
local status = os.execute("mkdir -p ~/.cache/themer.lua/")
|
||||
if not (status == 0) then return status end
|
||||
|
||||
function expect_nil(result)
|
||||
if result then
|
||||
print("Error: "..result)
|
||||
|
@ -10,21 +15,6 @@ function expect_nil(result)
|
|||
return nil
|
||||
end
|
||||
|
||||
local function read_file(path)
|
||||
local file = io.open(path, "r")
|
||||
if not file then return nil end
|
||||
local content = file:read "*a" -- *a or *all reads the whole file
|
||||
file:close()
|
||||
return content
|
||||
end
|
||||
|
||||
local theme_name_path = os.getenv('HOME').."/.config/themer.lua.theme"
|
||||
local theme_name = read_file(theme_name_path)
|
||||
theme = dofile("themes/"..theme_name..".lua")
|
||||
|
||||
local status = os.execute("mkdir -p ~/.cache/themer.lua/")
|
||||
if not (status == 0) then return status end
|
||||
|
||||
function save_config(name, template, params)
|
||||
local file, err = io.open("/home/diablo/.cache/themer.lua/"..name, "w+")
|
||||
if not file then expect_nil(err) end
|
||||
|
@ -39,5 +29,4 @@ require 'modules/fuzzel'
|
|||
require 'modules/lock'
|
||||
require 'modules/shell'
|
||||
require 'modules/vis'
|
||||
require 'modules/gtk'
|
||||
|
||||
|
|
Loading…
Reference in a new issue