refactor(hypr): split configuration and extra bindings
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us",
|
||||
kb_variant = ",qwerty",
|
||||
-- kb_model =
|
||||
-- kb_options = ctrl:nocaps
|
||||
kb_options = "caps:ctrl_modifier,compose:ralt",
|
||||
-- kb_options = compose:ralt
|
||||
follow_mouse = 1,
|
||||
repeat_rate = 40,
|
||||
repeat_delay = 600,
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true,
|
||||
disable_while_typing = true,
|
||||
clickfinger_behavior = true,
|
||||
scroll_factor = 0.7,
|
||||
},
|
||||
scroll_method = "2fg",
|
||||
|
||||
sensitivity = 0, -- -1.0 - 1.0, 0 means no modification.
|
||||
},
|
||||
|
||||
ecosystem = {
|
||||
no_update_news = true,
|
||||
enforce_permissions = false,
|
||||
},
|
||||
|
||||
general = {
|
||||
gaps_in = 3,
|
||||
gaps_out = 3,
|
||||
border_size = 2,
|
||||
allow_tearing = true,
|
||||
snap = {
|
||||
enabled = true
|
||||
},
|
||||
col = {
|
||||
active_border = { colors = { "rgba(33ccffee)", "rgba(00ff99ee)" }, angle = 45 },
|
||||
inactive_border = "rgba(595959aa)",
|
||||
},
|
||||
|
||||
layout = "master"
|
||||
},
|
||||
|
||||
master = {
|
||||
allow_small_split = true,
|
||||
mfact = 0.50,
|
||||
new_status = "master",
|
||||
orientation = "center",
|
||||
},
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true,
|
||||
force_split = 2,
|
||||
},
|
||||
|
||||
scrolling = {
|
||||
focus_fit_method = 0,
|
||||
column_width = 0.49,
|
||||
fullscreen_on_one_column = true
|
||||
},
|
||||
|
||||
cursor = {
|
||||
hide_on_key_press = true,
|
||||
warp_on_change_workspace = 1,
|
||||
},
|
||||
|
||||
binds = {
|
||||
hide_special_on_workspace_change = true,
|
||||
},
|
||||
decoration = {
|
||||
rounding = 1,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.95,
|
||||
dim_inactive = true,
|
||||
dim_special = 0.0,
|
||||
dim_strength = 0.3,
|
||||
|
||||
shadow = {
|
||||
enabled = false,
|
||||
range = 2,
|
||||
render_power = 3,
|
||||
color = "rgba(1a1a1aee)",
|
||||
},
|
||||
|
||||
blur = {
|
||||
enabled = false,
|
||||
size = 3,
|
||||
passes = 1,
|
||||
vibrancy = 0.1696,
|
||||
},
|
||||
},
|
||||
|
||||
group = {
|
||||
groupbar = {
|
||||
enabled = false
|
||||
}
|
||||
},
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true,
|
||||
disable_splash_rendering = true,
|
||||
disable_scale_notification = true,
|
||||
focus_on_activate = true,
|
||||
anr_missed_pings = 3,
|
||||
on_focus_under_fullscreen = 1,
|
||||
mouse_move_enables_dpms = true,
|
||||
animate_manual_resizes = true,
|
||||
mouse_move_focuses_monitor = true,
|
||||
enable_swallow = true,
|
||||
enable_anr_dialog = false,
|
||||
force_default_wallpaper = true,
|
||||
initial_workspace_tracking = 0,
|
||||
allow_session_lock_restore = true,
|
||||
},
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true
|
||||
},
|
||||
|
||||
animations = {
|
||||
enabled = true,
|
||||
}
|
||||
})
|
||||
|
||||
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1.0 } } })
|
||||
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.curve("generic", { type = "bezier", points = { { 0.5, 0.9 }, { 0.1, 1.08 } } })
|
||||
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1.0 } } })
|
||||
hl.curve("overshoot", { type = "bezier", points = { { 0.5, 0.9 }, { 0.1, 1.1 } } })
|
||||
hl.curve("rubber", { type = "spring", mass = 1, stiffness = 70, dampening = 10 })
|
||||
|
||||
hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||
hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||
|
||||
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 3.79, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", style = "popin 87%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||
hl.animation({ leaf = "fadeSwitch", enabled = false })
|
||||
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 0.5, bezier = "quick" })
|
||||
|
||||
hl.animation({ leaf = "specialWorkspaceIn", enabled = true, speed = 3, bezier = "easeOutQuint", style = "slide top" })
|
||||
hl.animation({ leaf = "specialWorkspaceOut", enabled = true, speed = 2, bezier = "easeInOutCubic", style = "slide bottom" })
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
-- Open rofi on first press, closes it on second
|
||||
hl.bind("SUPER + Space", hl.dsp.exec_raw("rofi -show combi --modes combi"),
|
||||
{ release = true, description = "Open Application Menu" })
|
||||
hl.bind("SUPER + SHIFT + SPACE", hl.dsp.exec_cmd("~/.local/bin/hyprland-fetch-client"),
|
||||
{ release = true, description = "Fetch client" })
|
||||
hl.bind("SUPER + CONTROL + SPACE",
|
||||
hl.dsp.exec_cmd("~/.local/bin/hyprland-focus-client"),
|
||||
{ release = true, description = "Focus client" }
|
||||
)
|
||||
hl.bind("SUPER + slash",
|
||||
hl.dsp.exec_cmd("ROFI_PASS_BACKEND=wtype ROFI_PASS_CLIPBOARD_BACKEND=wl-clipboard ~/.local/bin/rofi-pass"),
|
||||
{ release = true, description = "Open rofi-pass" })
|
||||
|
||||
hl.bind("SUPER + Y", hl.dsp.exec_cmd("makoctl dismiss"), { description = "Dismiss notifications" })
|
||||
|
||||
@@ -6,166 +6,13 @@ local music = "gtk-launch spotify.desktop"
|
||||
local HYPR = "SUPER + CONTROL + SHIFT + ALT + "
|
||||
|
||||
require("sjb/monitors")
|
||||
require("sjb/configuration")
|
||||
require("sjb/functions")
|
||||
require("sjb/rules")
|
||||
require("sjb/envs")
|
||||
require("sjb/autostart")
|
||||
require("theme")
|
||||
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us",
|
||||
kb_variant = ",qwerty",
|
||||
-- kb_model =
|
||||
-- kb_options = ctrl:nocaps
|
||||
kb_options = "caps:ctrl_modifier,compose:ralt",
|
||||
-- kb_options = compose:ralt
|
||||
follow_mouse = 1,
|
||||
repeat_rate = 40,
|
||||
repeat_delay = 600,
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true,
|
||||
disable_while_typing = true,
|
||||
clickfinger_behavior = true,
|
||||
scroll_factor = 0.7,
|
||||
},
|
||||
scroll_method = "2fg",
|
||||
|
||||
sensitivity = 0, -- -1.0 - 1.0, 0 means no modification.
|
||||
},
|
||||
|
||||
ecosystem = {
|
||||
no_update_news = true,
|
||||
enforce_permissions = false,
|
||||
},
|
||||
|
||||
general = {
|
||||
gaps_in = 3,
|
||||
gaps_out = 3,
|
||||
border_size = 2,
|
||||
allow_tearing = true,
|
||||
snap = {
|
||||
enabled = true
|
||||
},
|
||||
col = {
|
||||
active_border = { colors = { "rgba(33ccffee)", "rgba(00ff99ee)" }, angle = 45 },
|
||||
inactive_border = "rgba(595959aa)",
|
||||
},
|
||||
|
||||
layout = "master"
|
||||
},
|
||||
|
||||
master = {
|
||||
allow_small_split = true,
|
||||
mfact = 0.50,
|
||||
new_status = "master",
|
||||
orientation = "center",
|
||||
},
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true,
|
||||
force_split = 2,
|
||||
},
|
||||
|
||||
scrolling = {
|
||||
focus_fit_method = 0,
|
||||
column_width = 0.49,
|
||||
fullscreen_on_one_column = true
|
||||
},
|
||||
|
||||
cursor = {
|
||||
hide_on_key_press = true,
|
||||
warp_on_change_workspace = 1,
|
||||
},
|
||||
|
||||
binds = {
|
||||
hide_special_on_workspace_change = true,
|
||||
},
|
||||
decoration = {
|
||||
rounding = 1,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.95,
|
||||
dim_inactive = true,
|
||||
dim_special = 0.0,
|
||||
dim_strength = 0.3,
|
||||
|
||||
shadow = {
|
||||
enabled = false,
|
||||
range = 2,
|
||||
render_power = 3,
|
||||
color = "rgba(1a1a1aee)",
|
||||
},
|
||||
|
||||
blur = {
|
||||
enabled = false,
|
||||
size = 3,
|
||||
passes = 1,
|
||||
vibrancy = 0.1696,
|
||||
},
|
||||
},
|
||||
|
||||
group = {
|
||||
groupbar = {
|
||||
enabled = false
|
||||
}
|
||||
},
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true,
|
||||
disable_splash_rendering = true,
|
||||
disable_scale_notification = true,
|
||||
focus_on_activate = true,
|
||||
anr_missed_pings = 3,
|
||||
on_focus_under_fullscreen = 1,
|
||||
mouse_move_enables_dpms = true,
|
||||
animate_manual_resizes = true,
|
||||
mouse_move_focuses_monitor = true,
|
||||
enable_swallow = true,
|
||||
enable_anr_dialog = false,
|
||||
force_default_wallpaper = true,
|
||||
initial_workspace_tracking = 0,
|
||||
allow_session_lock_restore = true,
|
||||
},
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true
|
||||
},
|
||||
|
||||
animations = {
|
||||
enabled = true,
|
||||
}
|
||||
})
|
||||
|
||||
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1.0 } } })
|
||||
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.curve("generic", { type = "bezier", points = { { 0.5, 0.9 }, { 0.1, 1.08 } } })
|
||||
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1.0 } } })
|
||||
hl.curve("overshoot", { type = "bezier", points = { { 0.5, 0.9 }, { 0.1, 1.1 } } })
|
||||
hl.curve("rubber", { type = "spring", mass = 1, stiffness = 70, dampening = 10 })
|
||||
|
||||
hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||
hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||
|
||||
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 3.79, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", style = "popin 87%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||
hl.animation({ leaf = "fadeSwitch", enabled = false })
|
||||
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 0.5, bezier = "quick" })
|
||||
|
||||
hl.animation({ leaf = "specialWorkspaceIn", enabled = true, speed = 3, bezier = "easeOutQuint", style = "slide top" })
|
||||
hl.animation({ leaf = "specialWorkspaceOut", enabled = true, speed = 2, bezier = "easeInOutCubic", style = "slide bottom" })
|
||||
|
||||
-- Keybindings
|
||||
|
||||
hl.bind("SUPER + SHIFT + return", hl.dsp.exec_cmd("footclient -a terminal-herdr -T terminal-herdr herdr --session=main"), { description = "Open herdr terminal" })
|
||||
@@ -189,20 +36,6 @@ hl.bind(
|
||||
toggle_master_scrolling,
|
||||
{ description = "Layout: Toggle master/scrolling" }
|
||||
)
|
||||
|
||||
-- Open rofi on first press, closes it on second
|
||||
hl.bind("SUPER + Space", hl.dsp.exec_raw("rofi -show combi --modes combi"),
|
||||
{ release = true, description = "Open Application Menu" })
|
||||
hl.bind("SUPER + SHIFT + SPACE", hl.dsp.exec_cmd("~/.local/bin/hyprland-fetch-client"),
|
||||
{ release = true, description = "Fetch client" })
|
||||
hl.bind("SUPER + CONTROL + SPACE",
|
||||
hl.dsp.exec_cmd("~/.local/bin/hyprland-focus-client"),
|
||||
{ release = true, description = "Focus client" }
|
||||
)
|
||||
hl.bind("SUPER + slash",
|
||||
hl.dsp.exec_cmd("ROFI_PASS_BACKEND=wtype ROFI_PASS_CLIPBOARD_BACKEND=wl-clipboard ~/.local/bin/rofi-pass"),
|
||||
{ release = true, description = "Open rofi-pass" })
|
||||
|
||||
hl.bind("Print",
|
||||
hl.dsp.exec_cmd("hyprshot -m window -o ~/Pictures/ -- tensaku-edit"),
|
||||
{ description = "Take screenshot" })
|
||||
@@ -240,9 +73,6 @@ hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { description
|
||||
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { description = "Previous media" })
|
||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { description = "Next media" })
|
||||
|
||||
hl.bind("SUPER + Y", hl.dsp.exec_cmd("makoctl dismiss"), { description = "Dismiss notifications" })
|
||||
|
||||
|
||||
hl.bind("SUPER + W", hl.dsp.window.close(), { description = "Window: Close" })
|
||||
hl.bind("SUPER + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }),
|
||||
{ description = "Window: Toggle fullscreen" })
|
||||
@@ -282,11 +112,6 @@ end, { description = "Window: Swap with prev" })
|
||||
hl.bind("ALT + Tab", cycle_next_window({ next = true }), { description = "Window: Cycle next" })
|
||||
hl.bind("ALT + SHIFT + Tab", cycle_next_window({ next = false }), { description = "Window: Cycle prev" })
|
||||
|
||||
-- hl.bind("ALT + TAB", hl.dsp.window.cycle_next(), { description = "Focus on next window" })
|
||||
-- hl.bind("ALT + SHIFT + TAB", hl.dsp.window.cycle_next({ next = false }), { description = "Focus on previous window" })
|
||||
-- hl.bind("ALT + TAB", hl.dsp.window.bring_to_top(), { description = "Reveal active window on top" })
|
||||
-- hl.bind("ALT + SHIFT + TAB", hl.dsp.window.bring_to_top(), { description = "Reveal active window on top" })
|
||||
|
||||
hl.bind("CONTROL + ALT + TAB", hl.dsp.focus({ monitor = "+1" }), { description = "Focus on next monitor" })
|
||||
hl.bind("CONTROL + ALT + SHIFT + TAB", hl.dsp.focus({ monitor = "-1" }), { description = "Focus on previous monitor" })
|
||||
|
||||
@@ -386,23 +211,10 @@ hl.bind("SUPER + CONTROL + Delete", hl.dsp.exec_cmd("hyprland-toggle-monitor eDP
|
||||
|
||||
hl.bind("SUPER + Escape", hl.dsp.exec_raw("loginctl lock-session"), { description = "Lock screen" })
|
||||
hl.bind("SUPER + SHIFT + escape", hl.dsp.exec_raw("systemctl suspend"), { description = "Suspend" })
|
||||
--hl.bind("SUPER + ALT + escape", hl.dsp.exec_raw("uwsm stop"), { description = "Stop UWSM" })
|
||||
hl.bind("SUPER + ALT + escape", hl.dsp.exit(), { description = "Exit Hyprland" })
|
||||
hl.bind("SUPER + CONTROL + escape", hl.dsp.exec_raw("reboot"), { description = "Reboot" })
|
||||
hl.bind("SUPER + SHIFT + CONTROL + escape", hl.dsp.exec_raw("systemctl poweroff"), { description = "Power off" })
|
||||
|
||||
-- hl.bind("SUPER + L", hl.dsp.window.resize("right"), { repeating = true, description = "Window: Resize right" })
|
||||
-- hl.bind("SUPER + J", hl.dsp.window.resize("down"), { repeating = true, description = "Window: Resize down" })
|
||||
-- hl.bind("SUPER + K", hl.dsp.window.resize("up"), { repeating = true, description = "Window: Resize up" })
|
||||
|
||||
-- # Change Workspace Mode
|
||||
--
|
||||
-- bind = SUPER SHIFT, X, workspaceopt, allfloat
|
||||
-- bind = SUPER SHIFT, X, exec, $notifycmd "Toggled All Float Mode"
|
||||
|
||||
-- bind = SUPER SHIFT, Z, workspaceopt, allpseudo
|
||||
-- bind = SUPER SHIFT, Z, exec, $notifycmd "Toggled All Pseudo Mode"
|
||||
|
||||
hl.on("keybinds.submap", function(name)
|
||||
if name == "" then
|
||||
hl.notification.create({ text = "Exited submap", duration = 2000, icon = "hint" })
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"~/.config/hypr/hyprlock.conf" = { source = "config/hypr/hyprlock.conf", mode = "symlink" }
|
||||
"~/.config/hypr/hyprpm.conf" = { source = "config/hypr/hyprpm.conf", mode = "symlink" }
|
||||
"~/.config/hypr/hyprland.lua/sjb" = { block = 'require("sjb.init")' }
|
||||
"~/.config/hypr/hyprland.lua/extra" = { block = 'require("sjb.extra")' }
|
||||
|
||||
"~/.config/kitty" = "config/kitty"
|
||||
"~/.config/rofi" = "config/rofi"
|
||||
|
||||
Reference in New Issue
Block a user