Upload files to ".config"
This commit is contained in:
commit
6caae86cef
5 files changed
+682
No files matched your search
@@ -0,0 +1,209 @@
|
||||
-- ~/.config/hypr/hyprland.lua
|
||||
-- Hyprland 0.55+ Lua configuration
|
||||
-- Ties together waybar, swaync, kitty, rofi, hyprpaper, hypridle, hyprlock,
|
||||
-- grim, slurp, swappy, and dolphin.
|
||||
-- See https://wiki.hypr.land/Configuring/Start/
|
||||
|
||||
------------------
|
||||
---- MONITORS ----
|
||||
------------------
|
||||
-- Adjust output/mode/position for your real setup (hyprctl monitors),
|
||||
-- this default just mirrors "auto everything".
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
|
||||
---------------------
|
||||
---- MY PROGRAMS ----
|
||||
---------------------
|
||||
local terminal = "kitty"
|
||||
local fileManager = "dolphin"
|
||||
local menu = "rofi -show drun"
|
||||
|
||||
-------------------------------
|
||||
---- ENVIRONMENT VARIABLES ----
|
||||
-------------------------------
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
|
||||
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
||||
hl.env("XDG_SESSION_TYPE", "wayland")
|
||||
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
|
||||
|
||||
-------------------
|
||||
---- AUTOSTART ----
|
||||
-------------------
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("hyprpaper")
|
||||
hl.exec_cmd("waybar")
|
||||
hl.exec_cmd("swaync")
|
||||
hl.exec_cmd("hypridle")
|
||||
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
|
||||
hl.exec_cmd("/usr/lib/polkit-kde-authentication-agent-1")
|
||||
end)
|
||||
|
||||
-----------------------
|
||||
---- LOOK AND FEEL ----
|
||||
-----------------------
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 4,
|
||||
gaps_out = 8,
|
||||
border_size = 2,
|
||||
col = {
|
||||
active_border = { colors = { "rgba(89b4faee)", "rgba(cba6f7ee)" }, angle = 45 },
|
||||
inactive_border = "rgba(595959aa)",
|
||||
},
|
||||
resize_on_border = true,
|
||||
allow_tearing = false,
|
||||
layout = "dwindle",
|
||||
},
|
||||
decoration = {
|
||||
rounding = 10,
|
||||
rounding_power = 2,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.95,
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 12,
|
||||
render_power = 3,
|
||||
color = 0xee1a1a1a,
|
||||
},
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 6,
|
||||
passes = 3,
|
||||
vibrancy = 0.1696,
|
||||
},
|
||||
},
|
||||
animations = {
|
||||
enabled = true,
|
||||
},
|
||||
dwindle = {
|
||||
preserve_split = true,
|
||||
},
|
||||
master = {
|
||||
new_status = "master",
|
||||
},
|
||||
misc = {
|
||||
force_default_wallpaper = 0,
|
||||
disable_hyprland_logo = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Bezier curves + animation leaves
|
||||
hl.curve("myBezier", { type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 5, bezier = "myBezier" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 5, bezier = "default", style = "popin 80%" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 8, bezier = "default" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 5, bezier = "default" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 4, bezier = "default" })
|
||||
|
||||
---------------
|
||||
---- INPUT ----
|
||||
---------------
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us",
|
||||
follow_mouse = 1,
|
||||
sensitivity = 0,
|
||||
touchpad = {
|
||||
natural_scroll = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
hl.gesture({
|
||||
fingers = 3,
|
||||
direction = "horizontal",
|
||||
action = "workspace",
|
||||
})
|
||||
|
||||
---------------------
|
||||
---- KEYBINDINGS ----
|
||||
---------------------
|
||||
local mainMod = "SUPER"
|
||||
|
||||
hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal))
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
||||
hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.exec_cmd("hyprctl dispatch 'hl.dsp.exit()'"))
|
||||
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
||||
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd(menu))
|
||||
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
|
||||
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))
|
||||
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
|
||||
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("hyprlock"))
|
||||
|
||||
-- Notifications (swaync)
|
||||
hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("swaync-client -t -sw"))
|
||||
hl.bind(mainMod .. " + SHIFT + N", hl.dsp.exec_cmd("swaync-client -d -sw"))
|
||||
|
||||
-- Screenshots: grim + slurp (+ swappy for annotation)
|
||||
hl.bind("Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | swappy -f -"))
|
||||
hl.bind(mainMod .. " + Print", hl.dsp.exec_cmd("grim - | swappy -f -"))
|
||||
hl.bind(mainMod .. " + SHIFT + S",
|
||||
hl.dsp.exec_cmd("grim -g \"$(slurp)\" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"))
|
||||
|
||||
-- Move focus
|
||||
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
|
||||
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
|
||||
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" }))
|
||||
|
||||
-- Switch / move to workspace [1-10]
|
||||
for i = 1, 10 do
|
||||
local key = i % 10 -- 10 maps to key 0
|
||||
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
||||
end
|
||||
|
||||
-- Scroll through workspaces
|
||||
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
|
||||
-- Move/resize windows with mouse
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Media / volume / brightness
|
||||
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"),
|
||||
{ locked = true, repeating = true })
|
||||
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
|
||||
{ locked = true, repeating = true })
|
||||
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
|
||||
{ locked = true, repeating = true })
|
||||
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"),
|
||||
{ locked = true, repeating = true })
|
||||
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"),
|
||||
{ locked = true, repeating = true })
|
||||
|
||||
--------------------------------
|
||||
---- WINDOWS AND WORKSPACES ----
|
||||
--------------------------------
|
||||
hl.window_rule({
|
||||
name = "suppress-maximize-events",
|
||||
match = { class = ".*" },
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "float-swappy",
|
||||
match = { class = "^(swappy)$" },
|
||||
float = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "float-pavucontrol",
|
||||
match = { class = "^(pavucontrol)$" },
|
||||
float = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "float-open-file",
|
||||
match = { title = "^(Open File)$" },
|
||||
float = true,
|
||||
})
|
||||
Reference in new issue
Block a user