Compare commits
25
Commits
900c1c8922
..
0.56.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
666ad77a02 | ||
|
|
fade16974b | ||
|
|
deed6d81bc | ||
|
|
75ce12490b | ||
|
|
c0201ea4e7 | ||
|
|
320ad9df0f | ||
|
|
b1534e45c4 | ||
|
|
626a0fd769 | ||
|
|
e8594c54ef | ||
|
|
38fd195673 | ||
|
|
dc123bba33 | ||
|
|
f00c8affc4 | ||
|
|
e298b55cb7 | ||
|
|
a0b22453eb | ||
|
|
4bbae7a78c | ||
|
|
4614859248 | ||
|
|
87ecb55fd8 | ||
|
|
da74cab213 | ||
|
|
86e9b190af | ||
|
|
1e83dd2f5f | ||
|
|
0cb5829923 | ||
|
|
591515a149 | ||
|
|
c4fbd94891 | ||
|
|
81a9d52938 | ||
|
|
bd95554e17 |
@@ -0,0 +1,8 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
insert_file_newline=true
|
||||||
|
|
||||||
|
[*.lua]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
general {
|
||||||
|
ignore_dbus_inhibit = false
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||||
|
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||||
|
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||||
|
}
|
||||||
|
|
||||||
|
# dpms
|
||||||
|
listener {
|
||||||
|
timeout = 660
|
||||||
|
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
|
||||||
|
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
|
||||||
|
}
|
||||||
|
|
||||||
+2
-5
@@ -30,12 +30,9 @@ listener {
|
|||||||
|
|
||||||
# dpms
|
# dpms
|
||||||
listener {
|
listener {
|
||||||
# DPMS TIMEOUT
|
|
||||||
timeout = 660
|
timeout = 660
|
||||||
# DPMS ONTIMEOUT
|
on-timeout = hyprctl dispatch 'hl.dsp.dpms({ action = "disable" })'
|
||||||
on-timeout = hyprctl dispatch dpms off
|
on-resume = hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })'
|
||||||
# DPMS ONRESUME
|
|
||||||
on-resume = hyprctl dispatch dpms on
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Suspend
|
# Suspend
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ M.curves = {
|
|||||||
curve = {
|
curve = {
|
||||||
type = "spring",
|
type = "spring",
|
||||||
mass = 1,
|
mass = 1,
|
||||||
stiffness = 50,
|
stiffness = 500,
|
||||||
dampening = 6,
|
dampening = 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,21 @@
|
|||||||
local settings = require("lua.lib.settings")
|
local settings = require("lua.lib.settings")
|
||||||
|
local events = require("lua.lib.events")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.autostart = {}
|
||||||
|
|
||||||
|
-- for openRC system
|
||||||
|
if settings["hostname"] == "optiplex-gentoo" and not settings["systemd"] then
|
||||||
|
M.autostart = {
|
||||||
|
function()
|
||||||
|
hl.exec_cmd("gentoo-pipewire-launcher")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function M:load()
|
||||||
|
events.map("hyprland.start", self.autostart)
|
||||||
|
end
|
||||||
|
|
||||||
|
return utils.extend_config(M, "lua.user.conf.autostart")
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
local utils = require("lua.lib.utils")
|
local utils = require("lua.lib.utils")
|
||||||
|
local settings = require("lua.lib.settings")
|
||||||
require("lua.lib.globals")
|
require("lua.lib.globals")
|
||||||
|
|
||||||
M.cursor = "Vimix-Hyprcursor"
|
M.cursor = "Vimix-Hyprcursor"
|
||||||
M.size = 32
|
M.size = 32
|
||||||
|
if settings["profile"] == "laptop" then
|
||||||
|
M.size = 36
|
||||||
|
end
|
||||||
|
|
||||||
function M.fetch_Vimix_hyprcursor()
|
function M.fetch_Vimix_hyprcursor()
|
||||||
if M.cursor == "Vimix-Hyprcursor" then
|
if M.cursor == "Vimix-Hyprcursor" then
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ M.confs = {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
range = 15,
|
range = 15,
|
||||||
render_power = 2,
|
render_power = 2,
|
||||||
color = 0xbb000000,
|
color = colorscheme.crust.."bb",
|
||||||
offset = { 1, 1 },
|
offset = { 1, 1 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@type table<string, string>
|
---@type table<string, string>
|
||||||
@@ -7,6 +9,10 @@ M.envs = {
|
|||||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1",
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if settings["locale"] and settings["locale"] ~= "" then
|
||||||
|
M.envs["LANG"] = settings["locale"]
|
||||||
|
end
|
||||||
|
|
||||||
function M.load()
|
function M.load()
|
||||||
for name, value in pairs(M.envs) do
|
for name, value in pairs(M.envs) do
|
||||||
hl.env(name, value)
|
hl.env(name, value)
|
||||||
|
|||||||
+15
-1
@@ -1,7 +1,7 @@
|
|||||||
local settings = require("lua.lib.settings")
|
local settings = require("lua.lib.settings")
|
||||||
require("lua.lib.globals")
|
require("lua.lib.globals")
|
||||||
|
|
||||||
require("lua.conf.monitor")
|
require("lua.conf.monitor"):load()
|
||||||
|
|
||||||
require("lua.conf.wallpaper").load()
|
require("lua.conf.wallpaper").load()
|
||||||
require("lua.conf.cursor").load()
|
require("lua.conf.cursor").load()
|
||||||
@@ -12,7 +12,21 @@ require("lua.conf.layout").load()
|
|||||||
require("lua.conf.misc").load()
|
require("lua.conf.misc").load()
|
||||||
require("lua.conf.windowrules").load()
|
require("lua.conf.windowrules").load()
|
||||||
require("lua.conf.layerrules").load()
|
require("lua.conf.layerrules").load()
|
||||||
|
require("lua.conf.autostart"):load()
|
||||||
|
|
||||||
require("lua.binds").load()
|
require("lua.binds").load()
|
||||||
require("lua.modules").load()
|
require("lua.modules").load()
|
||||||
|
require("lua.plugins").load()
|
||||||
require("lua.animations").load()
|
require("lua.animations").load()
|
||||||
|
|
||||||
|
if string.sub(settings["hostname"], 1, 4) == "ATRI" then
|
||||||
|
hl.on("hyprland.start", function()
|
||||||
|
hl.exec_cmd("kitty", {
|
||||||
|
workspace = "1 silent",
|
||||||
|
})
|
||||||
|
hl.exec_cmd("kitty -o font_size=10 btop", {
|
||||||
|
workspace = "2 silent",
|
||||||
|
})
|
||||||
|
hl.exec_cmd("sleep 1 && pw-play ~/.local/share/startupsounds/start-computeraif-14572.mp3")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|||||||
+9
-1
@@ -1,5 +1,6 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
local settings = require("lua.lib.settings")
|
local settings = require("lua.lib.settings")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
|
||||||
M.confs = {
|
M.confs = {
|
||||||
input = { touchpad = {} },
|
input = { touchpad = {} },
|
||||||
@@ -19,7 +20,14 @@ elseif settings["profile"] == "laptop" then
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
M.confs.input.touchpad.natural_scroll = settings["touchpad_natural_scroll"]
|
--M.confs.input.touchpad.natural_scroll = settings["touchpad_natural_scroll"]
|
||||||
|
M.confs = utils.tbl_recursive_merge(M.confs, {
|
||||||
|
input = {
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = settings["touchpad_natural_scroll"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
M.confs.input.kb_layout = settings["kb_layout"]
|
M.confs.input.kb_layout = settings["kb_layout"]
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,15 @@ M.layer_rules = {
|
|||||||
blur = true,
|
blur = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "hibiki",
|
||||||
|
match = {
|
||||||
|
namespace = "^(hibiki)$",
|
||||||
|
},
|
||||||
|
blur = true,
|
||||||
|
ignore_alpha = 0.10,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "waybar-translucent-popups",
|
name = "waybar-translucent-popups",
|
||||||
match = {
|
match = {
|
||||||
|
|||||||
+4
-1
@@ -6,12 +6,15 @@ M.confs = {
|
|||||||
misc = {
|
misc = {
|
||||||
disable_hyprland_logo = true,
|
disable_hyprland_logo = true,
|
||||||
disable_splash_rendering = true,
|
disable_splash_rendering = true,
|
||||||
vrr = true,
|
vrr = 3,
|
||||||
enable_swallow = true,
|
enable_swallow = true,
|
||||||
swallow_regex = "^(kitty|Alacritty)$",
|
swallow_regex = "^(kitty|Alacritty)$",
|
||||||
background_color = colorscheme.background,
|
background_color = colorscheme.background,
|
||||||
font_family = settings["font_family"],
|
font_family = settings["font_family"],
|
||||||
},
|
},
|
||||||
|
xwayland = {
|
||||||
|
force_zero_scaling = true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.load()
|
function M.load()
|
||||||
|
|||||||
+15
-2
@@ -1,9 +1,22 @@
|
|||||||
local settings = require("lua.lib.settings")
|
local settings = require("lua.lib.settings")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.monitors = {}
|
||||||
|
|
||||||
if settings["host"] == "laptop" then
|
if settings["host"] == "laptop" then
|
||||||
hl.monitor({
|
M.monitors = table.insert({ {
|
||||||
output = "eDP-1",
|
output = "eDP-1",
|
||||||
mode = "highres",
|
mode = "highres",
|
||||||
scale = "auto",
|
scale = "auto",
|
||||||
})
|
} })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M:load()
|
||||||
|
for _, monitor in ipairs(self.monitors) do
|
||||||
|
hl.monitor(monitor)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return utils.extend_config(M, "lua.user.conf.monitor")
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ settings["touchpad_natural_scroll"] = true
|
|||||||
---@type string
|
---@type string
|
||||||
settings["kb_layout"] = "us"
|
settings["kb_layout"] = "us"
|
||||||
|
|
||||||
|
---@type string
|
||||||
|
settings["locale"] = ""
|
||||||
|
|
||||||
---@type "dwindle"|"master"|"scrolling"|"monocle"
|
---@type "dwindle"|"master"|"scrolling"|"monocle"
|
||||||
settings["default_layout"] = "dwindle"
|
settings["default_layout"] = "dwindle"
|
||||||
|
|
||||||
@@ -40,6 +43,12 @@ settings["modules"] = {
|
|||||||
cliphist = true,
|
cliphist = true,
|
||||||
pypr = true,
|
pypr = true,
|
||||||
fcitx5 = false,
|
fcitx5 = false,
|
||||||
|
rofi = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
---@type table<string, boolean>
|
||||||
|
settings["plugins"] = {
|
||||||
|
hyprexpo = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
return require("lua.lib.utils").extend_config(settings, "lua.user.settings")
|
return require("lua.lib.utils").extend_config(settings, "lua.user.settings")
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
|
local settings=require("lua.lib.settings")
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local function start_hypridle()
|
local function start_hypridle()
|
||||||
|
if string.sub(settings["hostname"], 1, 4) == "ATRI" then
|
||||||
|
hl.exec_cmd("hypridle -c ~/.config/hypr/hypridle-ATRI.conf")
|
||||||
|
else
|
||||||
hl.exec_cmd("hypridle")
|
hl.exec_cmd("hypridle")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
M.autostart = {
|
M.autostart = {
|
||||||
start_hypridle,
|
start_hypridle,
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ M.autostart = {}
|
|||||||
M.autostop = {}
|
M.autostop = {}
|
||||||
M.binds = {}
|
M.binds = {}
|
||||||
M.envs = {}
|
M.envs = {}
|
||||||
|
M.windowrules = {}
|
||||||
|
|
||||||
local function collect_modules_prop(module, prop)
|
local function collect_modules_prop(module, prop)
|
||||||
if module[prop] then
|
if module[prop] then
|
||||||
@@ -51,6 +52,7 @@ for _, item in ipairs(modules) do
|
|||||||
collect_modules_prop(module, "autostop")
|
collect_modules_prop(module, "autostop")
|
||||||
collect_modules_prop(module, "binds")
|
collect_modules_prop(module, "binds")
|
||||||
collect_modules_prop(module, "envs")
|
collect_modules_prop(module, "envs")
|
||||||
|
collect_modules_prop(module, "windowrules")
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.load()
|
function M.load()
|
||||||
@@ -61,6 +63,10 @@ function M.load()
|
|||||||
for name, value in pairs(M.envs) do
|
for name, value in pairs(M.envs) do
|
||||||
hl.env(name, value)
|
hl.env(name, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for _, rule in ipairs(M.windowrules) do
|
||||||
|
hl.window_rule(rule)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -17,4 +17,14 @@ M.binds = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M.windowrules = {
|
||||||
|
{
|
||||||
|
name = "Pyprland rules",
|
||||||
|
match = {
|
||||||
|
class = "kitty-dropterm"
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("Space"),
|
||||||
|
dispatcher = hl.dsp.exec_cmd("rofi -show drun -replace -i"),
|
||||||
|
desc = "Rofi launcher",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + W"),
|
||||||
|
dispatcher = hl.dsp.exec_cmd("~/dotfiles/hypr/scripts/wallpaper.sh select"),
|
||||||
|
desc = "Rofi wallpaper selector",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("Print"),
|
||||||
|
dispatcher = hl.dsp.exec_cmd("~/dotfiles/hypr/scripts/screenshot.sh"),
|
||||||
|
desc = "Rofi screenshot dialog",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("V"),
|
||||||
|
dispatcher = hl.dsp.exec_cmd("~/dotfiles/scripts/cliphist.sh"),
|
||||||
|
desc = "Rofi cliphist clipboard manager",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -7,7 +7,7 @@ local M = {}
|
|||||||
local function start_swaync()
|
local function start_swaync()
|
||||||
if settings["systemd"] then
|
if settings["systemd"] then
|
||||||
local unit = "swaync.service"
|
local unit = "swaync.service"
|
||||||
local source = CONFIG_HOME .. "hypr/systemd/" .. unit
|
local source = HYPR .. "/systemd/" .. unit
|
||||||
|
|
||||||
if systemd.ensure_user_unit(unit, source) then
|
if systemd.ensure_user_unit(unit, source) then
|
||||||
hl.exec_cmd("systemctl --user start swaync")
|
hl.exec_cmd("systemctl --user start swaync")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ local M = {}
|
|||||||
local function start_swayosd()
|
local function start_swayosd()
|
||||||
if settings["systemd"] then
|
if settings["systemd"] then
|
||||||
local unit = "swayosd.service"
|
local unit = "swayosd.service"
|
||||||
local source = CONFIG_HOME .. "hypr/systemd/" .. unit
|
local source = HYPR .. "/systemd/" .. unit
|
||||||
|
|
||||||
if systemd.ensure_user_unit(unit, source) then
|
if systemd.ensure_user_unit(unit, source) then
|
||||||
hl.exec_cmd("systemctl --user start swayosd")
|
hl.exec_cmd("systemctl --user start swayosd")
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
local colorscheme = require("lua.conf.colorscheme")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.autostart = {
|
||||||
|
function()
|
||||||
|
hl.exec_cmd("hyprctl plugin load /usr/lib/hyprland-plugins/hyprexpo.so")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.confs = {
|
||||||
|
plugin = {
|
||||||
|
hyprexpo = {
|
||||||
|
columns = 3,
|
||||||
|
gap_size = 5,
|
||||||
|
gap_size_outer = 0,
|
||||||
|
bg_col = colorscheme.background,
|
||||||
|
workspace_method = "center current",
|
||||||
|
skip_empty = false,
|
||||||
|
max_workspace = 0,
|
||||||
|
show_workspace_numbers = false,
|
||||||
|
workspace_number_color = colorscheme.foreground,
|
||||||
|
window_icon_enable = false,
|
||||||
|
window_icon_position = "bottom-right",
|
||||||
|
window_icon_size = 32,
|
||||||
|
label_enable = false,
|
||||||
|
label_text_mode = "id",
|
||||||
|
label_token_map = "",
|
||||||
|
selection_label_enable = false,
|
||||||
|
selection_label_token_map = "a,s,d,f,g,q,w,e,r,t,z,x,c,v,b",
|
||||||
|
gesture_distance = 300,
|
||||||
|
cancel_key = "escape",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("F3"),
|
||||||
|
dispatcher = function()
|
||||||
|
hl.plugin.hyprexpo.expo("toggle")
|
||||||
|
end,
|
||||||
|
desc = "Toggle hyprexpo",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
require("lua.lib.globals")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
local events = require("lua.lib.events")
|
||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
local plugins = {}
|
||||||
|
|
||||||
|
local function is_plugin_exists(name)
|
||||||
|
return utils.is_file_exists(HYPR .. "/lua/plugins/" .. name .. ".lua")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function load_plugin(name)
|
||||||
|
if not is_plugin_exists(name) then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
local default_plug = require("lua.plugins." .. name)
|
||||||
|
|
||||||
|
local user_plugname = "lua.user.plugins." .. name
|
||||||
|
local plug = utils.extend_config(default_plug, user_plugname)
|
||||||
|
|
||||||
|
return plug
|
||||||
|
end
|
||||||
|
|
||||||
|
print("loading plugins...")
|
||||||
|
|
||||||
|
for name, enabled in pairs(settings.plugins) do
|
||||||
|
print("plugin " .. name .. " enabled is " .. tostring(enabled))
|
||||||
|
if enabled then
|
||||||
|
local plug = load_plugin(name)
|
||||||
|
print("plugin " .. name .. " loaded.")
|
||||||
|
table.insert(plugins, {
|
||||||
|
name = name,
|
||||||
|
config = plug,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.autostart = {}
|
||||||
|
M.binds = {}
|
||||||
|
M.confs = {}
|
||||||
|
|
||||||
|
local function collect_plugins_prop(plugin, prop)
|
||||||
|
if plugin[prop] then
|
||||||
|
M[prop] = utils.list_extend(M[prop], plugin[prop])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, item in ipairs(plugins) do
|
||||||
|
local plugin = item.config
|
||||||
|
collect_plugins_prop(plugin, "autostart")
|
||||||
|
collect_plugins_prop(plugin, "binds")
|
||||||
|
collect_plugins_prop(plugin, "confs")
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
events.map("hyprland.start", M.autostart)
|
||||||
|
|
||||||
|
bind.map(M.binds)
|
||||||
|
|
||||||
|
hl.config(M.confs)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
import os
|
|
||||||
import json
|
|
||||||
import pathlib
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
# Get script path
|
|
||||||
pathname = os.path.dirname(sys.argv[0])
|
|
||||||
homeFolder = os.path.expanduser('~') # Path to home folder
|
|
||||||
dotfiles = homeFolder + "/dotfiles/"
|
|
||||||
|
|
||||||
result = subprocess.run(["bash", dotfiles + "hypr/scripts/monitors.sh"], capture_output=True, text=True)
|
|
||||||
monitors_json = result.stdout.strip()
|
|
||||||
monitors_arr = json.loads(monitors_json)
|
|
||||||
for row in monitors_arr:
|
|
||||||
if row["focused"]:
|
|
||||||
print(row["id"])
|
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -d /sys/class/power_supply/BAT1 ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the current battery percentage
|
# Get the current battery percentage
|
||||||
battery_percentage=$(cat /sys/class/power_supply/BAT1/capacity)
|
battery_percentage=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ echo $newwall
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Reload waybar with new colors
|
# Reload waybar with new colors
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
~/dotfiles/waybar/launch.sh
|
#~/dotfiles/waybar/launch.sh
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# Set the new wallpaper
|
# Set the new wallpaper
|
||||||
|
|||||||
Reference in New Issue
Block a user