Compare commits
47
Commits
4e66b474aa
...
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 | ||
|
|
900c1c8922 | ||
|
|
a4edeec23b | ||
|
|
7182189e8e | ||
|
|
072c5876e4 | ||
|
|
90f1a6b17b | ||
|
|
ffa71223d5 | ||
|
|
d6d95173bd | ||
|
|
9bd03f67e4 | ||
|
|
305a9a4532 | ||
|
|
d0f823dadb | ||
|
|
e162025c51 | ||
|
|
bf1ada37d8 | ||
|
|
96fad77198 | ||
|
|
4db681ca2d | ||
|
|
51166b0f3a | ||
|
|
c2ba1a2f67 | ||
|
|
99a7107562 | ||
|
|
0208181c07 | ||
|
|
a0af16868b | ||
|
|
d97d7219e5 | ||
|
|
a50825151c | ||
|
|
37fef5cbd4 |
@@ -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
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.curves = {
|
||||||
|
{
|
||||||
|
name = "easeInOutExpo",
|
||||||
|
curve = {
|
||||||
|
type = "bezier",
|
||||||
|
points = { { 0.87, 0 }, { 0.13, 1 } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "rubber",
|
||||||
|
curve = {
|
||||||
|
type = "spring",
|
||||||
|
mass = 1,
|
||||||
|
stiffness = 500,
|
||||||
|
dampening = 20,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
local curves = require("lua.animations.curves")
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.animations = {
|
||||||
|
{
|
||||||
|
leaf = "windows",
|
||||||
|
enabled = true,
|
||||||
|
speed = 1,
|
||||||
|
spring = "rubber",
|
||||||
|
style = "slide",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
leaf = "workspaces",
|
||||||
|
enabled = true,
|
||||||
|
speed = 8,
|
||||||
|
spring = "rubber",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
for _, curve_item in pairs(curves.curves) do
|
||||||
|
hl.curve(curve_item.name, curve_item.curve)
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, animation in pairs(M.animations) do
|
||||||
|
hl.animation(animation)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
local M = {}
|
||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("Return"),
|
||||||
|
desc = "Open terminal",
|
||||||
|
dispatcher = hl.dsp.exec_cmd(settings.apps.terminal),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("B"),
|
||||||
|
desc = "Open web browser",
|
||||||
|
dispatcher = hl.dsp.exec_cmd(settings.apps.browser),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("E"),
|
||||||
|
desc = "Open file manager",
|
||||||
|
dispatcher = hl.dsp.exec_cmd(settings.apps.file_manager),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
local M = {}
|
||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
|
||||||
|
local pieces = {
|
||||||
|
"apps",
|
||||||
|
"window",
|
||||||
|
"workspace",
|
||||||
|
"passthrough",
|
||||||
|
}
|
||||||
|
|
||||||
|
M.binds = {}
|
||||||
|
M.submaps = {}
|
||||||
|
|
||||||
|
for _, piece in pairs(pieces) do
|
||||||
|
local p = require("lua.binds." .. piece)
|
||||||
|
local bind_piece = p.binds
|
||||||
|
for _, bind_item in pairs(bind_piece) do
|
||||||
|
table.insert(M.binds, bind_item)
|
||||||
|
end
|
||||||
|
local submap = p.submaps
|
||||||
|
if submap then
|
||||||
|
M.submaps = utils.tbl_recursive_merge(M.submaps, submap)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
bind.map(M.binds)
|
||||||
|
for name, binds in pairs(M.submaps) do
|
||||||
|
hl.define_submap(name, function()
|
||||||
|
bind.map(binds)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("P"),
|
||||||
|
dispatcher = hl.dsp.submap("pass_through"),
|
||||||
|
desc = "Pass through submap",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
M.submaps = {
|
||||||
|
pass_through = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("escape"),
|
||||||
|
dispatcher = hl.dsp.submap("reset"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function maximize_active_window()
|
||||||
|
local actions = {
|
||||||
|
scrolling = hl.dsp.layout("colresize 1.0"),
|
||||||
|
}
|
||||||
|
local fallback = hl.dsp.window.fullscreen({ mode = "maximized" })
|
||||||
|
return bind.layout_dispatcher(actions, fallback)
|
||||||
|
end
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("Q"),
|
||||||
|
dispatcher = hl.dsp.window.close(),
|
||||||
|
desc = "Close the window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + Q"),
|
||||||
|
dispatcher = hl.dsp.window.kill(),
|
||||||
|
desc = "Kill the window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("F"),
|
||||||
|
dispatcher = hl.dsp.window.fullscreen({}),
|
||||||
|
desc = "Toggle fullscreen the window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + F"),
|
||||||
|
dispatcher = maximize_active_window(),
|
||||||
|
desc = "Toggle maximize the window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + SHIFT + F"),
|
||||||
|
dispatcher = hl.dsp.window.fullscreen_state({ internal = 0, client = 2, action = "toggle" }),
|
||||||
|
desc = "Toggle fake the window it's fullscreened",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("T"),
|
||||||
|
dispatcher = hl.dsp.window.float(),
|
||||||
|
desc = "Toggle float the window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("R"),
|
||||||
|
dispatcher = bind.layout_dispatcher({
|
||||||
|
dwindle = hl.dsp.layout("rotatesplit"),
|
||||||
|
}, hl.dsp.no_op()),
|
||||||
|
desc = "Toggle split",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + R"),
|
||||||
|
dispatcher = bind.layout_dispatcher({
|
||||||
|
dwindle = hl.dsp.layout("swapsplit"),
|
||||||
|
master = hl.dsp.layout("swapnext"),
|
||||||
|
}, hl.dsp.no_op()),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, dir in pairs({
|
||||||
|
H = "left",
|
||||||
|
L = "right",
|
||||||
|
K = "up",
|
||||||
|
J = "down",
|
||||||
|
}) do
|
||||||
|
table.insert(M.binds, {
|
||||||
|
keys = bind.with_leader("SHIFT+" .. key),
|
||||||
|
dispatcher = hl.dsp.window.move({ direction = string.sub(dir, 1, 1) }),
|
||||||
|
desc = "Move window " .. dir,
|
||||||
|
})
|
||||||
|
table.insert(M.binds, {
|
||||||
|
keys = bind.with_leader(key),
|
||||||
|
dispatcher = hl.dsp.focus({ direction = string.sub(dir, 1, 1) }),
|
||||||
|
desc = "Move window " .. dir,
|
||||||
|
})
|
||||||
|
table.insert(M.binds, {
|
||||||
|
keys = bind.with_leader("CTRL + " .. key),
|
||||||
|
dispatcher = hl.dsp.window.move({ direction = string.sub(dir, 1, 1), group_aware = true }),
|
||||||
|
desc = "Move window " .. dir .. " with group_aware",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
M.binds = utils.list_extend(M.binds, {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + left"),
|
||||||
|
dispatcher = hl.dsp.window.resize({ x = -100, y = 0, relative = true }),
|
||||||
|
desc = "Resize window x-100",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + right"),
|
||||||
|
dispatcher = hl.dsp.window.resize({ x = 100, y = 0, relative = true }),
|
||||||
|
desc = "Resize window x+100",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + up"),
|
||||||
|
dispatcher = hl.dsp.window.resize({ x = 0, y = -100, relative = true }),
|
||||||
|
desc = "Resize window y-100",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("SHIFT + down"),
|
||||||
|
dispatcher = hl.dsp.window.resize({ x = 0, y = 100, relative = true }),
|
||||||
|
desc = "Resize window y+100",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
M.binds = utils.list_extend(M.binds, {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("mouse:272"),
|
||||||
|
dispatcher = hl.dsp.window.drag(),
|
||||||
|
desc = "Drag window",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("mouse:273"),
|
||||||
|
dispatcher = hl.dsp.window.resize(),
|
||||||
|
desc = "Resize window",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
M.binds = utils.list_extend(M.binds, {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("G"),
|
||||||
|
dispatcher = hl.dsp.group.toggle(),
|
||||||
|
desc = "Toggle a group",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + Tab"),
|
||||||
|
dispatcher = hl.dsp.group.next(),
|
||||||
|
desc = "Switch to next window in group",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + SHIFT + Tab"),
|
||||||
|
dispatcher = hl.dsp.group.prev(),
|
||||||
|
desc = "Switch to previous window in group",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.binds = {}
|
||||||
|
|
||||||
|
for i = 1, 10 do
|
||||||
|
local n = tostring(i)
|
||||||
|
if n == "10" then
|
||||||
|
n = "0"
|
||||||
|
end
|
||||||
|
table.insert(M.binds, {
|
||||||
|
keys = bind.with_leader(n),
|
||||||
|
dispatcher = hl.dsp.focus({ workspace = i }),
|
||||||
|
desc = "Focus workspace " .. tostring(i),
|
||||||
|
})
|
||||||
|
table.insert(M.binds, {
|
||||||
|
keys = bind.with_leader("SHIFT + " .. n),
|
||||||
|
dispatcher = hl.dsp.window.move({ workspace = i, follow = true }),
|
||||||
|
desc = "Move window to workspace " .. tostring(i),
|
||||||
|
})
|
||||||
|
table.insert(M.binds, {
|
||||||
|
keys = bind.with_leader("CTRL + SHIFT + " .. n),
|
||||||
|
dispatcher = hl.dsp.window.move({ workspace = i, follow = false }),
|
||||||
|
desc = "Move window to workspace " .. tostring(i) .. " silently",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
M.binds = utils.list_extend(M.binds, {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("mouse_up"),
|
||||||
|
dispatcher = hl.dsp.focus({ workspace = "m-1" }),
|
||||||
|
desc = "Focus to prev workspace on current monitor",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("mouse_down"),
|
||||||
|
dispatcher = hl.dsp.focus({ workspace = "m+1" }),
|
||||||
|
desc = "Focus to next workspace on current monitor",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + down"),
|
||||||
|
dispatcher = hl.dsp.focus({ workspace = "emptynm" }),
|
||||||
|
desc = "Focus to next empty workspace",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + left"),
|
||||||
|
dispatcher = hl.dsp.focus({ workspace = "m-1" }),
|
||||||
|
desc = "Focus to prev workspace on current monitor",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + right"),
|
||||||
|
dispatcher = hl.dsp.focus({ workspace = "m+1" }),
|
||||||
|
desc = "Focus to next workspace on current monitor",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -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,5 +1,5 @@
|
|||||||
local settings = require("lua.lib.settings")
|
local settings = require("lua.lib.settings")
|
||||||
local colorscheme
|
local colorscheme = {}
|
||||||
|
|
||||||
-- currently, only catppuccin is considerd
|
-- currently, only catppuccin is considerd
|
||||||
if settings["colorscheme"] == "catppuccin" or settings["colorscheme"] == "catppuccin-mocha" or true then
|
if settings["colorscheme"] == "catppuccin" or settings["colorscheme"] == "catppuccin-mocha" or true then
|
||||||
@@ -30,8 +30,9 @@ if settings["colorscheme"] == "catppuccin" or settings["colorscheme"] == "catppu
|
|||||||
colorscheme.mantle = "#181825"
|
colorscheme.mantle = "#181825"
|
||||||
colorscheme.crust = "#11111b"
|
colorscheme.crust = "#11111b"
|
||||||
colorscheme.foreground = colorscheme.text
|
colorscheme.foreground = colorscheme.text
|
||||||
colorscheme.background = colorscheme.surface0
|
colorscheme.background = colorscheme.base
|
||||||
colorscheme.accent = colorscheme.blue
|
colorscheme.accent = colorscheme.blue
|
||||||
|
colorscheme.second = colorscheme.sky
|
||||||
end
|
end
|
||||||
|
|
||||||
return colorscheme
|
return colorscheme
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
local M = {}
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
require("lua.lib.globals")
|
||||||
|
|
||||||
|
M.cursor = "Vimix-Hyprcursor"
|
||||||
|
M.size = 32
|
||||||
|
if settings["profile"] == "laptop" then
|
||||||
|
M.size = 36
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.fetch_Vimix_hyprcursor()
|
||||||
|
if M.cursor == "Vimix-Hyprcursor" then
|
||||||
|
if not utils.is_file_exists(DATA_HOME .. "/icons/Vimix-Hyprcursor") then
|
||||||
|
local tmppath = "/tmp/Vimix-Hyprcursor"
|
||||||
|
os.execute("git clone https://gitea.phy-yingjie.wang/wyj/Vimix-Hyprcursor.git " .. tmppath)
|
||||||
|
os.execute("cp " .. tmppath .. "/theme_Vimix-Hyprcursor " .. DATA_HOME .. "/icons/Vimix-Hyprcursor")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
M.fetch_Vimix_hyprcursor()
|
||||||
|
hl.env("HYPRCURSOR_THEME", M.cursor)
|
||||||
|
hl.env("HYPRCURSOR_SIZE", tostring(M.size))
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
local M = {}
|
||||||
|
local colorscheme = require("lua.conf.colorscheme")
|
||||||
|
--local settings = require("lua.lib.settings")
|
||||||
|
|
||||||
|
M.confs = {
|
||||||
|
general = {
|
||||||
|
gaps_in = 10,
|
||||||
|
gaps_out = 14,
|
||||||
|
border_size = 2,
|
||||||
|
col = { active_border = colorscheme.accent, inactive_border = colorscheme.foreground .. "a0" },
|
||||||
|
},
|
||||||
|
group = {
|
||||||
|
col = { border_active = colorscheme.second, border_inactive = colorscheme.foreground .. "a0" },
|
||||||
|
groupbar = {
|
||||||
|
font_size = 12,
|
||||||
|
text_color = colorscheme.foreground,
|
||||||
|
height = 16,
|
||||||
|
gradients = false,
|
||||||
|
col = { active = colorscheme.teal, inactive = colorscheme.accent },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
decoration = {
|
||||||
|
rounding = 12,
|
||||||
|
rounding_power = 3.0,
|
||||||
|
blur = {
|
||||||
|
enabled = true,
|
||||||
|
size = 12,
|
||||||
|
passes = 3,
|
||||||
|
noise = 0.06,
|
||||||
|
new_optimizations = true,
|
||||||
|
ignore_opacity = true,
|
||||||
|
xray = false,
|
||||||
|
popups = true,
|
||||||
|
popups_ignorealpha = 0.3,
|
||||||
|
},
|
||||||
|
active_opacity = 1.0,
|
||||||
|
inactive_opacity = 0.8,
|
||||||
|
fullscreen_opacity = 1.0,
|
||||||
|
shadow = {
|
||||||
|
enabled = true,
|
||||||
|
range = 15,
|
||||||
|
render_power = 2,
|
||||||
|
color = colorscheme.crust.."bb",
|
||||||
|
offset = { 1, 1 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
hl.config(M.confs)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
---@type table<string, string>
|
||||||
|
M.envs = {
|
||||||
|
XDG_SESSION_TYPE = "wayland",
|
||||||
|
XDG_SESSION_DESKTOP = "Hyprland",
|
||||||
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1",
|
||||||
|
}
|
||||||
|
|
||||||
|
if settings["locale"] and settings["locale"] ~= "" then
|
||||||
|
M.envs["LANG"] = settings["locale"]
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
for name, value in pairs(M.envs) do
|
||||||
|
hl.env(name, value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
+24
-2
@@ -1,10 +1,32 @@
|
|||||||
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.env").load()
|
||||||
|
require("lua.conf.input").load()
|
||||||
|
require("lua.conf.decoration").load()
|
||||||
|
require("lua.conf.layout").load()
|
||||||
|
require("lua.conf.misc").load()
|
||||||
|
require("lua.conf.windowrules").load()
|
||||||
|
require("lua.conf.layerrules").load()
|
||||||
|
require("lua.conf.autostart"):load()
|
||||||
|
|
||||||
|
require("lua.binds").load()
|
||||||
require("lua.modules").load()
|
require("lua.modules").load()
|
||||||
|
require("lua.plugins").load()
|
||||||
|
require("lua.animations").load()
|
||||||
|
|
||||||
hl.bind("SUPER + Return", hl.dsp.exec_cmd("kitty"))
|
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
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
local M = {}
|
||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
local utils = require("lua.lib.utils")
|
||||||
|
|
||||||
|
M.confs = {
|
||||||
|
input = { touchpad = {} },
|
||||||
|
gestures = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
if settings["profile"] == "desktop" then
|
||||||
|
M.confs.input = table.insert(M.confs.input, { numlock_by_default = true })
|
||||||
|
elseif settings["profile"] == "laptop" then
|
||||||
|
M.confs.gestures = table.insert(M.confs.gestures, { workspace_swipe_touch = true })
|
||||||
|
M.gestures = {
|
||||||
|
{
|
||||||
|
fingers = 3,
|
||||||
|
direction = "horizontal",
|
||||||
|
action = "workspace",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
--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"]
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
hl.config(M.confs)
|
||||||
|
if M.gestures then
|
||||||
|
for _, gesture in pairs(M.gestures) do
|
||||||
|
hl.gesture(gesture)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.layer_rules = {
|
||||||
|
{
|
||||||
|
name = "blur-basic-layers",
|
||||||
|
match = {
|
||||||
|
namespace = "^(gtk-layer-shell|logout_dialog|nwg-drawer)$",
|
||||||
|
},
|
||||||
|
blur = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "hibiki",
|
||||||
|
match = {
|
||||||
|
namespace = "^(hibiki)$",
|
||||||
|
},
|
||||||
|
blur = true,
|
||||||
|
ignore_alpha = 0.10,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "waybar-translucent-popups",
|
||||||
|
match = {
|
||||||
|
namespace = "^(waybar)$",
|
||||||
|
},
|
||||||
|
blur_popups = true,
|
||||||
|
ignore_alpha = 0.10,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "rofi-blurred-xray",
|
||||||
|
match = {
|
||||||
|
namespace = "^(rofi)$",
|
||||||
|
},
|
||||||
|
blur = true,
|
||||||
|
xray = true,
|
||||||
|
ignore_alpha = 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "swaync-control-center-blur",
|
||||||
|
match = {
|
||||||
|
namespace = "^(swaync-control-center)$",
|
||||||
|
},
|
||||||
|
blur = true,
|
||||||
|
ignore_alpha = 0.5,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "swayosd-blur",
|
||||||
|
match = {
|
||||||
|
namespace = "^(swayosd)$",
|
||||||
|
},
|
||||||
|
blur = true,
|
||||||
|
ignore_alpha = 0.3,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
for _, rule in ipairs(M.layer_rules) do
|
||||||
|
hl.layer_rule(rule)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
local M = {}
|
||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
|
||||||
|
M.confs = {
|
||||||
|
general = {
|
||||||
|
layout = settings["default_layout"],
|
||||||
|
},
|
||||||
|
dwindle = {
|
||||||
|
preserve_split = true,
|
||||||
|
},
|
||||||
|
master = {},
|
||||||
|
scrolling = {},
|
||||||
|
monocle = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
hl.config(M.confs)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
local M = {}
|
||||||
|
local colorscheme = require("lua.conf.colorscheme")
|
||||||
|
local settings = require("lua.lib.settings")
|
||||||
|
|
||||||
|
M.confs = {
|
||||||
|
misc = {
|
||||||
|
disable_hyprland_logo = true,
|
||||||
|
disable_splash_rendering = true,
|
||||||
|
vrr = 3,
|
||||||
|
enable_swallow = true,
|
||||||
|
swallow_regex = "^(kitty|Alacritty)$",
|
||||||
|
background_color = colorscheme.background,
|
||||||
|
font_family = settings["font_family"],
|
||||||
|
},
|
||||||
|
xwayland = {
|
||||||
|
force_zero_scaling = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
hl.config(M.confs)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
+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")
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.window_rules = {
|
||||||
|
{
|
||||||
|
name = "floating-utils",
|
||||||
|
match = {
|
||||||
|
class = "^(pavucontrol|blueman-manager|nm-connection-editor|qalculate-gtk|xdg-desktop-portal-gtk)$",
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "floating-mathematica",
|
||||||
|
match = {
|
||||||
|
title = "^(Mathematica|WolframNB)$",
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "transparent-vscode",
|
||||||
|
match = {
|
||||||
|
class = "^(code|code-url-handler)$",
|
||||||
|
},
|
||||||
|
opacity = "0.8",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "floating-social-apps",
|
||||||
|
match = {
|
||||||
|
class = "^(QQ|wechat)$",
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "floating-download-manager",
|
||||||
|
match = {
|
||||||
|
class = "^(fdm)$",
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
function M.load()
|
||||||
|
for _, rule in ipairs(M.window_rules) do
|
||||||
|
hl.window_rule(rule)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
+33
-3
@@ -16,7 +16,7 @@ local function merge(...)
|
|||||||
return out
|
return out
|
||||||
end
|
end
|
||||||
|
|
||||||
local function with_leader(keys)
|
function bind.with_leader(keys)
|
||||||
if keys == nil or keys == "" then
|
if keys == nil or keys == "" then
|
||||||
return bind.leader
|
return bind.leader
|
||||||
end
|
end
|
||||||
@@ -34,8 +34,38 @@ function bind.key(keys, dispatcher, desc, opts)
|
|||||||
return hl.bind(keys, dispatcher, flags)
|
return hl.bind(keys, dispatcher, flags)
|
||||||
end
|
end
|
||||||
|
|
||||||
function bind.leader_key(keys, dispatcher, desc, opts)
|
function bind.set(table)
|
||||||
return bind.key(with_leader(keys), dispatcher, desc, opts)
|
local keys = table.keys
|
||||||
|
local dispatcher = table.dispatcher
|
||||||
|
local desc = ""
|
||||||
|
local opts = {}
|
||||||
|
if table.desc ~= nil and table.desc ~= "" then
|
||||||
|
desc = table.desc
|
||||||
|
end
|
||||||
|
if table.opts ~= nil then
|
||||||
|
opts = table.opts
|
||||||
|
end
|
||||||
|
bind.key(keys, dispatcher, desc, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
function bind.map(table)
|
||||||
|
for _, item in pairs(table) do
|
||||||
|
bind.set(item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function bind.layout_dispatcher(actions, fallback)
|
||||||
|
return function()
|
||||||
|
local ws = hl.get_active_special_workspace() or hl.get_active_workspace()
|
||||||
|
if not ws then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local action = actions[ws.tiled_layout] or fallback
|
||||||
|
if action then
|
||||||
|
hl.dispatch(action)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return bind
|
return bind
|
||||||
|
|||||||
@@ -5,3 +5,8 @@ if not CONFIG_HOME then
|
|||||||
end
|
end
|
||||||
HYPR = CONFIG_HOME .. "/hypr"
|
HYPR = CONFIG_HOME .. "/hypr"
|
||||||
USER_CONFIG = HYPR .. "/lua/user"
|
USER_CONFIG = HYPR .. "/lua/user"
|
||||||
|
|
||||||
|
DATA_HOME = os.getenv("XDG_DATA_HOME")
|
||||||
|
if not DATA_HOME then
|
||||||
|
DATA_HOME = HOME .. "/.local/share"
|
||||||
|
end
|
||||||
|
|||||||
@@ -6,6 +6,28 @@ settings["hostname"] = ""
|
|||||||
---@type "desktop"|"laptop"
|
---@type "desktop"|"laptop"
|
||||||
settings["profile"] = "desktop"
|
settings["profile"] = "desktop"
|
||||||
|
|
||||||
|
---@type boolean
|
||||||
|
settings["touchpad_natural_scroll"] = true
|
||||||
|
|
||||||
|
---@type string
|
||||||
|
settings["kb_layout"] = "us"
|
||||||
|
|
||||||
|
---@type string
|
||||||
|
settings["locale"] = ""
|
||||||
|
|
||||||
|
---@type "dwindle"|"master"|"scrolling"|"monocle"
|
||||||
|
settings["default_layout"] = "dwindle"
|
||||||
|
|
||||||
|
---@type string
|
||||||
|
settings["font_family"] = "FiraCode Nerd Font"
|
||||||
|
|
||||||
|
---@type table<string, string>
|
||||||
|
settings["apps"] = {
|
||||||
|
terminal = "kitty",
|
||||||
|
file_manager = "thunar",
|
||||||
|
browser = "chromium",
|
||||||
|
}
|
||||||
|
|
||||||
---@type "catppuccin"|"catppuccin-mocha"
|
---@type "catppuccin"|"catppuccin-mocha"
|
||||||
settings["colorscheme"] = "catppuccin"
|
settings["colorscheme"] = "catppuccin"
|
||||||
|
|
||||||
@@ -20,6 +42,13 @@ settings["modules"] = {
|
|||||||
swayosd = true,
|
swayosd = true,
|
||||||
cliphist = true,
|
cliphist = true,
|
||||||
pypr = true,
|
pypr = true,
|
||||||
|
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")
|
||||||
|
|||||||
+3
-1
@@ -79,7 +79,9 @@ function M.tbl_recursive_merge(defaults, overrides)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.extend_config(defaults, user_module)
|
function M.extend_config(defaults, user_module)
|
||||||
if not M.is_file_exists(HYPR .. user_module) then
|
local file = HYPR .. "/" .. string.gsub(user_module, "%.", "/") .. ".lua"
|
||||||
|
if not M.is_file_exists(file) then
|
||||||
|
print(file .. " not found.")
|
||||||
return deepcopy(defaults)
|
return deepcopy(defaults)
|
||||||
end
|
end
|
||||||
local ok, overrides = pcall(require, user_module)
|
local ok, overrides = pcall(require, user_module)
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.binds = {
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + E"),
|
||||||
|
dispatcher = hl.dsp.exec_cmd("pkill fcitx5 -9;sleep 1;fcitx5 -d"),
|
||||||
|
desc = "restart fcitx5",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
M.autostart = {
|
||||||
|
function()
|
||||||
|
hl.exec_cmd("fcitx5 -d")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.envs = {
|
||||||
|
QT_IM_MODULE = "fcitx",
|
||||||
|
XMODIFIERS = "@im=fcitx",
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
|
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 = {
|
||||||
|
|||||||
+13
-2
@@ -2,6 +2,7 @@ local settings = require("lua.lib.settings")
|
|||||||
require("lua.lib.globals")
|
require("lua.lib.globals")
|
||||||
local utils = require("lua.lib.utils")
|
local utils = require("lua.lib.utils")
|
||||||
local events = require("lua.lib.events")
|
local events = require("lua.lib.events")
|
||||||
|
local bind = require("lua.lib.bind")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
local modules = {}
|
local modules = {}
|
||||||
@@ -25,6 +26,7 @@ end
|
|||||||
for name, enabled in pairs(settings.modules) do
|
for name, enabled in pairs(settings.modules) do
|
||||||
if enabled then
|
if enabled then
|
||||||
local mod = load_module(name)
|
local mod = load_module(name)
|
||||||
|
print("module " .. name .. " loaded.")
|
||||||
table.insert(modules, {
|
table.insert(modules, {
|
||||||
name = name,
|
name = name,
|
||||||
config = mod,
|
config = mod,
|
||||||
@@ -35,6 +37,8 @@ end
|
|||||||
M.autostart = {}
|
M.autostart = {}
|
||||||
M.autostop = {}
|
M.autostop = {}
|
||||||
M.binds = {}
|
M.binds = {}
|
||||||
|
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
|
||||||
@@ -47,14 +51,21 @@ for _, item in ipairs(modules) do
|
|||||||
collect_modules_prop(module, "autostart")
|
collect_modules_prop(module, "autostart")
|
||||||
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, "windowrules")
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.load()
|
function M.load()
|
||||||
events.map("hyprland.start", M.autostart)
|
events.map("hyprland.start", M.autostart)
|
||||||
events.map("hyprland.shutdown", M.autostop)
|
events.map("hyprland.shutdown", M.autostop)
|
||||||
|
|
||||||
for _, bind in pairs(M.binds) do
|
bind.map(M.binds)
|
||||||
bind()
|
for name, value in pairs(M.envs) do
|
||||||
|
hl.env(name, value)
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, rule in ipairs(M.windowrules) do
|
||||||
|
hl.window_rule(rule)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+15
-3
@@ -10,9 +10,21 @@ M.autostart = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
M.binds = {
|
M.binds = {
|
||||||
function()
|
{
|
||||||
bind.leader_key("SHIFT + Return", hl.dsp.exec_cmd("pypr toggle term"), "Pyprland: toggle drop terminal", {})
|
keys = bind.with_leader("SHIFT + Return"),
|
||||||
end,
|
dispatcher = hl.dsp.exec_cmd("pypr toggle term"),
|
||||||
|
desc = "Pyprland: toggle drop terminal",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
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")
|
||||||
|
|||||||
+61
-43
@@ -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")
|
||||||
@@ -41,48 +41,66 @@ local function swayosd_client_cmd(args)
|
|||||||
end
|
end
|
||||||
|
|
||||||
M.binds = {
|
M.binds = {
|
||||||
function()
|
{
|
||||||
bind.key(
|
keys = "XF86MonBrightnessUp",
|
||||||
"XF86MonBrightnessUp",
|
dispatcher = swayosd_client_cmd("--brightness raise"),
|
||||||
swayosd_client_cmd("--brightness raise"),
|
dosc = "Increase brightness ",
|
||||||
"Increase brightness ",
|
opts = { repeating = true, locked = true },
|
||||||
{ long_press = true, locked = true }
|
},
|
||||||
)
|
{
|
||||||
bind.key(
|
keys = "XF86MonBrightnessDown",
|
||||||
"XF86MonBrightnessDown",
|
dispatcher = swayosd_client_cmd("--brightness lower"),
|
||||||
swayosd_client_cmd("--brightness lower"),
|
desc = "Decrease brightness ",
|
||||||
"Decrease brightness ",
|
opts = { repeating = true, locked = true },
|
||||||
{ long_press = true, locked = true }
|
},
|
||||||
)
|
{
|
||||||
bind.key(
|
keys = "XF86AudioRaiseVolume",
|
||||||
"XF86AudioRaiseVolume",
|
dispatcher = swayosd_client_cmd("--output-volume raise"),
|
||||||
swayosd_client_cmd("--output-volume raise"),
|
desc = "Increase brightness ",
|
||||||
"Increase brightness ",
|
opts = { repeating = true, locked = true },
|
||||||
{ long_press = true, locked = true }
|
},
|
||||||
)
|
{
|
||||||
bind.key(
|
keys = "XF86AudioLowerVolume",
|
||||||
"XF86AudioLowerVolume",
|
dispatcher = swayosd_client_cmd("--output-volume lower"),
|
||||||
swayosd_client_cmd("--output-volume lower"),
|
desc = "Decrease brightness ",
|
||||||
"Decrease brightness ",
|
opts = { repeating = true, locked = true },
|
||||||
{ long_press = true, locked = true }
|
},
|
||||||
)
|
{
|
||||||
bind.key(
|
keys = "XF86AudioMute",
|
||||||
"XF86AudioMute",
|
dispatcher = swayosd_client_cmd("--output-volume mute-toggle"),
|
||||||
swayosd_client_cmd("--output-volume mute-toggle"),
|
desc = "Toggle output mute",
|
||||||
"Toggle output mute",
|
opts = { repeating = true, locked = true },
|
||||||
{ long_press = true, locked = true }
|
},
|
||||||
)
|
{
|
||||||
bind.key(
|
keys = "XF86AudioMicMute",
|
||||||
"XF86AudioMicMute",
|
dispatcher = swayosd_client_cmd("--input-volume mute-toggle"),
|
||||||
swayosd_client_cmd("--input-volume mute-toggle"),
|
desc = "Toggle input mute",
|
||||||
"Toggle input mute",
|
opts = { repeating = true, locked = true },
|
||||||
{ long_press = true, locked = true }
|
},
|
||||||
)
|
{
|
||||||
bind.key("XF86AudioPlay", swayosd_client_cmd("--playerctl play-pause"), "Player play/pause", { locked = true })
|
keys = "XF86AudioPlay",
|
||||||
bind.key("XF86AudioPause", swayosd_client_cmd("--playerctl pause"), "Player pause", { locked = true })
|
dispatcher = swayosd_client_cmd("--playerctl play-pause"),
|
||||||
bind.key("XF86AudioNext", swayosd_client_cmd("--playerctl next"), "Player next", { locked = true })
|
desc = "Player play/pause",
|
||||||
bind.key("XF86AudioPrev", swayosd_client_cmd("--playerctl prev"), "Player previous", { locked = true })
|
opts = { locked = true },
|
||||||
end,
|
},
|
||||||
|
{
|
||||||
|
keys = "XF86AudioPause",
|
||||||
|
dispatcher = swayosd_client_cmd("--playerctl pause"),
|
||||||
|
desc = "Player pause",
|
||||||
|
opts = { locked = true },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = "XF86AudioNext",
|
||||||
|
dispatcher = swayosd_client_cmd("--playerctl next"),
|
||||||
|
desc = "Player next",
|
||||||
|
opts = { locked = true },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = "XF86AudioPrev",
|
||||||
|
dispatcher = swayosd_client_cmd("--playerctl prev"),
|
||||||
|
desc = "Player previous",
|
||||||
|
opts = { locked = true },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
+10
-4
@@ -10,10 +10,16 @@ M.autostart = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
M.binds = {
|
M.binds = {
|
||||||
function()
|
{
|
||||||
bind.leader_key("SHIFT + B", hl.dsp.exec_cmd("~/dotfiles/waybar/launch.sh"), "(re)launch waybar", {})
|
keys = bind.with_leader("SHIFT + B"),
|
||||||
bind.leader_key("CTRL + B", hl.dsp.exec_cmd("~/dotfiles/waybar/toggle.sh"), "toggle waybar", {})
|
dispatcher = hl.dsp.exec_cmd("~/dotfiles/waybar/launch.sh"),
|
||||||
end,
|
desc = "(re)launch waybar",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
keys = bind.with_leader("CTRL + B"),
|
||||||
|
dispatcher = hl.dsp.exec_cmd("~/dotfiles/waybar/toggle.sh"),
|
||||||
|
desc = "toggle waybar",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Remove gamemode flag
|
|
||||||
if [ -f ~/.cache/gamemode ] ;then
|
|
||||||
rm ~/.cache/gamemode
|
|
||||||
echo ":: ~/.cache/gamemode removed"
|
|
||||||
fi
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ____ _ _
|
|
||||||
# | _ \(_) __ _ __ _ _ __ ___ ___(_)___
|
|
||||||
# | | | | |/ _` |/ _` | '_ \ / _ \/ __| / __|
|
|
||||||
# | |_| | | (_| | (_| | | | | (_) \__ \ \__ \
|
|
||||||
# |____/|_|\__,_|\__, |_| |_|\___/|___/_|___/
|
|
||||||
# |___/
|
|
||||||
#
|
|
||||||
|
|
||||||
clear
|
|
||||||
sleep 0.5
|
|
||||||
figlet "Diagnosis"
|
|
||||||
echo
|
|
||||||
echo "This script will check that essential packages and "
|
|
||||||
echo "execution commands are available on your system."
|
|
||||||
echo
|
|
||||||
|
|
||||||
_commandExists() {
|
|
||||||
package="$1";
|
|
||||||
if ! type $package > /dev/null 2>&1; then
|
|
||||||
echo ":: ERROR: $package doesn't exists. Please install it with yay -S $2"
|
|
||||||
else
|
|
||||||
echo ":: OK: $package found."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_folderExists() {
|
|
||||||
folder="$1";
|
|
||||||
if [ ! -d $folder ]; then
|
|
||||||
echo ":: ERROR: $folder doesn't exists."
|
|
||||||
else
|
|
||||||
echo ":: OK: $folder found."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_commandExists "rofi" "rofi-wayland"
|
|
||||||
_commandExists "dunst" "dunst"
|
|
||||||
_commandExists "waybar" "waybar"
|
|
||||||
_commandExists "hyprpaper" "hyprpaper"
|
|
||||||
_commandExists "hyprlock" "hyprpaper"
|
|
||||||
_commandExists "hypridle" "hyprpaper"
|
|
||||||
_commandExists "wal" "python-pywal"
|
|
||||||
_commandExists "gum" "gum"
|
|
||||||
_commandExists "wlogout" "wlogout"
|
|
||||||
_commandExists "swww" "swww"
|
|
||||||
_commandExists "eww" "eww"
|
|
||||||
_commandExists "magick" "imagemagick"
|
|
||||||
_commandExists "figlet" "figlet"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Press return to exit"
|
|
||||||
read
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
clear
|
|
||||||
cat <<"EOF"
|
|
||||||
____ _ _ _ ____ __ __
|
|
||||||
| _ \(_)___ __ _| |__ | | ___| _ \| \/ |
|
|
||||||
| | | | / __|/ _` | '_ \| |/ _ \ | | | |\/| |
|
|
||||||
| |_| | \__ \ (_| | |_) | | __/ |_| | | | |
|
|
||||||
|____/|_|___/\__,_|_.__/|_|\___|____/|_| |_|
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "Hyprland recommends the start with the tty login."
|
|
||||||
echo "You can deactivate the current display manager (if exists)."
|
|
||||||
echo ""
|
|
||||||
echo "-> Do you really want to deactivate the display manager?"
|
|
||||||
while true; do
|
|
||||||
read -p "Do you want to enable the sddm display manager and setup theme? (Yy/Nn): " yn
|
|
||||||
case $yn in
|
|
||||||
[Yy]* )
|
|
||||||
if [ -f /etc/systemd/system/display-manager.service ]; then
|
|
||||||
sudo rm /etc/systemd/system/display-manager.service
|
|
||||||
echo "Current display manager removed."
|
|
||||||
else
|
|
||||||
echo "No active display manager found."
|
|
||||||
fi
|
|
||||||
break;;
|
|
||||||
[Nn]* )
|
|
||||||
exit
|
|
||||||
break;;
|
|
||||||
* ) echo "Please answer yes or no.";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# _____ ____ __
|
|
||||||
# / _ \ \ /\ / /\ \ /\ / /
|
|
||||||
# | __/\ V V / \ V V /
|
|
||||||
# \___| \_/\_/ \_/\_/
|
|
||||||
#
|
|
||||||
EWW=`which eww`
|
|
||||||
if [[ ! `pidof eww` ]]; then
|
|
||||||
${EWW} daemon
|
|
||||||
sleep 0.5
|
|
||||||
fi
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sleep 0.5
|
|
||||||
killall -9 Hyprland sleep 2
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ____ _
|
|
||||||
# / ___| __ _ _ __ ___ ___ _ __ ___ ___ __| | ___
|
|
||||||
# | | _ / _` | '_ ` _ \ / _ \ '_ ` _ \ / _ \ / _` |/ _ \
|
|
||||||
# | |_| | (_| | | | | | | __/ | | | | | (_) | (_| | __/
|
|
||||||
# \____|\__,_|_| |_| |_|\___|_| |_| |_|\___/ \__,_|\___|
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ -f ~/.cache/gamemode ] ;then
|
|
||||||
hyprctl reload
|
|
||||||
rm ~/.cache/gamemode
|
|
||||||
notify-send "Gamemode deactivated" "Animations and blur enabled"
|
|
||||||
else
|
|
||||||
hyprctl --batch "\
|
|
||||||
keyword animations:enabled 0;\
|
|
||||||
keyword decoration:drop_shadow 0;\
|
|
||||||
keyword decoration:blur:enabled 0;\
|
|
||||||
keyword general:gaps_in 0;\
|
|
||||||
keyword general:gaps_out 0;\
|
|
||||||
keyword general:border_size 1;\
|
|
||||||
keyword decoration:rounding 0"
|
|
||||||
touch ~/.cache/gamemode
|
|
||||||
notify-send "Gamemode activated" "Animations and blur disabled"
|
|
||||||
fi
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ____ _____ _ __
|
|
||||||
# / ___|_ _| |/ /
|
|
||||||
# | | _ | | | ' /
|
|
||||||
# | |_| | | | | . \
|
|
||||||
# \____| |_| |_|\_\
|
|
||||||
#
|
|
||||||
# Source: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
|
||||||
|
|
||||||
config="$HOME/.config/gtk-3.0/settings.ini"
|
|
||||||
if [ ! -f "$config" ]; then exit 1; fi
|
|
||||||
|
|
||||||
gnome_schema="org.gnome.desktop.interface"
|
|
||||||
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
|
||||||
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
|
||||||
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
|
||||||
cursor_size="$(grep 'gtk-cursor-theme-size' "$config" | sed 's/.*\s*=\s*//')"
|
|
||||||
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
|
|
||||||
|
|
||||||
echo $gtk_theme
|
|
||||||
echo $icon_theme
|
|
||||||
echo $cursor_theme
|
|
||||||
echo $cursor_size
|
|
||||||
echo $font_name
|
|
||||||
|
|
||||||
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
|
|
||||||
gsettings set "$gnome_schema" icon-theme "$icon_theme"
|
|
||||||
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
|
|
||||||
gsettings set "$gnome_schema" font-name "$font_name"
|
|
||||||
gsettings set "$gnome_schema" color-scheme "prefer-dark"
|
|
||||||
|
|
||||||
# if [ -f ~/dotfiles/hypr/conf/cursor.conf ] ;then
|
|
||||||
# echo "exec-once = hyprctl setcursor $cursor_theme $cursor_size" > ~/dotfiles/hypr/conf/cursor.conf
|
|
||||||
# hyprctl setcursor $cursor_theme $cursor_size
|
|
||||||
# fi
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# _ _ _ _ _
|
|
||||||
# | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___
|
|
||||||
# | |/ / _ \ | | | '_ \| | '_ \ / _` | | '_ \ / _` / __|
|
|
||||||
# | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \
|
|
||||||
# |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/
|
|
||||||
# |___/ |___/
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# -----------------------------------------------------
|
|
||||||
|
|
||||||
# -----------------------------------------------------
|
|
||||||
# Get keybindings location based on variation
|
|
||||||
# -----------------------------------------------------
|
|
||||||
config_file=$(cat ~/dotfiles/hypr/conf/keybinding.conf)
|
|
||||||
config_file=${config_file/source = ~/}
|
|
||||||
config_file=${config_file/source=~/}
|
|
||||||
|
|
||||||
# -----------------------------------------------------
|
|
||||||
# Path to keybindings config file
|
|
||||||
# -----------------------------------------------------
|
|
||||||
config_file="/home/$USER$config_file"
|
|
||||||
echo "Reading from: $config_file"
|
|
||||||
|
|
||||||
keybinds=""
|
|
||||||
|
|
||||||
# Detect Start String
|
|
||||||
while read -r line
|
|
||||||
do
|
|
||||||
if [[ "$line" == "bind"* ]]; then
|
|
||||||
|
|
||||||
line="$(echo "$line" | sed 's/$mainMod/SUPER/g')"
|
|
||||||
line="$(echo "$line" | sed 's/bind = //g')"
|
|
||||||
line="$(echo "$line" | sed 's/bindm = //g')"
|
|
||||||
|
|
||||||
IFS='#'
|
|
||||||
read -a strarr <<<"$line"
|
|
||||||
kb_str=${strarr[0]}
|
|
||||||
cm_str=${strarr[1]}
|
|
||||||
|
|
||||||
IFS=','
|
|
||||||
read -a kbarr <<<"$kb_str"
|
|
||||||
|
|
||||||
item="${kbarr[0]} + ${kbarr[1]}"$'\r'"${cm_str:1}"
|
|
||||||
keybinds=$keybinds$item$'\n'
|
|
||||||
fi
|
|
||||||
done < "$config_file"
|
|
||||||
|
|
||||||
sleep 0.2
|
|
||||||
rofi -dmenu -i -markup -eh 2 -replace -p "Keybinds" -config ~/dotfiles/rofi/config-compact.rasi <<< "$keybinds"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
hyprctl reload
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sleep 0.5
|
|
||||||
hyprlock
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
hyprctl -j monitors
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ____
|
|
||||||
# | _ \ _____ _____ _ __
|
|
||||||
# | |_) / _ \ \ /\ / / _ \ '__|
|
|
||||||
# | __/ (_) \ V V / __/ |
|
|
||||||
# |_| \___/ \_/\_/ \___|_|
|
|
||||||
#
|
|
||||||
|
|
||||||
if [[ "$1" == "exit" ]]; then
|
|
||||||
echo ":: Exit"
|
|
||||||
hyprctl dispatch exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "lock" ]]; then
|
|
||||||
echo ":: Lock"
|
|
||||||
sleep 0.5
|
|
||||||
hyprlock
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "reboot" ]]; then
|
|
||||||
echo ":: Reboot"
|
|
||||||
sleep 0.5
|
|
||||||
systemctl reboot
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "shutdown" ]]; then
|
|
||||||
echo ":: Shutdown"
|
|
||||||
sleep 0.5
|
|
||||||
systemctl poweroff
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "suspend" ]]; then
|
|
||||||
echo ":: Suspend"
|
|
||||||
sleep 0.5
|
|
||||||
systemctl suspend
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "hibernate" ]]; then
|
|
||||||
echo ":: Hibernate"
|
|
||||||
sleep 1;
|
|
||||||
systemctl hibernate
|
|
||||||
fi
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sleep 0.5
|
|
||||||
systemctl reboot
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sleep 0.5
|
|
||||||
systemctl poweroff
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
sleep 0.5
|
|
||||||
systemctl suspend
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cache_file="$HOME/.cache/toggle_animation"
|
|
||||||
if [[ $(cat $HOME/dotfiles/hypr/conf/animation.conf) == *"disabled"* ]]; then
|
|
||||||
echo ":: Toggle blocked by disabled.conf variation."
|
|
||||||
else
|
|
||||||
if [ -f $cache_file ] ;then
|
|
||||||
hyprctl keyword animations:enabled true
|
|
||||||
rm $cache_file
|
|
||||||
else
|
|
||||||
hyprctl keyword animations:enabled false
|
|
||||||
touch $cache_file
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# _ _ _ __ _ _
|
|
||||||
# / \ | | |/ _| | ___ __ _| |_
|
|
||||||
# / _ \ | | | |_| |/ _ \ / _` | __|
|
|
||||||
# / ___ \| | | _| | (_) | (_| | |_
|
|
||||||
# /_/ \_\_|_|_| |_|\___/ \__,_|\__|
|
|
||||||
#
|
|
||||||
# by Stephan Raabe (2023)
|
|
||||||
# -----------------------------------------------------
|
|
||||||
|
|
||||||
hyprctl dispatch workspaceopt allfloat
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# __ ______ ____
|
|
||||||
# \ \/ / _ \ / ___|
|
|
||||||
# \ /| | | | | _
|
|
||||||
# / \| |_| | |_| |
|
|
||||||
# /_/\_\____/ \____|
|
|
||||||
#
|
|
||||||
# -----------------------------------------------------
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
# kill all possible running xdg-desktop-portals
|
|
||||||
killall -e xdg-desktop-portal-hyprland
|
|
||||||
killall -e xdg-desktop-portal-gnome
|
|
||||||
killall -e xdg-desktop-portal-kde
|
|
||||||
killall -e xdg-desktop-portal-lxqt
|
|
||||||
killall -e xdg-desktop-portal-wlr
|
|
||||||
killall -e xdg-desktop-portal-gtk
|
|
||||||
killall xdg-desktop-portal
|
|
||||||
sleep 1
|
|
||||||
|
|
||||||
# start xdg-desktop-portal-hyprland
|
|
||||||
/usr/lib/xdg-desktop-portal-hyprland &
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
# start xdg-desktop-portal
|
|
||||||
/usr/lib/xdg-desktop-portal &
|
|
||||||
sleep 1
|
|
||||||
Reference in New Issue
Block a user