Compare commits
6 Commits
67085827b5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| cfd1a4526a | |||
| aae0275e60 | |||
| 1b86de1ab1 | |||
| 3a1899cae1 | |||
| 5ad06b3c9e | |||
| e1886aa6b7 |
7
.luarc.json
Normal file
7
.luarc.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"workspace": {
|
||||
"library": [
|
||||
"/usr/share/hypr/stubs"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,7 @@ exec-once = quickshell
|
||||
exec-once = dunst
|
||||
exec-once = firefox
|
||||
exec-once = hyprpaper
|
||||
exec-once = gtk-launch deezer-pwa
|
||||
# exec-once = gtk-launch deezer-pwa
|
||||
# hl.window_rule({
|
||||
# name = "deezer-workspace"
|
||||
# match = { initialTitle = "Deezer" }
|
||||
@ -64,6 +64,7 @@ env = WLR_NO_HARDWARE_CURSORS,1
|
||||
env = CLUTTER_BACKEND,wayland
|
||||
env = SDL_VIDEODRIVER,wayland,x11
|
||||
env = GDK_BACKEND,wayland,x11
|
||||
env = SDL_AUDIODRIVER,pipewire
|
||||
|
||||
# jetbrains
|
||||
env = _JAVA_AWT_WM_NONREPARENTING, 1
|
||||
@ -109,11 +110,13 @@ general {
|
||||
resize_on_border = false
|
||||
|
||||
# Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
allow_tearing = true
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# windowrule = immediate, class:^(cs2)$
|
||||
|
||||
|
||||
# --- Decorations / cosmic glass ---
|
||||
decoration {
|
||||
@ -216,6 +219,7 @@ misc {
|
||||
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
||||
middle_click_paste = false
|
||||
vrr = 2
|
||||
}
|
||||
|
||||
|
||||
|
||||
382
roles/hyprland/files/hypr/hyprland.lua
Normal file
382
roles/hyprland/files/hypr/hyprland.lua
Normal file
@ -0,0 +1,382 @@
|
||||
-- ################
|
||||
-- ### MONITORS ###
|
||||
-- ################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
-- Default fallback for any monitor not explicitly configured below.
|
||||
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "auto" })
|
||||
|
||||
-- Host-specific monitor + workspace config (symlinked to monitors.lua / workspaces.lua)
|
||||
require("monitors")
|
||||
require("workspaces")
|
||||
|
||||
-- ###################
|
||||
-- ### MY PROGRAMS ###
|
||||
-- ###################
|
||||
|
||||
local terminal = "ghostty"
|
||||
local fileManager = "ghostty -e yazi"
|
||||
local menu = "env XDG_CURRENT_DESKTOP=Hyprland wofi --show drun"
|
||||
|
||||
-- #################
|
||||
-- ### AUTOSTART ###
|
||||
-- #################
|
||||
|
||||
-- Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("/usr/lib/hyprpolkitagent/hyprpolkitagent")
|
||||
-- hl.exec_cmd("hyprpanel")
|
||||
hl.exec_cmd("quickshell")
|
||||
hl.exec_cmd("dunst")
|
||||
hl.exec_cmd("firefox")
|
||||
hl.exec_cmd("hyprpaper")
|
||||
-- hl.exec_cmd("gtk-launch deezer-pwa")
|
||||
|
||||
-- gnome keyring secret service
|
||||
hl.exec_cmd(
|
||||
"dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE"
|
||||
)
|
||||
end)
|
||||
|
||||
hl.config({
|
||||
debug = {
|
||||
disable_logs = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- #############################
|
||||
-- ### ENVIRONMENT VARIABLES ###
|
||||
-- #############################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
hl.env("QT_QPA_PLATFORM", "wayland")
|
||||
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
|
||||
hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1")
|
||||
hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1")
|
||||
|
||||
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
||||
hl.env("XDG_SESSION_TYPE", "wayland")
|
||||
hl.env("WLR_NO_HARDWARE_CURSORS", "1")
|
||||
hl.env("CLUTTER_BACKEND", "wayland")
|
||||
hl.env("SDL_VIDEODRIVER", "wayland,x11")
|
||||
hl.env("GDK_BACKEND", "wayland,x11")
|
||||
hl.env("SDL_AUDIODRIVER", "pipewire")
|
||||
|
||||
-- jetbrains
|
||||
hl.env("_JAVA_AWT_WM_NONREPARENTING", "1")
|
||||
|
||||
-- ###################
|
||||
-- ### PERMISSIONS ###
|
||||
-- ###################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/
|
||||
--
|
||||
-- hl.config({ ecosystem = { enforce_permissions = true } })
|
||||
-- hl.permission({ binary = "/usr/(bin|local/bin)/grim", type = "screencopy", mode = "allow" })
|
||||
-- hl.permission({ binary = "/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", type = "screencopy", mode = "allow" })
|
||||
-- hl.permission({ binary = "/usr/(bin|local/bin)/hyprpm", type = "plugin", mode = "allow" })
|
||||
|
||||
-- #####################
|
||||
-- ### LOOK AND FEEL ###
|
||||
-- #####################
|
||||
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 5,
|
||||
gaps_out = 10,
|
||||
|
||||
border_size = 3,
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#variable-types for info about colors
|
||||
col = {
|
||||
active_border = { colors = { "rgba(9b1a1aee)", "rgba(c94040ee)" }, angle = 45 },
|
||||
inactive_border = "rgba(595959aa)",
|
||||
},
|
||||
|
||||
-- Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false,
|
||||
|
||||
-- Please see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ before you turn this on
|
||||
allow_tearing = false,
|
||||
|
||||
layout = "dwindle",
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 12,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.96,
|
||||
fullscreen_opacity = 1.0,
|
||||
|
||||
-- Shadows (new nested syntax)
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 20, -- size of the shadow
|
||||
render_power = 3, -- 1–4, higher = faster falloff
|
||||
color = "rgba(0, 0, 0, 0.35)",
|
||||
offset = { 0, 6 }, -- optional: drop slightly downward
|
||||
scale = 1.0,
|
||||
},
|
||||
|
||||
-- Blur (nested)
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 8,
|
||||
passes = 3,
|
||||
new_optimizations = true,
|
||||
noise = 0.02,
|
||||
contrast = 1.00,
|
||||
brightness = 1.00,
|
||||
vibrancy = 0.18,
|
||||
xray = true,
|
||||
},
|
||||
},
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = true,
|
||||
no_break_fs_vrr = 1,
|
||||
min_refresh_rate = 60,
|
||||
},
|
||||
|
||||
animations = {
|
||||
enabled = true, -- yes, please :)
|
||||
},
|
||||
})
|
||||
|
||||
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.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1.0 } } })
|
||||
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } })
|
||||
|
||||
-- Spring referenced by the window animations below
|
||||
hl.curve("easy", { type = "spring", mass = 1, stiffness = 71.2633, dampening = 15.8273644 })
|
||||
|
||||
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 = 4.79, spring = "easy" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", 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 = "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 = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more
|
||||
hl.config({
|
||||
dwindle = {
|
||||
preserve_split = true, -- You probably want this
|
||||
},
|
||||
})
|
||||
|
||||
-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more
|
||||
hl.config({
|
||||
master = {
|
||||
new_status = "master",
|
||||
},
|
||||
})
|
||||
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#misc
|
||||
hl.config({
|
||||
misc = {
|
||||
force_default_wallpaper = 0, -- Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = true, -- If true disables the random hyprland logo / anime girl background. :(
|
||||
middle_click_paste = false,
|
||||
vrr = 2,
|
||||
},
|
||||
})
|
||||
|
||||
-- #############
|
||||
-- ### INPUT ###
|
||||
-- #############
|
||||
--
|
||||
-- https://wiki.hypr.land/Configuring/Basics/Variables/#input
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us,de",
|
||||
kb_variant = "altgr-intl",
|
||||
-- kb_model =
|
||||
-- kb_options = "grp:caps_toggle",
|
||||
-- kb_rules =
|
||||
|
||||
follow_mouse = 2,
|
||||
|
||||
sensitivity = 0, -- -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
-- scroll_method = "on_button_down",
|
||||
-- scroll_button = 274,
|
||||
},
|
||||
})
|
||||
|
||||
-- Example per-device config
|
||||
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ for more
|
||||
hl.device({
|
||||
name = "benq-zowie-benq-zowie-gaming-mouse",
|
||||
sensitivity = 0,
|
||||
})
|
||||
|
||||
-- ###################
|
||||
-- ### KEYBINDINGS ###
|
||||
-- ###################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Binds/
|
||||
local mainMod = "SUPER" -- Sets "Super" key as main modifier
|
||||
|
||||
hl.bind(mainMod .. " + T", hl.dsp.exec_cmd(terminal))
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
||||
hl.bind(mainMod .. " + N", hl.dsp.exec_cmd(fileManager))
|
||||
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu))
|
||||
hl.bind(mainMod .. " + G", hl.dsp.layout("togglesplit")) -- dwindle
|
||||
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ mode = "maximized" }))
|
||||
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.fullscreen({ mode = "fullscreen" }))
|
||||
hl.bind(mainMod .. " + B", hl.dsp.exec_cmd("firefox"))
|
||||
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("thunderbird"))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("hyprlock"))
|
||||
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
|
||||
|
||||
-- Move focus with mainMod + arrow keys
|
||||
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "l" }))
|
||||
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "r" }))
|
||||
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "u" }))
|
||||
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "d" }))
|
||||
|
||||
-- Move window with mainMod + SHIFT + arrow keys
|
||||
hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ direction = "l" }))
|
||||
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ direction = "r" }))
|
||||
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.move({ direction = "u" }))
|
||||
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.move({ direction = "d" }))
|
||||
hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.window.move({ monitor = "+1" }))
|
||||
hl.bind(mainMod .. " + SHIFT + period", hl.dsp.window.move({ monitor = "-1" }))
|
||||
|
||||
-- Resize
|
||||
hl.bind(mainMod .. " + ALT + left", hl.dsp.window.resize({ x = -20, y = 0, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + ALT + right", hl.dsp.window.resize({ x = 20, y = 0, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + ALT + up", hl.dsp.window.resize({ x = 0, y = -20, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + ALT + down", hl.dsp.window.resize({ x = 0, y = 20, relative = true }), { repeating = true })
|
||||
|
||||
-- Special workspace (scratchpad)
|
||||
hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))
|
||||
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
|
||||
|
||||
-- Scroll through existing workspaces with mainMod + scroll
|
||||
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 mainMod + LMB/RMB and dragging
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Laptop multimedia keys for volume and LCD 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 })
|
||||
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = 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 })
|
||||
|
||||
-- Requires playerctl / Deezer controls
|
||||
hl.bind("CTRL + ALT + K", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh play-pause"))
|
||||
hl.bind("CTRL + ALT + Left", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh previous"))
|
||||
hl.bind("CTRL + ALT + Right", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh next"))
|
||||
hl.bind("CTRL + ALT + Up", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh +5%"))
|
||||
hl.bind("CTRL + ALT + Down", hl.dsp.exec_cmd("~/.config/hypr/scripts/deezer-controls.sh -5%"))
|
||||
|
||||
hl.bind("F7", hl.dsp.pass({ window = "class:^(discord)$" }))
|
||||
hl.bind("F8", hl.dsp.pass({ window = "class:^(discord)$" }))
|
||||
|
||||
-- Printscreen: screenshot a selected region (interactive)
|
||||
hl.bind("Print", hl.dsp.exec_cmd("hyprshot -zm region"))
|
||||
|
||||
-- ######################
|
||||
-- ### WINDOW RULES ###
|
||||
-- ######################
|
||||
--
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/ for more
|
||||
|
||||
-- Ignore maximize requests from apps. You'll probably like this.
|
||||
hl.window_rule({
|
||||
name = "suppress-maximize-events",
|
||||
match = { class = ".*" },
|
||||
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
|
||||
hl.config({
|
||||
xwayland = {
|
||||
enabled = true,
|
||||
use_nearest_neighbor = true,
|
||||
force_zero_scaling = false,
|
||||
create_abstract_socket = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- Fix some dragging issues with XWayland
|
||||
hl.window_rule({
|
||||
name = "fix-xwayland-drags",
|
||||
match = {
|
||||
class = "^$",
|
||||
title = "^$",
|
||||
xwayland = true,
|
||||
float = true,
|
||||
fullscreen = false,
|
||||
pin = false,
|
||||
},
|
||||
|
||||
no_focus = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-shortcuts",
|
||||
match = { class = "^(jetbrains-.*|android-studio)$" },
|
||||
|
||||
no_shortcuts_inhibit = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-tile",
|
||||
match = { class = "^(jetbrains-.*|android-studio)$" },
|
||||
|
||||
float = false,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-tab-drag",
|
||||
match = {
|
||||
class = "^(jetbrains-.*|android-studio)$",
|
||||
title = "^(\\s*|Delete|Replace All)$",
|
||||
},
|
||||
|
||||
no_initial_focus = true,
|
||||
stay_focused = true,
|
||||
float = true,
|
||||
center = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "jetbrains-commit-preview",
|
||||
match = {
|
||||
class = "^(jetbrains-.*|android-studio)$",
|
||||
title = "^Commit.*$",
|
||||
},
|
||||
|
||||
float = false,
|
||||
})
|
||||
4
roles/hyprland/files/hypr/monitors/jk-nb.lua
Normal file
4
roles/hyprland/files/hypr/monitors/jk-nb.lua
Normal file
@ -0,0 +1,4 @@
|
||||
-- Generated originally by nwg-displays; ported to Lua.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
|
||||
hl.monitor({ output = "eDP-1", mode = "2880x1800@90.0", position = "0x0", scale = 1.4999999999999996 })
|
||||
7
roles/hyprland/files/hypr/monitors/jk-pc.lua
Normal file
7
roles/hyprland/files/hypr/monitors/jk-pc.lua
Normal file
@ -0,0 +1,7 @@
|
||||
-- Generated originally by nwg-displays; ported to Lua.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Monitors/
|
||||
|
||||
hl.monitor({ output = "DP-1", mode = "2560x1440@165.0", position = "6626x876", scale = 1.0, vrr = 2 })
|
||||
hl.monitor({ output = "DP-2", mode = "2560x1440@165.0", position = "4066x876", scale = 1.0 })
|
||||
hl.monitor({ output = "HDMI-A-2", mode = "1920x1080@60.0", position = "9186x396", scale = 1.0, transform = 3 })
|
||||
hl.monitor({ output = "HDMI-A-1", disabled = true })
|
||||
@ -1,6 +1,16 @@
|
||||
# Generated by nwg-displays on 2026-04-20 at 01:17:12. Do not edit manually.
|
||||
|
||||
monitor=DP-1,2560x1440@165.0,6626x876,1.0
|
||||
# hl.monitor({
|
||||
# output = "DP-1",
|
||||
# mode = "2560x1440@165.0",
|
||||
# position = "6626x876",
|
||||
# scale = 1,
|
||||
# bitdepth = 10,
|
||||
# cm = "hdr",
|
||||
# })
|
||||
|
||||
|
||||
monitor=DP-1,2560x1440@165.0,6626x876,1.0,vrr,2
|
||||
monitor=DP-2,2560x1440@165.0,4066x876,1.0
|
||||
monitor=HDMI-A-2,1920x1080@60.0,9186x396,1.0,transform,3
|
||||
# monitor=HDMI-A-2,transform,3
|
||||
|
||||
17
roles/hyprland/files/hypr/workspaces/jk-nb.lua
Normal file
17
roles/hyprland/files/hypr/workspaces/jk-nb.lua
Normal file
@ -0,0 +1,17 @@
|
||||
-- Persistent workspaces + switching binds (single monitor).
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||
|
||||
local mainMod = "SUPER"
|
||||
|
||||
for i = 1, 10 do
|
||||
hl.workspace_rule({
|
||||
workspace = tostring(i),
|
||||
persistent = true,
|
||||
default = (i == 1) or nil,
|
||||
})
|
||||
|
||||
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, follow = false }))
|
||||
end
|
||||
38
roles/hyprland/files/hypr/workspaces/jk-pc.lua
Normal file
38
roles/hyprland/files/hypr/workspaces/jk-pc.lua
Normal file
@ -0,0 +1,38 @@
|
||||
-- Per-monitor persistent workspaces + switching binds.
|
||||
-- See https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||
|
||||
local mainMod = "SUPER"
|
||||
|
||||
-- workspace id -> monitor assignment
|
||||
local workspaces = {
|
||||
{ id = 1, monitor = "DP-1", default = true },
|
||||
{ id = 2, monitor = "DP-1" },
|
||||
{ id = 3, monitor = "DP-1" },
|
||||
{ id = 4, monitor = "DP-2", default = true },
|
||||
{ id = 5, monitor = "DP-2" },
|
||||
{ id = 6, monitor = "DP-2" },
|
||||
{ id = 7, monitor = "HDMI-A-2" },
|
||||
{ id = 8, monitor = "HDMI-A-2" },
|
||||
{ id = 9, monitor = "HDMI-A-2", default = true },
|
||||
{ id = 10, monitor = "HDMI-A-1", default = true },
|
||||
}
|
||||
|
||||
for _, ws in ipairs(workspaces) do
|
||||
hl.workspace_rule({
|
||||
workspace = tostring(ws.id),
|
||||
monitor = ws.monitor,
|
||||
persistent = true,
|
||||
default = ws.default,
|
||||
})
|
||||
|
||||
local key = ws.id % 10 -- 10 maps to key 0
|
||||
|
||||
-- Focus the monitor, then switch to the workspace on it
|
||||
hl.bind(mainMod .. " + " .. key, function()
|
||||
hl.dispatch(hl.dsp.focus({ monitor = ws.monitor }))
|
||||
hl.dispatch(hl.dsp.focus({ workspace = ws.id }))
|
||||
end)
|
||||
|
||||
-- Move the active window to the workspace silently (don't follow)
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = ws.id, follow = false }))
|
||||
end
|
||||
@ -23,24 +23,26 @@
|
||||
state: link
|
||||
force: true
|
||||
loop:
|
||||
- hyprland.conf
|
||||
# hyprland.conf ported to hyprland.lua (hyprlang deprecated in Hyprland >= 0.55).
|
||||
# hyprlock/hyprpaper stay on hyprlang - they do not support Lua configs yet.
|
||||
- hyprland.lua
|
||||
- hyprlock.conf
|
||||
- hyprpaper.conf
|
||||
- scripts
|
||||
loop_control:
|
||||
loop_var: conf_file
|
||||
|
||||
- name: Symlink host-specific monitors.conf
|
||||
- name: Symlink host-specific monitors.lua
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/monitors_{{ ansible_facts['hostname'] }}.conf"
|
||||
dest: "{{ config_dir }}/hypr/monitors.conf"
|
||||
src: "{{ role_path }}/files/hypr/monitors/{{ ansible_facts['hostname'] }}.lua"
|
||||
dest: "{{ config_dir }}/hypr/monitors.lua"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Symlink host-specific workspaces.conf
|
||||
- name: Symlink host-specific workspaces.lua
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/workspaces_{{ ansible_facts['hostname'] }}.conf"
|
||||
dest: "{{ config_dir }}/hypr/workspaces.conf"
|
||||
src: "{{ role_path }}/files/hypr/workspaces/{{ ansible_facts['hostname'] }}.lua"
|
||||
dest: "{{ config_dir }}/hypr/workspaces.lua"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
|
||||
0
roles/nvim/files/after/ftplugin/yaml.lua
Normal file
0
roles/nvim/files/after/ftplugin/yaml.lua
Normal file
@ -99,7 +99,6 @@ return {
|
||||
-- Explicitly enable all mason-managed servers.
|
||||
-- This is belt-and-suspenders alongside mason-lspconfig's automatic_enable,
|
||||
-- ensuring servers start regardless of mason-lspconfig version.
|
||||
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss', 'mdx_analyzer', 'rust_analyzer' })
|
||||
|
||||
-- mdx_analyzer: needs typescript SDK path to find tsserverlibrary.js
|
||||
vim.lsp.config('mdx_analyzer', {
|
||||
@ -130,5 +129,6 @@ return {
|
||||
-- })
|
||||
vim.lsp.enable('postgres_lsp')
|
||||
|
||||
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss', 'mdx_analyzer', 'rust_analyzer', 'docker_compose_language_service', 'docker_language_server' })
|
||||
end,
|
||||
}
|
||||
|
||||
@ -65,6 +65,8 @@ Rectangle {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: Hyprland.dispatch("workspace " + root.workspace.id)
|
||||
// Hyprland >= 0.55 with a Lua config evaluates IPC dispatches as Lua,
|
||||
// so the legacy "workspace N" string no longer parses. Use the Lua dispatcher.
|
||||
onClicked: Hyprland.dispatch("hl.dsp.focus({ workspace = " + root.workspace.id + " })")
|
||||
}
|
||||
}
|
||||
|
||||
9
roles/zsh/defaults/main.yaml
Normal file
9
roles/zsh/defaults/main.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
zsh_plugins_dir: "{{ home_dir }}/.zsh/plugins"
|
||||
|
||||
zsh_plugins:
|
||||
- name: zsh_autosuggestions
|
||||
repo: https://github.com/zsh-users/zsh-autosuggestions.git
|
||||
version: v0.7.1
|
||||
- name: zsh-syntax-highlighting
|
||||
repo: https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
version: 0.8.0
|
||||
@ -6,3 +6,15 @@ case ":$PATH:" in
|
||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||
esac
|
||||
# pnpm end
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
if [[ -n "$MACHINE_TYPE" && -f "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" ]]; then
|
||||
source "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh"
|
||||
fi
|
||||
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||
|
||||
export SDL_AUDIODRIVER=pipewire
|
||||
|
||||
@ -1,22 +1,45 @@
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
|
||||
# Path to your Oh My Zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
setopt share_history # persist, and share live across open shells
|
||||
setopt inc_append_history # history of session appended to HISTFILE after session ends
|
||||
setopt hist_ignore_dups # drop a command identical to the one before it
|
||||
setopt hist_ignore_space # don't record commands typed with a leading space
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_verify # let you edit a !-expansion before it runs
|
||||
setopt append_history
|
||||
|
||||
ZSH_THEME="bira"
|
||||
zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
plugins=(
|
||||
git
|
||||
zsh-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
fzf-zsh-plugin
|
||||
)
|
||||
autoload -Uz vcs_info
|
||||
setopt prompt_subst
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:git:*' formats ' %F{yellow}‹%b› %f'
|
||||
zstyle ':vcs_info:git:*' actionformats ' %F{yellow}‹%b|%a› %f'
|
||||
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-dirty
|
||||
+vi-git-dirty() {
|
||||
if [[ -n $(git status --porcelain 2>/dev/null) ]]; then
|
||||
hook_com[branch]+='%F{red}●%F{yellow}'
|
||||
fi
|
||||
}
|
||||
|
||||
precmd() { vcs_info }
|
||||
|
||||
PROMPT='╭─%B%(!.%F{red}.%F{green})%n@%m%f %F{blue}%~%f%b${vcs_info_msg_0_}
|
||||
╰─%B%(!.#.$)%b '
|
||||
RPROMPT='%B%(?..%F{red}%? ↵%f)%b'
|
||||
|
||||
expand-or-complete-with-dots() {
|
||||
print -Pn '%F{red}…%f'
|
||||
zle expand-or-complete
|
||||
zle redisplay
|
||||
}
|
||||
zle -N expand-or-complete-with-dots
|
||||
bindkey '^I' expand-or-complete-with-dots
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
@ -31,28 +54,14 @@ for zsh_file in "$DOTFILES_ZSH_DIR"/*.zsh; do
|
||||
[[ -r "$zsh_file" ]] && source "$zsh_file"
|
||||
done
|
||||
|
||||
ZSH_PLUGINS_DIR="$HOME/.zsh/plugins"
|
||||
source "$ZSH_PLUGINS_DIR/zsh_autosuggestions/zsh-autosuggestions.zsh"
|
||||
source "$ZSH_PLUGINS_DIR/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
|
||||
# TODO source all files with .zsh suffix
|
||||
# source ./aliases.zsh
|
||||
# source ./dev_env.zsh
|
||||
# source ./tools.zsh
|
||||
|
||||
# TODO
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
if [[ -n "$MACHINE_TYPE" && -f "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh" ]]; then
|
||||
source "$HOME/dotfiles/zsh/hosts/$MACHINE_TYPE.zsh"
|
||||
fi
|
||||
|
||||
|
||||
alias drun='docker run -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined'
|
||||
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||
|
||||
bindkey '^H' backward-kill-word
|
||||
bindkey '^R' fzf-history-widget
|
||||
bindkey '^H' backward-kill-word # Ctrl+Backspace - delete word
|
||||
bindkey '^[[3;5~' kill-word # Ctrl+Delete - delete forward word
|
||||
bindkey '^[[1;5C' forward-word # Ctrl+Right - jump forward a word
|
||||
bindkey '^[[1;5D' backward-word # Ctrl+Left - jump backward a word
|
||||
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ alias zrc="vim ~/.zshrc"
|
||||
alias dotf='vim ~/dotfiles/'
|
||||
|
||||
# TODO relative path
|
||||
alias hyprconf='vim ~/dotfiles/roles/hyprland/files/hypr/hyprland.conf'
|
||||
alias hyprconf='vim ~/dotfiles/roles/hyprland/files/hypr/hyprland.lua'
|
||||
|
||||
alias ls='eza'
|
||||
|
||||
|
||||
@ -1 +1,2 @@
|
||||
export FZF_CTRL_R_OPTS="--layout=reverse"
|
||||
source <(fzf --zsh)
|
||||
|
||||
@ -1,16 +1,32 @@
|
||||
---
|
||||
- name: Install zsh
|
||||
- name: Install zsh and git
|
||||
package:
|
||||
name: zsh
|
||||
name:
|
||||
- zsh
|
||||
- git
|
||||
state: present
|
||||
become: yes
|
||||
become_user: root
|
||||
# become_user: root
|
||||
|
||||
- name: Install oh-my-zsh
|
||||
shell: |
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended
|
||||
args:
|
||||
creates: "{{ home_dir }}/.oh-my-zsh"
|
||||
- name: Ensure zsh plugin directory exists
|
||||
file:
|
||||
path: "{{ zsh_plugins_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: Clone/checkout zsh plugins at pinned versions
|
||||
git:
|
||||
repo: "{{ item.repo }}"
|
||||
dest: "{{ zsh_plugins_dir }}/{{ item.name }}"
|
||||
version: "{{ item.version }}"
|
||||
update: true
|
||||
loop: "{{ zsh_plugins }}"
|
||||
|
||||
# - name: Install oh-my-zsh
|
||||
# shell: |
|
||||
# sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended
|
||||
# args:
|
||||
# creates: "{{ home_dir }}/.oh-my-zsh"
|
||||
|
||||
- name: Symlink .zshenv
|
||||
file:
|
||||
|
||||
Reference in New Issue
Block a user