Big changes

This commit is contained in:
2022-04-14 00:35:06 +03:00
parent dbb49ea43a
commit fd7c4079fb
96 changed files with 1921 additions and 689 deletions

View File

@@ -3,20 +3,9 @@ local beautiful = require("beautiful")
local awful = require("awful")
local wibox = require("wibox")
beautiful.init(gears.filesystem.get_configuration_dir() .. "theme/default/theme.lua")
beautiful.font = "Ubuntu Sans 11"
beautiful.useless_gap = 7
beautiful.gap_single_client = true
local theme = "nordic_legion"
beautiful.wallpaper = "/home/nick/Pictures/wallpapers/" .. theme .. "/wallpaper.png"
local cutout = "/home/nick/Pictures/wallpapers/" .. theme .. "/cutout.png"
function set_wallpaper(s)
-- Wallpaper
if beautiful.wallpaper then
local wallpaper = beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
@@ -24,6 +13,53 @@ function set_wallpaper(s)
end
end
local function set_transparency(t)
-- Percentage xx/100
awful.spawn("sed -i 's/[0-9]*:class_g/" .. t .. ":class_g/g' /home/nick/.config/picom/picom.conf", false)
-- Integer 0.xx/1.00
awful.spawn("sed -i 's/opacity: [0-9]*.[0-9]*/opacity: " .. t/100 .. "/g' /home/nick/.config/alacritty/alacritty.yml", false)
-- Binary xx/255
awful.spawn("sed -i 's/\"glassit.alpha\": [0-9]*/\"glassit.alpha\": " .. math.floor((t/100)*255 + 0.5) .. "/g' /home/nick/.config/Code/User/settings.json", false)
end
local theme = "abstract_office"
-- Cleanup running theme applications
awful.spawn("pkill conky", false)
-- Per-theme settings
if theme == "nordic_legion" then
beautiful.init(gears.filesystem.get_configuration_dir() .. "theme/nordic_legion/theme.lua")
beautiful.font = "Ubuntu Sans 11"
beautiful.useless_gap = 7
beautiful.gap_single_client = true
beautiful.wallpaper = "/home/nick/Pictures/wallpapers/nordic_legion/wallpaper.png"
-- Launch Conky
awful.spawn.with_shell("killall conky; conky -c /home/nick/.config/conky/conky_left.conf &>/dev/null & disown; conky -c /home/nick/.config/conky/conky_right.conf &>/dev/null & disown", false)
-- Configure Glava
awful.spawn("sed -i 's/#request mod .*/#request mod bars/g' /home/nick/.config/glava/rc.glsl", false)
awful.spawn("sed -i 's/#request setgeometry .*/#request setgeometry 0 0 2560 1600/g' /home/nick/.config/glava/rc.glsl", false)
elseif theme == "abstract_office" then
beautiful.init(gears.filesystem.get_configuration_dir() .. "theme/abstract_office/theme.lua")
beautiful.wallpaper = "/home/nick/Pictures/wallpapers/abstract_office/Cage.jpg"
-- Configure Glava
awful.spawn("sed -i 's/#request mod .*/#request mod bars/g' /home/nick/.config/glava/rc.glsl", false)
awful.spawn("sed -i 's/#request setgeometry .*/#request setgeometry 0 0 2560 1600/g' /home/nick/.config/glava/rc.glsl", false)
end
-- Update external configs
awful.spawn("sed -i 's/corner-radius = [0-9]*/corner-radius = " .. beautiful.corner_radius .. "/g' /home/nick/.config/picom/picom.conf", false)
set_transparency(beautiful.transparency)
-- Restart Glava if it's running
awful.spawn.with_shell("if pgrep glava; then killall glava; glava --desktop &>/dev/null & disown; fi", false)
local bling = require("extras.bling")
awful.layout.layouts = {
@@ -36,28 +72,3 @@ awful.layout.layouts = {
awful.layout.suit.corner.nw,
awful.layout.suit.floating
}
-- Wallpaper cutout
local imgbox = wibox({
type = "desktop",
width = 2560,
height = 1600,
x = 0,
y = 0,
visible = true,
focusable = false,
opacity = 1,
bg = "#00000000",
})
imgbox:setup{
layout = wibox.layout.fixed.vertical,
{
widget = wibox.widget.imagebox,
image = cutout,
}
}
-- Launch conky if theme is nordic_legion
if theme == "nordic_legion" then
awful.spawn.with_shell("killall conky; conky -c /home/nick/.config/conky/conky_left.conf; conky -c /home/nick/.config/conky/conky_right.conf")
end