diff --git a/.gitignore b/.gitignore index 5f527e0..9d9e0d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,16 @@ +backups/ + +# Color fragments generated by sh/gen-colors */colors.css */colors.conf -backups/ +*/colors.lua + +# Built by the per-component build.sh scripts i3/config sway/config +hypr/hyprland.lua waybar/style.css wofi/style.css + +# Stub Hyprland writes on first run; the real config is hyprland.lua +hypr/hyprland.conf diff --git a/CLAUDE.md b/CLAUDE.md index e06a43d..f10906f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -22,7 +22,7 @@ Some configs are built by concatenating a `colors.*` file with a `base.*` file. | Component | Sources | Build output | Build command | |-----------|---------|--------------|---------------| -| Hyprland | `hypr/colors.conf` + `hypr/base.conf` | `hypr/hyprland.conf` | `hypr/build.sh` | +| Hyprland | `hypr/colors.lua` + `hypr/base.lua` | `hypr/hyprland.lua` | `hypr/build.sh` | | Waybar CSS | `waybar/colors.css` + `waybar/base.css` | `waybar/style.css` | `waybar/build.sh` | After editing a base file, run the corresponding `build.sh` to regenerate the output. diff --git a/README.md b/README.md index dc34000..86485a0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Dotfiles and scripts for Arch Linux (Manjaro), targeting Wayland (Hyprland / Swa Inside `scripts/wofi/styles.css`, I have the colour css set to `/home/adamf/scripts/wofi/colors.css`, which is clearly ugly and not nice but it was quick to do. -Wofi is called in hypr/hyprland.conf and sway/swayconfig with the command `wofi --style /home/adamf/scripts/wofi/styles.css`. This is also not ideal but I couldn't find a way to get it to work with a relative path. I'm unsure when hyprland working directory is. +Wofi is called in hypr/hyprland.lua and sway/swayconfig with the command `wofi --style /home/adamf/scripts/wofi/styles.css`. This is also not ideal but I couldn't find a way to get it to work with a relative path. I'm unsure when hyprland working directory is. ## Setup @@ -223,15 +223,15 @@ swaymsg reload # Sway killall waybar && waybar & # Waybar ``` -Generated files (committed so configs work after a fresh clone): +Generated files (gitignored; `install.sh` runs `gen-colors` before building): -| File | Format | Used by | -| ------------------- | --------------------------- | ---------------------------- | -| `hypr/colors.conf` | `$color_name = rgb(HEXVAL)` | `hyprland.conf` (source) | -| `sway/colors.conf` | `set $color_name #HEXVAL` | `swayconfig` (include) | -| `i3/colors.conf` | `set $color_name #HEXVAL` | `i3config` (include) | -| `waybar/colors.css` | CSS custom properties | `waybar/style.css` (@import) | -| `wofi/colors.css` | CSS custom properties | `wofi/style.css` (@import) | +| File | Format | Used by | +| ------------------- | ---------------------------- | ---------------------------- | +| `hypr/colors.lua` | `color_name = "rgb(HEXVAL)"` | `hyprland.lua` (built in) | +| `sway/colors.conf` | `set $color_name #HEXVAL` | `swayconfig` (include) | +| `i3/colors.conf` | `set $color_name #HEXVAL` | `i3config` (include) | +| `waybar/colors.css` | CSS custom properties | `waybar/style.css` (@import) | +| `wofi/colors.css` | CSS custom properties | `wofi/style.css` (@import) | ## Scripts diff --git a/hypr/.luarc.json b/hypr/.luarc.json new file mode 100644 index 0000000..dac86ab --- /dev/null +++ b/hypr/.luarc.json @@ -0,0 +1,3 @@ +{ + "workspace": { "library": ["/usr/share/hypr/stubs"] } +} diff --git a/hypr/base.conf b/hypr/base.conf deleted file mode 100644 index 93d8349..0000000 --- a/hypr/base.conf +++ /dev/null @@ -1,388 +0,0 @@ -# Hyprland config - converted from i3 config by Adam French -# https://wiki.hyprland.org/Configuring/ - - -################ -### MONITORS ### -################ - -monitor=,preferred,auto,1 - - -################### -### MY PROGRAMS ### -################### - -$terminal = kitty -$fileManager = kitty -e ranger -$menu = wofi --show drun - -################### -### CURSOR ### -################### - -env = XCURSOR_THEME,Miku Cursor -env = XCURSOR_SIZE,48 -env = HYPRCURSOR_SIZE,48 - -################# -### AUTOSTART ### -################# - -exec-once = dex -a -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec-once = wl-paste --watch cliphist store -exec-once = dunst -exec-once = hypridle -exec-once = hyprpaper -exec-once = gammastep -m wayland -l 51.5074:-0.1278 -t 6500:3500 -exec-once = waterfox -exec-once = waybar -# NOTE: ff-theme-util and fix_xcursor are X11-specific; drop or find Wayland equivalents -# Caps<->Escape swap is handled below via input config - - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -env = XDG_SESSION_TYPE,wayland -# NVIDIA-specific env vars — uncomment if running on nvidia: -# env = LIBVA_DRIVER_NAME,nvidia -# env = GBM_BACKEND,nvidia-drm -# env = __GLX_VENDOR_LIBRARY_NAME,nvidia -# env = WLR_NO_HARDWARE_CURSORS,1 - -##################### -### LOOK AND FEEL ### -##################### - -general { - gaps_in = 5 # inner gaps (i3: gaps inner 10 → split between two sides) - gaps_out = 0 # outer gaps (i3: gaps outer 0) - border_size = 1 - - col.active_border = $color_primary - col.inactive_border = $color_gray - - resize_on_border = true - allow_tearing = false - layout = dwindle -} - -xwayland { - force_zero_scaling = true -} - -decoration { - rounding = 0 - - active_opacity = 1.0 - inactive_opacity = 1.0 - - shadow { - enabled = false - } - - blur { - enabled = true - size = 3 - passes = 1 - } -} - -animations { - enabled = true - - bezier = myBezier, 0.645, 0.045, 0.355, 1.000 - - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, myBezier - animation = border, 1, 10, myBezier - animation = borderangle, 1, 8, myBezier - animation = fade, 1, 7, myBezier - animation = workspaces, 1, 6, myBezier -} - -master { - new_status = slave -} - -misc { - force_default_wallpaper = 0 - disable_hyprland_logo = true - focus_on_activate = true # replaces i3's "for_window [urgent=latest] focus" -} - - -############# -### INPUT ### -############# - -input { - kb_layout = - kb_options = caps:swapescape,grp:alt_shift_toggle - follow_mouse = 1 - sensitivity = 0 -} - -################### -### KEYBINDINGS ### -################### - -$mod = SUPER - -# Terminal -bind = $mod, Return, exec, $terminal - -# Kill focused window -bind = $mod SHIFT, Q, killactive - -# Launcher (wofi replaces dmenu) -bind = $mod, D, exec, $menu - -# Pavucontrol -bind = $mod CTRL, M, exec, hyprpwcenter - -# Applications -bind = $mod, F2, exec, waterfox -bind = $mod, F3, exec, $fileManager -bind = $mod SHIFT, F3, exec, pcmanfm -bind = $mod, F5, exec, kitty -e mocp - -# Toggle window layout between master and dwindle -bind = $mod, T, exec, hyprctl keyword general:layout "$([ "$(hyprctl getoption general:layout -j | grep -o '"str": "[^"]*"' | cut -d'"' -f4)" = "master" ] && echo dwindle || echo master)" - -# Restart dunst -bind = $mod SHIFT, D, exec, killall dunst && notify-send 'restart dunst' - -# Screenshots (flameshot on Wayland needs -g flag or use grim/slurp instead) -bind = , Print, exec, flameshot gui -bind = $mod, Print, exec, grim -g "$(slurp)" - | wl-copy -bind = $mod SHIFT, Print, exec, grim -g "$(slurp)" ~/screenshot.png - -# Xkill equivalent -bind = $mod CTRL, X, exec, hyprctl kill - -# Toggle nerd-dictation -bind = $mod, C, exec, pgrep -f "nerd-dictation begin" >/dev/null && nerd-dictation end || nerd-dictation begin --simulate-input-tool=YDOTOOL - -# Lock screen -bind = $mod, 9, exec, hyprlock # replaces blurlock; configure hyprlock separately - -# Toggle bar visibility (waybar) -bind = $mod, M, exec, pkill -SIGUSR1 waybar - -# Reload Hyprland config -bind = $mod SHIFT, C, exec, hyprctl reload - -# Exit Hyprland -bind = $mod SHIFT, E, exec, hyprshutdown - -# System mode (replaces i3's $mode_system) -# Simple submap equivalent: -bind = $mod, 0, exec, notify-send -t 5000 "System Mode" "(l)ock (s)uspend (h)ibernate\n(r)eboot (Shift+s) shutdown (e)xit\n\nReturn/Escape to cancel" -bind = $mod, 0, submap, system -submap = system -bind = , L, exec, hyprlock -bind = , L, submap, reset -bind = , S, exec, systemctl suspend -bind = , S, submap, reset -bind = , H, exec, systemctl hibernate -bind = , H, submap, reset -bind = , R, exec, systemctl reboot -bind = , R, submap, reset -bind = SHIFT, S, exec, systemctl poweroff -bind = SHIFT, S, submap, reset -bind = , E, exec, hyprshutdown -bind = , E, submap, reset -bind = , Return, exec, dunstctl close -bind = , Return, submap, reset -bind = , Escape, exec, dunstctl close -bind = , Escape, submap, reset -submap = reset - -# --- FOCUS --- -bind = $mod, H, movefocus, l -bind = $mod, J, movefocus, d -bind = $mod, K, movefocus, u -bind = $mod, L, movefocus, r -bind = $mod, left, movefocus, l -bind = $mod, down, movefocus, d -bind = $mod, up, movefocus, u -bind = $mod, right, movefocus, r - -# --- MOVE WINDOWS --- -bind = $mod SHIFT, H, movewindow, l -bind = $mod SHIFT, J, movewindow, d -bind = $mod SHIFT, K, movewindow, u -bind = $mod SHIFT, L, movewindow, r -bind = $mod SHIFT, left, movewindow, l -bind = $mod SHIFT, down, movewindow, d -bind = $mod SHIFT, up, movewindow, u -bind = $mod SHIFT, right, movewindow, r - -# --- FLOATING --- -bind = $mod SHIFT, space, togglefloating -bind = $mod, space, focusurgentorlast # approximate focus mode_toggle - -# --- FULLSCREEN --- -bind = $mod, F, fullscreen, 0 - -# --- SPLIT / LAYOUT --- -# Hyprland uses dwindle preselect or master swaps; approximate below: -bind = $mod, G, layoutmsg, orientationleft # tile horizontally -bind = $mod, V, layoutmsg, orientationbottom # tile vertically -bind = $mod, E, layoutmsg, togglesplit - -bind = $mod, w, exec, hyprctl dispatch togglegroup - -# --- STICKY (pin floating window) --- -bind = $mod SHIFT, S, pin - -# --- SCRATCHPAD --- -bind = $mod SHIFT, minus, movetoworkspacesilent, special:scratchpad -bind = $mod, minus, togglespecialworkspace, scratchpad - -# --- WORKSPACE NAVIGATION --- -bind = $mod CTRL, right, workspace, +1 -bind = $mod CTRL, left, workspace, -1 -bind = $mod, B, workspace, previous # back_and_forth - -# Switch to workspace -bind = $mod, 1, workspace, 1 -bind = $mod, 2, workspace, 2 -bind = $mod, 3, workspace, 3 -bind = $mod, 4, workspace, 4 -bind = $mod, 5, workspace, 5 -bind = $mod, 6, workspace, 6 -bind = $mod, 7, workspace, 7 -bind = $mod, 8, workspace, 8 - -# Move container to workspace (silent = don't follow) -bind = $mod CTRL, 1, movetoworkspacesilent, 1 -bind = $mod CTRL, 2, movetoworkspacesilent, 2 -bind = $mod CTRL, 3, movetoworkspacesilent, 3 -bind = $mod CTRL, 4, movetoworkspacesilent, 4 -bind = $mod CTRL, 5, movetoworkspacesilent, 5 -bind = $mod CTRL, 6, movetoworkspacesilent, 6 -bind = $mod CTRL, 7, movetoworkspacesilent, 7 -bind = $mod CTRL, 8, movetoworkspacesilent, 8 - -# Move to workspace AND follow (replaces $mod+Shift+N in i3) -bind = $mod SHIFT, 1, movetoworkspace, 1 -bind = $mod SHIFT, 2, movetoworkspace, 2 -bind = $mod SHIFT, 3, movetoworkspace, 3 -bind = $mod SHIFT, 4, movetoworkspace, 4 -bind = $mod SHIFT, 5, movetoworkspace, 5 -bind = $mod SHIFT, 6, movetoworkspace, 6 -bind = $mod SHIFT, 7, movetoworkspace, 7 -bind = $mod SHIFT, 8, movetoworkspace, 8 - -# --- RESIZE SUBMAP --- -bind = $mod, R, submap, resize -submap = resize -binde = , H, resizeactive, -20 0 -binde = , J, resizeactive, 0 20 -binde = , K, resizeactive, 0 -20 -binde = , L, resizeactive, 20 0 -binde = , left, resizeactive, -30 0 -binde = , down, resizeactive, 0 30 -binde = , up, resizeactive, 0 -30 -binde = , right, resizeactive, 30 0 -bind = , Return, submap, reset -bind = , Escape, submap, reset -submap = reset - -# --- MOUSE BINDS --- -bindm = $mod, mouse:272, movewindow # mod+LMB drag to move floating -bindm = $mod, mouse:273, resizewindow # mod+RMB drag to resize - -# --- AUDIO --- -bindel = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +10% -bindel = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -10% -bindl = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle -bindl = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle - -# --- BRIGHTNESS --- -bindel = , XF86MonBrightnessUp, exec, brightnessctl set +5% -bindel = , XF86MonBrightnessDown, exec, brightnessctl set 5%- - - -#################### -### WINDOW RULES ### -#################### - -windowrule { - name = Surfshark - match:class = ^(Surfshark)$ - workspace = 8 silent - tile = on -} - -windowrule { - name = hyprpwcenter - match:class = ^(hyprpwcenter)$ - float = on -} - -windowrule { - name = Lxappearance - match:class = ^(Lxappearance)$ - float = on -} - -windowrule { - name = PiP - match:title = ^(Picture-in-Picture)$ - float = off -} - - -############################## -### WORKSPACE NAMES / ICONS ## -############################## - -# Hyprland workspace names (replaces i3 set $ws variables) -# These are used by waybar's workspaces module — configure names there. -# ws1=ツ ws2=ಠ‿ಠ ws3=◕‿◕ ws4=ʘ‿ʘ -# ws5=˘◡˘ ws6=◠‿◠ ws7=ᵔᴥᵔ ws8=æ - - -############################## -### COLORS (reference only) ## -############################## - -# Your theme palette for use in waybar / wofi CSS: -# Background: #1b110e -# BG Secondary: #000000 -# Primary: #55ffbb (green) -# Secondary: #62ff57 (lime) -# Tertiary: #ff579a (pink) -# Quaternary: #024942 (dark teal) -# Link: #222222 - - -##################################### -### NOTES ON MIGRATING FROM i3 ## -##################################### -# 1. BAR: Replace i3bar+i3status with waybar. Copy the color palette above -# into your waybar style.css. Workspace icon names go in waybar config. -# -# 2. LOCK: Replace blurlock with hyprlock. Configure in ~/.config/hypr/hyprlock.conf -# Replace xautolock with hypridle in ~/.config/hypr/hypridle.conf (30 min timeout). -# -# 3. LAUNCHER: wofi replaces dmenu. Style with ~/.config/wofi/style.css using -# your palette colors above. -# -# 4. SCREENSHOTS: grim + slurp replace i3-scrot on Wayland. flameshot also -# works with the -g flag on some setups. -# -# 5. STACKING layout: Set layout = master above (or dwindle). Hyprland has no -# direct stacking mode; use floating or master layout as closest equivalent. -# -# 6. GAP MODE: Replace the i3-gaps mode with direct hyprctl commands if needed: -# hyprctl keyword general:gaps_in 10 -# -# 7. BORDER TOGGLE ($mod+u/y/n): Use windowrulev2 or hyprctl at runtime: -# hyprctl keyword general:border_size 0 diff --git a/hypr/base.lua b/hypr/base.lua new file mode 100644 index 0000000..0720e88 --- /dev/null +++ b/hypr/base.lua @@ -0,0 +1,332 @@ +-- Hyprland Lua config - converted from i3 config by Adam French +-- https://wiki.hypr.land/Configuring/ +-- Built from colors.lua + base.lua by build.sh (edit base.lua, not hyprland.lua) + +------------------ +---- MONITORS ---- +------------------ + +hl.monitor({ output = "", mode = "preferred", position = "auto", scale = 1 }) +-- Per-machine layout generated by nwg-displays +pcall(require, "monitors") + +--------------------- +---- MY PROGRAMS ---- +--------------------- + +local terminal = "kitty" +local fileManager = "kitty -e ranger" +local menu = "wofi --show drun" + +---------------- +---- CURSOR ---- +---------------- + +hl.env("XCURSOR_THEME", "Miku Cursor") +hl.env("XCURSOR_SIZE", "48") +hl.env("HYPRCURSOR_SIZE", "48") + +------------------- +---- AUTOSTART ---- +------------------- + +hl.on("hyprland.start", function() + hl.exec_cmd("dex -a") + hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1") + hl.exec_cmd("wl-paste --watch cliphist store") + hl.exec_cmd("dunst") + hl.exec_cmd("hypridle") + hl.exec_cmd("hyprpaper") + hl.exec_cmd("gammastep -m wayland -l 51.5074:-0.1278 -t 6500:3500") + hl.exec_cmd("waterfox") + hl.exec_cmd("waybar") +end) + +------------------------------- +---- ENVIRONMENT VARIABLES ---- +------------------------------- + +hl.env("XDG_SESSION_TYPE", "wayland") +-- NVIDIA-specific env vars — uncomment if running on nvidia: +-- hl.env("LIBVA_DRIVER_NAME", "nvidia") +-- hl.env("GBM_BACKEND", "nvidia-drm") +-- hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia") +-- hl.env("WLR_NO_HARDWARE_CURSORS", "1") + +----------------------- +---- LOOK AND FEEL ---- +----------------------- + +hl.config({ + general = { + gaps_in = 5, -- inner gaps (i3: gaps inner 10 → split between two sides) + gaps_out = 0, -- outer gaps (i3: gaps outer 0) + border_size = 1, + + col = { + active_border = color_primary, + inactive_border = color_gray, + }, + + resize_on_border = true, + allow_tearing = false, + layout = "dwindle", + }, + + xwayland = { + force_zero_scaling = true, + }, + + decoration = { + rounding = 0, + + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { + enabled = false, + }, + + blur = { + enabled = true, + size = 3, + passes = 1, + }, + }, + + animations = { + enabled = true, + }, + + dwindle = { + preserve_split = true, -- required for togglesplit + }, + + master = { + new_status = "slave", + }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + focus_on_activate = true, -- replaces i3's "for_window [urgent=latest] focus" + }, + + input = { + kb_layout = "", + kb_options = "caps:swapescape,grp:alt_shift_toggle", + follow_mouse = 1, + sensitivity = 0, + }, +}) + +hl.curve("myBezier", { type = "bezier", points = { { 0.645, 0.045 }, { 0.355, 1.000 } } }) + +hl.animation({ leaf = "windows", enabled = true, speed = 7, bezier = "myBezier" }) +hl.animation({ leaf = "windowsOut", enabled = true, speed = 7, bezier = "myBezier" }) +hl.animation({ leaf = "border", enabled = true, speed = 10, bezier = "myBezier" }) +hl.animation({ leaf = "borderangle", enabled = true, speed = 8, bezier = "myBezier" }) +hl.animation({ leaf = "fade", enabled = true, speed = 7, bezier = "myBezier" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 6, bezier = "myBezier" }) + +--------------------- +---- KEYBINDINGS ---- +--------------------- + +local mod = "SUPER" + +-- Terminal +hl.bind(mod .. " + Return", hl.dsp.exec_cmd(terminal)) + +-- Kill focused window +hl.bind(mod .. " + SHIFT + Q", hl.dsp.window.close()) + +-- Launcher (wofi replaces dmenu) +hl.bind(mod .. " + D", hl.dsp.exec_cmd(menu)) + +-- Pavucontrol +hl.bind(mod .. " + CTRL + M", hl.dsp.exec_cmd("hyprpwcenter")) + +-- Applications +hl.bind(mod .. " + F2", hl.dsp.exec_cmd("waterfox")) +hl.bind(mod .. " + F3", hl.dsp.exec_cmd(fileManager)) +hl.bind(mod .. " + SHIFT + F3", hl.dsp.exec_cmd("pcmanfm")) +hl.bind(mod .. " + F5", hl.dsp.exec_cmd("kitty -e mocp")) + +-- Toggle window layout between master and dwindle +local layoutIsMaster = false +hl.bind(mod .. " + T", function() + layoutIsMaster = not layoutIsMaster + hl.config({ general = { layout = layoutIsMaster and "master" or "dwindle" } }) +end) + +-- Restart dunst +hl.bind(mod .. " + SHIFT + D", hl.dsp.exec_cmd("killall dunst && notify-send 'restart dunst'")) + +-- Screenshots (flameshot on Wayland needs -g flag or use grim/slurp instead) +hl.bind("Print", hl.dsp.exec_cmd("flameshot gui")) +hl.bind(mod .. " + Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy')) +hl.bind(mod .. " + SHIFT + Print", hl.dsp.exec_cmd('grim -g "$(slurp)" ~/screenshot.png')) + +-- Xkill equivalent +hl.bind(mod .. " + CTRL + X", hl.dsp.exec_cmd("hyprctl kill")) + +-- Toggle nerd-dictation +hl.bind( + mod .. " + C", + hl.dsp.exec_cmd( + 'pgrep -f "nerd-dictation begin" >/dev/null && nerd-dictation end || nerd-dictation begin --simulate-input-tool=YDOTOOL' + ) +) + +-- Lock screen +hl.bind(mod .. " + 9", hl.dsp.exec_cmd("hyprlock")) -- replaces blurlock; configure hyprlock separately + +-- Toggle bar visibility (waybar) +hl.bind(mod .. " + M", hl.dsp.exec_cmd("pkill -SIGUSR1 waybar")) + +-- Reload Hyprland config +hl.bind(mod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprctl reload")) + +-- Exit Hyprland +hl.bind(mod .. " + SHIFT + E", hl.dsp.exec_cmd("hyprshutdown")) + +-- System mode (replaces i3's $mode_system) +hl.bind(mod .. " + 0", function() + hl.dispatch( + hl.dsp.exec_cmd( + 'notify-send -t 5000 "System Mode" "(l)ock (s)uspend (h)ibernate\\n(r)eboot (Shift+s) shutdown (e)xit\\n\\nReturn/Escape to cancel"' + ) + ) + hl.dispatch(hl.dsp.submap("system")) +end) +-- second arg "reset" returns to the global submap after any bind fires +hl.define_submap("system", "reset", function() + hl.bind("L", hl.dsp.exec_cmd("hyprlock")) + hl.bind("S", hl.dsp.exec_cmd("systemctl suspend")) + hl.bind("H", hl.dsp.exec_cmd("systemctl hibernate")) + hl.bind("R", hl.dsp.exec_cmd("systemctl reboot")) + hl.bind("SHIFT + S", hl.dsp.exec_cmd("systemctl poweroff")) + hl.bind("E", hl.dsp.exec_cmd("hyprshutdown")) + hl.bind("Return", hl.dsp.exec_cmd("dunstctl close")) + hl.bind("Escape", hl.dsp.exec_cmd("dunstctl close")) +end) + +-- --- FOCUS --- +local dirs = { H = "left", J = "down", K = "up", L = "right", left = "left", down = "down", up = "up", right = "right" } +for key, dir in pairs(dirs) do + hl.bind(mod .. " + " .. key, hl.dsp.focus({ direction = dir })) + hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ direction = dir })) +end + +-- --- FLOATING --- +hl.bind(mod .. " + SHIFT + space", hl.dsp.window.float()) +hl.bind(mod .. " + space", hl.dsp.focus({ urgent_or_last = true })) -- approximate focus mode_toggle + +-- --- FULLSCREEN --- +hl.bind(mod .. " + F", hl.dsp.window.fullscreen()) + +-- --- SPLIT / LAYOUT --- +-- orientation* messages only apply to the master layout +hl.bind(mod .. " + G", hl.dsp.layout("orientationleft")) -- tile horizontally +hl.bind(mod .. " + V", hl.dsp.layout("orientationbottom")) -- tile vertically +hl.bind(mod .. " + E", hl.dsp.layout("togglesplit")) + +hl.bind(mod .. " + W", hl.dsp.group.toggle()) + +-- --- STICKY (pin floating window) --- +hl.bind(mod .. " + SHIFT + S", hl.dsp.window.pin()) + +-- --- SCRATCHPAD --- +hl.bind(mod .. " + SHIFT + minus", hl.dsp.window.move({ workspace = "special:scratchpad", follow = false })) +hl.bind(mod .. " + minus", hl.dsp.workspace.toggle_special("scratchpad")) + +-- --- WORKSPACE NAVIGATION --- +hl.bind(mod .. " + CTRL + right", hl.dsp.focus({ workspace = "r+1" })) +hl.bind(mod .. " + CTRL + left", hl.dsp.focus({ workspace = "r-1" })) +hl.bind(mod .. " + B", hl.dsp.focus({ workspace = "previous" })) -- back_and_forth + +for i = 1, 8 do + -- Switch to workspace + hl.bind(mod .. " + " .. i, hl.dsp.focus({ workspace = i })) + -- Move container to workspace (silent = don't follow) + hl.bind(mod .. " + CTRL + " .. i, hl.dsp.window.move({ workspace = i, follow = false })) + -- Move to workspace AND follow (replaces $mod+Shift+N in i3) + hl.bind(mod .. " + SHIFT + " .. i, hl.dsp.window.move({ workspace = i, follow = true })) +end + +-- --- RESIZE SUBMAP --- +hl.bind(mod .. " + R", hl.dsp.submap("resize")) +hl.define_submap("resize", function() + local rep = { repeating = true } + hl.bind("H", hl.dsp.window.resize({ x = -20, y = 0, relative = true }), rep) + hl.bind("J", hl.dsp.window.resize({ x = 0, y = 20, relative = true }), rep) + hl.bind("K", hl.dsp.window.resize({ x = 0, y = -20, relative = true }), rep) + hl.bind("L", hl.dsp.window.resize({ x = 20, y = 0, relative = true }), rep) + hl.bind("left", hl.dsp.window.resize({ x = -30, y = 0, relative = true }), rep) + hl.bind("down", hl.dsp.window.resize({ x = 0, y = 30, relative = true }), rep) + hl.bind("up", hl.dsp.window.resize({ x = 0, y = -30, relative = true }), rep) + hl.bind("right", hl.dsp.window.resize({ x = 30, y = 0, relative = true }), rep) + hl.bind("Return", hl.dsp.submap("reset")) + hl.bind("Escape", hl.dsp.submap("reset")) +end) + +-- --- MOUSE BINDS --- +hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) -- mod+LMB drag to move floating +hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) -- mod+RMB drag to resize + +-- --- AUDIO --- +hl.bind( + "XF86AudioRaiseVolume", + hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ +10%"), + { locked = true, repeating = true } +) +hl.bind( + "XF86AudioLowerVolume", + hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ -10%"), + { locked = true, repeating = true } +) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("pactl set-sink-mute @DEFAULT_SINK@ toggle"), { locked = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("pactl set-source-mute @DEFAULT_SOURCE@ toggle"), { locked = true }) + +-- --- BRIGHTNESS --- +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set +5%"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true }) + +---------------------- +---- WINDOW RULES ---- +---------------------- + +hl.window_rule({ + name = "Surfshark", + match = { class = "^(Surfshark)$" }, + workspace = "8 silent", + tile = true, +}) + +hl.window_rule({ + name = "hyprpwcenter", + match = { class = "^(hyprpwcenter)$" }, + float = true, +}) + +hl.window_rule({ + name = "Lxappearance", + match = { class = "^(Lxappearance)$" }, + float = true, +}) + +hl.window_rule({ + name = "PiP", + match = { title = "^(Picture-in-Picture)$" }, + float = false, +}) + +------------------------------- +---- WORKSPACE NAMES / ICONS -- +------------------------------- + +-- Hyprland workspace names (replaces i3 set $ws variables) +-- These are used by waybar's workspaces module — configure names there. +-- ws1=ツ ws2=ಠ‿ಠ ws3=◕‿◕ ws4=ʘ‿ʘ +-- ws5=˘◡˘ ws6=◠‿◠ ws7=ᵔᴥᵔ ws8=æ diff --git a/hypr/build.sh b/hypr/build.sh index 4707bfe..4884f08 100755 --- a/hypr/build.sh +++ b/hypr/build.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" -cat colors.conf base.conf >hyprland.conf +cat colors.lua base.lua >hyprland.lua diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf deleted file mode 100644 index 4b74493..0000000 --- a/hypr/hyprland.conf +++ /dev/null @@ -1,399 +0,0 @@ -$color_primary = rgb(55ffbb) -$color_secondary = rgb(62ff57) -$color_tertiary = rgb(ff579a) -$color_bg = rgb(1b110e) -$color_bg_secondary = rgb(000000) -$color_alt_bg = rgb(024942) -$color_gray = rgb(222222) -$color_text_light = rgb(F0F0F0) -$color_text_dark = rgb(1b110e) -$color_white = rgb(FFFFFF) -# Hyprland config - converted from i3 config by Adam French -# https://wiki.hyprland.org/Configuring/ - - -################ -### MONITORS ### -################ - -monitor=,preferred,auto,1 -monitor = DP-2, 2560x1440, 2560x0, 1, transform, 1 - - -################### -### MY PROGRAMS ### -################### - -$terminal = kitty -$fileManager = kitty -e ranger -$menu = wofi --show drun - -################### -### CURSOR ### -################### - -env = XCURSOR_THEME,Miku Cursor -env = XCURSOR_SIZE,48 -env = HYPRCURSOR_SIZE,48 - -################# -### AUTOSTART ### -################# - -exec-once = dex -a -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec-once = wl-paste --watch cliphist store -exec-once = dunst -exec-once = hypridle -exec-once = hyprpaper -exec-once = gammastep -m wayland -l 51.5074:-0.1278 -t 6500:3500 -exec-once = waterfox -exec-once = waybar -# NOTE: ff-theme-util and fix_xcursor are X11-specific; drop or find Wayland equivalents -# Caps<->Escape swap is handled below via input config - - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -env = XDG_SESSION_TYPE,wayland -# NVIDIA-specific env vars — uncomment if running on nvidia: -env = LIBVA_DRIVER_NAME,nvidia -env = GBM_BACKEND,nvidia-drm -env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = WLR_NO_HARDWARE_CURSORS,1 - -##################### -### LOOK AND FEEL ### -##################### - -general { - gaps_in = 5 # inner gaps (i3: gaps inner 10 → split between two sides) - gaps_out = 0 # outer gaps (i3: gaps outer 0) - border_size = 1 - - col.active_border = $color_primary - col.inactive_border = $color_gray - - resize_on_border = true - allow_tearing = false - layout = dwindle -} - -xwayland { - force_zero_scaling = true -} - -decoration { - rounding = 0 - - active_opacity = 1.0 - inactive_opacity = 1.0 - - shadow { - enabled = false - } - - blur { - enabled = true - size = 3 - passes = 1 - } -} - -animations { - enabled = true - - bezier = myBezier, 0.645, 0.045, 0.355, 1.000 - - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, myBezier - animation = border, 1, 10, myBezier - animation = borderangle, 1, 8, myBezier - animation = fade, 1, 7, myBezier - animation = workspaces, 1, 6, myBezier -} - -master { - new_status = slave -} - -misc { - force_default_wallpaper = 0 - disable_hyprland_logo = true - focus_on_activate = true # replaces i3's "for_window [urgent=latest] focus" -} - - -############# -### INPUT ### -############# - -input { - kb_layout = - kb_options = caps:swapescape,grp:alt_shift_toggle - follow_mouse = 1 - sensitivity = 0 -} - -################### -### KEYBINDINGS ### -################### - -$mod = SUPER - -# Terminal -bind = $mod, Return, exec, $terminal - -# Kill focused window -bind = $mod SHIFT, Q, killactive - -# Launcher (wofi replaces dmenu) -bind = $mod, D, exec, $menu - -# Pavucontrol -bind = $mod CTRL, M, exec, hyprpwcenter - -# Applications -bind = $mod, F2, exec, waterfox -bind = $mod, F3, exec, $fileManager -bind = $mod SHIFT, F3, exec, pcmanfm -bind = $mod, F5, exec, kitty -e mocp - -# Toggle window layout between master and dwindle -bind = $mod, T, exec, hyprctl keyword general:layout "$([ "$(hyprctl getoption general:layout -j | grep -o '"str": "[^"]*"' | cut -d'"' -f4)" = "master" ] && echo dwindle || echo master)" - -# Restart dunst -bind = $mod SHIFT, D, exec, killall dunst && notify-send 'restart dunst' - -# Screenshots (flameshot on Wayland needs -g flag or use grim/slurp instead) -bind = , Print, exec, flameshot gui -bind = $mod, Print, exec, grim -g "$(slurp)" - | wl-copy -bind = $mod SHIFT, Print, exec, grim -g "$(slurp)" ~/screenshot.png - -# Xkill equivalent -bind = $mod CTRL, X, exec, hyprctl kill - -# Toggle nerd-dictation -bind = $mod, C, exec, pgrep -f "nerd-dictation begin" >/dev/null && nerd-dictation end || nerd-dictation begin --simulate-input-tool=YDOTOOL - -# Lock screen -bind = $mod, 9, exec, hyprlock # replaces blurlock; configure hyprlock separately - -# Toggle bar visibility (waybar) -bind = $mod, M, exec, pkill -SIGUSR1 waybar - -# Reload Hyprland config -bind = $mod SHIFT, C, exec, hyprctl reload - -# Exit Hyprland -bind = $mod SHIFT, E, exec, hyprshutdown - -# System mode (replaces i3's $mode_system) -# Simple submap equivalent: -bind = $mod, 0, exec, notify-send -t 5000 "System Mode" "(l)ock (s)uspend (h)ibernate\n(r)eboot (Shift+s) shutdown (e)xit\n\nReturn/Escape to cancel" -bind = $mod, 0, submap, system -submap = system -bind = , L, exec, hyprlock -bind = , L, submap, reset -bind = , S, exec, systemctl suspend -bind = , S, submap, reset -bind = , H, exec, systemctl hibernate -bind = , H, submap, reset -bind = , R, exec, systemctl reboot -bind = , R, submap, reset -bind = SHIFT, S, exec, systemctl poweroff -bind = SHIFT, S, submap, reset -bind = , E, exec, hyprshutdown -bind = , E, submap, reset -bind = , Return, exec, dunstctl close -bind = , Return, submap, reset -bind = , Escape, exec, dunstctl close -bind = , Escape, submap, reset -submap = reset - -# --- FOCUS --- -bind = $mod, H, movefocus, l -bind = $mod, J, movefocus, d -bind = $mod, K, movefocus, u -bind = $mod, L, movefocus, r -bind = $mod, left, movefocus, l -bind = $mod, down, movefocus, d -bind = $mod, up, movefocus, u -bind = $mod, right, movefocus, r - -# --- MOVE WINDOWS --- -bind = $mod SHIFT, H, movewindow, l -bind = $mod SHIFT, J, movewindow, d -bind = $mod SHIFT, K, movewindow, u -bind = $mod SHIFT, L, movewindow, r -bind = $mod SHIFT, left, movewindow, l -bind = $mod SHIFT, down, movewindow, d -bind = $mod SHIFT, up, movewindow, u -bind = $mod SHIFT, right, movewindow, r - -# --- FLOATING --- -bind = $mod SHIFT, space, togglefloating -bind = $mod, space, focusurgentorlast # approximate focus mode_toggle - -# --- FULLSCREEN --- -bind = $mod, F, fullscreen, 0 - -# --- SPLIT / LAYOUT --- -# Hyprland uses dwindle preselect or master swaps; approximate below: -bind = $mod, G, layoutmsg, orientationleft # tile horizontally -bind = $mod, V, layoutmsg, orientationbottom # tile vertically -bind = $mod, E, layoutmsg, togglesplit - -bind = $mod, w, exec, hyprctl dispatch togglegroup - -# --- STICKY (pin floating window) --- -bind = $mod SHIFT, S, pin - -# --- SCRATCHPAD --- -bind = $mod SHIFT, minus, movetoworkspacesilent, special:scratchpad -bind = $mod, minus, togglespecialworkspace, scratchpad - -# --- WORKSPACE NAVIGATION --- -bind = $mod CTRL, right, workspace, +1 -bind = $mod CTRL, left, workspace, -1 -bind = $mod, B, workspace, previous # back_and_forth - -# Switch to workspace -bind = $mod, 1, workspace, 1 -bind = $mod, 2, workspace, 2 -bind = $mod, 3, workspace, 3 -bind = $mod, 4, workspace, 4 -bind = $mod, 5, workspace, 5 -bind = $mod, 6, workspace, 6 -bind = $mod, 7, workspace, 7 -bind = $mod, 8, workspace, 8 - -# Move container to workspace (silent = don't follow) -bind = $mod CTRL, 1, movetoworkspacesilent, 1 -bind = $mod CTRL, 2, movetoworkspacesilent, 2 -bind = $mod CTRL, 3, movetoworkspacesilent, 3 -bind = $mod CTRL, 4, movetoworkspacesilent, 4 -bind = $mod CTRL, 5, movetoworkspacesilent, 5 -bind = $mod CTRL, 6, movetoworkspacesilent, 6 -bind = $mod CTRL, 7, movetoworkspacesilent, 7 -bind = $mod CTRL, 8, movetoworkspacesilent, 8 - -# Move to workspace AND follow (replaces $mod+Shift+N in i3) -bind = $mod SHIFT, 1, movetoworkspace, 1 -bind = $mod SHIFT, 2, movetoworkspace, 2 -bind = $mod SHIFT, 3, movetoworkspace, 3 -bind = $mod SHIFT, 4, movetoworkspace, 4 -bind = $mod SHIFT, 5, movetoworkspace, 5 -bind = $mod SHIFT, 6, movetoworkspace, 6 -bind = $mod SHIFT, 7, movetoworkspace, 7 -bind = $mod SHIFT, 8, movetoworkspace, 8 - -# --- RESIZE SUBMAP --- -bind = $mod, R, submap, resize -submap = resize -binde = , H, resizeactive, -20 0 -binde = , J, resizeactive, 0 20 -binde = , K, resizeactive, 0 -20 -binde = , L, resizeactive, 20 0 -binde = , left, resizeactive, -30 0 -binde = , down, resizeactive, 0 30 -binde = , up, resizeactive, 0 -30 -binde = , right, resizeactive, 30 0 -bind = , Return, submap, reset -bind = , Escape, submap, reset -submap = reset - -# --- MOUSE BINDS --- -bindm = $mod, mouse:272, movewindow # mod+LMB drag to move floating -bindm = $mod, mouse:273, resizewindow # mod+RMB drag to resize - -# --- AUDIO --- -bindel = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +10% -bindel = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -10% -bindl = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle -bindl = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle - -# --- BRIGHTNESS --- -bindel = , XF86MonBrightnessUp, exec, brightnessctl set +5% -bindel = , XF86MonBrightnessDown, exec, brightnessctl set 5%- - - -#################### -### WINDOW RULES ### -#################### - -windowrule { - name = Surfshark - match:class = ^(Surfshark)$ - workspace = 8 silent - tile = on -} - -windowrule { - name = hyprpwcenter - match:class = ^(hyprpwcenter)$ - float = on -} - -windowrule { - name = Lxappearance - match:class = ^(Lxappearance)$ - float = on -} - -windowrule { - name = PiP - match:title = ^(Picture-in-Picture)$ - float = off -} - - -############################## -### WORKSPACE NAMES / ICONS ## -############################## - -# Hyprland workspace names (replaces i3 set $ws variables) -# These are used by waybar's workspaces module — configure names there. -# ws1=ツ ws2=ಠ‿ಠ ws3=◕‿◕ ws4=ʘ‿ʘ -# ws5=˘◡˘ ws6=◠‿◠ ws7=ᵔᴥᵔ ws8=æ - - -############################## -### COLORS (reference only) ## -############################## - -# Your theme palette for use in waybar / wofi CSS: -# Background: #1b110e -# BG Secondary: #000000 -# Primary: #55ffbb (green) -# Secondary: #62ff57 (lime) -# Tertiary: #ff579a (pink) -# Quaternary: #024942 (dark teal) -# Link: #222222 - - -##################################### -### NOTES ON MIGRATING FROM i3 ## -##################################### -# 1. BAR: Replace i3bar+i3status with waybar. Copy the color palette above -# into your waybar style.css. Workspace icon names go in waybar config. -# -# 2. LOCK: Replace blurlock with hyprlock. Configure in ~/.config/hypr/hyprlock.conf -# Replace xautolock with hypridle in ~/.config/hypr/hypridle.conf (30 min timeout). -# -# 3. LAUNCHER: wofi replaces dmenu. Style with ~/.config/wofi/style.css using -# your palette colors above. -# -# 4. SCREENSHOTS: grim + slurp replace i3-scrot on Wayland. flameshot also -# works with the -g flag on some setups. -# -# 5. STACKING layout: Set layout = master above (or dwindle). Hyprland has no -# direct stacking mode; use floating or master layout as closest equivalent. -# -# 6. GAP MODE: Replace the i3-gaps mode with direct hyprctl commands if needed: -# hyprctl keyword general:gaps_in 10 -# -# 7. BORDER TOGGLE ($mod+u/y/n): Use windowrulev2 or hyprctl at runtime: -# hyprctl keyword general:border_size 0 diff --git a/hypr/monitors.conf b/hypr/monitors.conf deleted file mode 100644 index 5316ffa..0000000 --- a/hypr/monitors.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Generated by nwg-displays on 2026-05-30 at 01:47:19. Do not edit manually. - -monitor=DP-1,2560x1440@59.95,0x0,1.0 -monitor=DP-1,transform,1 -monitor=DP-2,2560x1440@164.85,1440x0,1.0 diff --git a/hypr/monitors.lua b/hypr/monitors.lua index 24f7d77..ea0b3e5 100644 --- a/hypr/monitors.lua +++ b/hypr/monitors.lua @@ -4,12 +4,11 @@ hl.monitor({ output = "DP-1", mode = "2560x1440@59.95", position = "0x0", - scale = 1.0, - transform = 1 + scale = 1.0 }) hl.monitor({ output = "DP-2", mode = "2560x1440@164.85", - position = "1440x0", + position = "2560x0", scale = 1.0 }) diff --git a/hypr/workspaces.conf b/hypr/workspaces.conf deleted file mode 100644 index e69de29..0000000 diff --git a/i3/base b/i3/base index a2c68e2..b1c4170 100644 --- a/i3/base +++ b/i3/base @@ -12,7 +12,7 @@ set $ws7 7:ᵔᴥᵔ set $ws8 8:æ # DEFAULT STARTUP -------------------------------------- -exec --no-startup-id setxkbmap -option caps:swapescape +exec --no-startup-id setxkbmap -layout us -option caps:swapescape exec --no-startup-id volctl exec --no-startup-id fcitx5 exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 diff --git a/i3/config b/i3/config deleted file mode 100644 index c23d9e3..0000000 --- a/i3/config +++ /dev/null @@ -1,388 +0,0 @@ -set $color_primary #55ffbb -set $color_secondary #62ff57 -set $color_tertiary #ff579a -set $color_bg #1b110e -set $color_bg_secondary #000000 -set $color_alt_bg #024942 -set $color_gray #222222 -set $color_text_light #F0F0F0 -set $color_text_dark #1b110e -set $color_white #FFFFFF -# This is my personal personal i3 config file! - Adam French - - -# WORKSPACE NAMES ----------------------------------- -set $ws1 1:ツ -set $ws2 2:ಠ‿ಠ -set $ws3 3:◕‿◕ -set $ws4 4:ʘ‿ʘ -set $ws5 5:˘◡˘ -set $ws6 6:◠‿◠ -set $ws7 7:ᵔᴥᵔ -set $ws8 8:æ - -# DEFAULT STARTUP -------------------------------------- -exec --no-startup-id setxkbmap -option caps:swapescape -exec --no-startup-id volctl -exec --no-startup-id fcitx5 -exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -# exec --no-startup-id manjaro-hello -exec --no-startup-id nm-applet -exec --no-startup-id pamac-tray -exec --no-startup-id clipit -exec --no-startup-id dunst -exec --no-startup-id xautolock -time 90 -locker blurlock -exec_always --no-startup-id xrandr --output DP-2 --rotate left -# exec --no-startup-id nitrogen ~/scripts/background.jpg -# exec --no-startup-id blueman-applet -# exec_always --no-startup-id sbxkb -# exec --no-startup-id start_conky_maia -# exec --no-startup-id start_conky_green -exec --no-startup-id waterfox -exec --no-startup-id steam -exec --no-startup-id surfshark - - -# PACTL BINDINGS --------------------------------------- - -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle - -# BRIGHTNESSCTL BINDINGS ---------------------------------- - -bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5% -bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- - -# DEFAULT WINDOW LAYOUT ------------------------------------- - -# set default desktop layout (default is tiling) -workspace_layout stacking -# Configure border style -default_border pixel 1 -default_floating_border normal -# Hide borders -hide_edge_borders none - -# KEYBINDS -------------------------------------------------- - -# Set mod key (Mod1=, Mod4=) -set $mod Mod4 - -# change borders -bindsym $mod+u border none -bindsym $mod+y border pixel 1 -bindsym $mod+n border normal - -# Use Mouse+$mod to drag floating windows -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec kitty -# kill focused window -bindsym $mod+Shift+q kill -# start program launcher -bindsym $mod+d exec --no-startup-id dmenu_run -nb '$color_bg' -sf '$color_tertiary' -sb '$color_bg' -nf '$color_primary' - -bindsym $mod+Ctrl+m exec pavucontrol - -# Start Applications -bindsym $mod+F2 exec waterfox -# bindsym $mod+F3 exec pcmanfm -bindsym $mod+F3 exec kitty -e ranger -bindsym $mod+Shift+F3 exec pcmanfm_pkexec -bindsym $mod+F5 exec kitty -e 'mocp' -bindsym $mod+t exec --no-startup-id pkill picom -bindsym $mod+Ctrl+t exec --no-startup-id picom -b -bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" -bindsym Print exec flameshot gui -bindsym $mod+Print --release exec --no-startup-id i3-scrot -w -bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s -# bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf -bindsym $mod+Ctrl+x --release exec --no-startup-id xkill - -# Toggle nerd-dictation -bindsym $mod+c exec --no-startup-id "pgrep -x nerd-dictation && nerd-dictation end || nerd-dictation begin" - -focus_follows_mouse yes - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# workspace back and forth (with/without active container) -workspace_auto_back_and_forth yes -bindsym $mod+b workspace back_and_forth -bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth - -# split orientation -bindsym $mod+g split h;exec notify-send 'tile horizontally' -bindsym $mod+v split v;exec notify-send 'tile vertically' -bindsym $mod+q split toggle - -# toggle fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking;exec notify-send 'layout stacking' -bindsym $mod+w layout tabbed; exec notify-send 'layout tabbed' -bindsym $mod+e layout toggle split; exec notify-send 'layout split' - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# toggle sticky -bindsym $mod+Shift+s sticky toggle - -# focus the parent container -bindsym $mod+a focus parent - -# move the currently focused window to the scratchpad -bindsym $mod+Shift+minus move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -# If there are multiple scratchpad windows, this command cycles through them. -bindsym $mod+minus scratchpad show - -#navigate workspaces next / previous -bindsym $mod+Ctrl+Right workspace next -bindsym $mod+Ctrl+Left workspace prev - - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 - -# Move focused container to workspace -bindsym $mod+Ctrl+1 move container to workspace $ws1 -bindsym $mod+Ctrl+2 move container to workspace $ws2 -bindsym $mod+Ctrl+3 move container to workspace $ws3 -bindsym $mod+Ctrl+4 move container to workspace $ws4 -bindsym $mod+Ctrl+5 move container to workspace $ws5 -bindsym $mod+Ctrl+6 move container to workspace $ws6 -bindsym $mod+Ctrl+7 move container to workspace $ws7 -bindsym $mod+Ctrl+8 move container to workspace $ws8 - -# Move to workspace with focused container -bindsym $mod+Shift+1 move container to workspace $ws1; -bindsym $mod+Shift+2 move container to workspace $ws2; -bindsym $mod+Shift+3 move container to workspace $ws3; -bindsym $mod+Shift+4 move container to workspace $ws4; -bindsym $mod+Shift+5 move container to workspace $ws5; -bindsym $mod+Shift+6 move container to workspace $ws6; -bindsym $mod+Shift+7 move container to workspace $ws7; -bindsym $mod+Shift+8 move container to workspace $ws8; - -# reload the configuration file -bindsym $mod+Shift+c reload - -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart - -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# Set shut down, restart and locking features -bindsym $mod+0 mode "$mode_system" -set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown -mode "$mode_system" { - bindsym l exec --no-startup-id i3exit lock, mode "default" - bindsym s exec --no-startup-id i3exit suspend, mode "default" - bindsym u exec --no-startup-id i3exit switch_user, mode "default" - bindsym e exec --no-startup-id i3exit logout, mode "default" - bindsym h exec --no-startup-id i3exit hibernate, mode "default" - bindsym r exec --no-startup-id i3exit reboot, mode "default" - bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" - - # exit system mode: "Enter" or "Escape" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Resize window (you can also use the mouse for that) -bindsym $mod+r mode "resize" -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 5 px or 5 ppt - bindsym j resize grow height 5 px or 5 ppt - bindsym k resize shrink height 5 px or 5 ppt - bindsym l resize grow width 5 px or 5 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # exit resize mode: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces. -set $mode_gaps Gaps: (o) outer, (i) inner -set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) -bindsym $mod+Shift+g mode "$mode_gaps" - -mode "$mode_gaps" { - bindsym o mode "$mode_gaps_outer" - bindsym i mode "$mode_gaps_inner" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -mode "$mode_gaps_inner" { - bindsym plus gaps inner current plus 5 - bindsym minus gaps inner current minus 5 - bindsym 0 gaps inner current set 0 - - bindsym Shift+plus gaps inner all plus 5 - bindsym Shift+minus gaps inner all minus 5 - bindsym Shift+0 gaps inner all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} - -mode "$mode_gaps_outer" { - bindsym plus gaps outer current plus 5 - bindsym minus gaps outer current minus 5 - bindsym 0 gaps outer current set 0 - - bindsym Shift+plus gaps outer all plus 5 - bindsym Shift+minus gaps outer all minus 5 - bindsym Shift+0 gaps outer all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} - - -# Lock screen -bindsym $mod+9 exec --no-startup-id blurlock -# APPLICATION WORKSPACES ---------------------------------------------------- -assign [class="Surfshark"] $ws8 -# assign [class="zed"] $ws1 -# assign [class="gimp"] $ws2 -# assign [class="Pale moon"] $ws2 -# assign [class="Pcmanfm"] $ws3 -# assign [class="Skype"] $ws5 - -# APPLICATION WINDOW MODES -------------------------------------------------- -for_window [title="Picture-in-Picture"] floating disable border pixel 0 - -for_window [title="alsamixer"] floating enable border pixel 1 -for_window [class="calamares"] floating enable border normal -for_window [class="Clipgrab"] floating enable -for_window [title="File Transfer*"] floating enable -for_window [class="fpakman"] floating enable -for_window [class="Galculator"] floating enable border pixel 1 -for_window [class="GParted"] floating enable border normal -for_window [title="i3_help"] floating enable sticky enable border normal -for_window [class="Lightdm-settings"] floating enable -for_window [class="Lxappearance"] floating enable sticky enable border normal -for_window [class="Manjaro-hello"] floating enable -for_window [class="Manjaro Settings Manager"] floating enable border normal -for_window [title="MuseScore: Play Panel"] floating enable -for_window [class="Nitrogen"] floating enable sticky enable border normal -for_window [class="Oblogout"] fullscreen enable -for_window [class="octopi"] floating enable -for_window [title="About Pale Moon"] floating enable -for_window [class="Pamac-manager"] floating enable -for_window [class="Pavucontrol"] floating enable -for_window [class="qt5ct"] floating enable sticky enable border normal -for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal -for_window [class="Simple-scan"] floating enable border normal -for_window [class="(?i)System-config-printer.py"] floating enable border normal -for_window [class="Skype"] floating enable border normal -for_window [class="Timeset-gui"] floating enable border normal -for_window [class="(?i)virtualbox"] floating enable border normal -for_window [class="Xfburn"] floating enable - -# switch to workspace with urgent window automatically -for_window [urgent=latest] focus - -# AESTETICS ---------------------------------------------------------------- - -# Start i3bar to display a workspace bar (plus the system information i3status if available) -bar { - #status_command i3blocks -c ~/scripts/i3blocks.conf - status_command i3status - position bottom - - tray_output primary - - bindsym button4 nop - bindsym button5 nop - font xft:URWGothic-Book 11 - strip_workspace_numbers yes - - colors { - background $color_bg - statusline $color_primary - separator $color_tertiary - focused_workspace $color_primary $color_bg $color_white - active_workspace $color_primary $color_alt_bg $color_white - inactive_workspace $color_gray $color_alt_bg $color_white - binding_mode $color_tertiary $color_bg $color_white - urgent_workspace $color_tertiary $color_alt_bg $color_white - } -} - -# hide/unhide i3status bar -bindsym $mod+m bar mode toggle - -# Theme colors -# class border backgr. text indic. -client.focused $color_secondary $color_primary $color_text_dark $color_primary -client.focused_inactive $color_primary $color_alt_bg $color_text_light $color_tertiary -client.unfocused $color_gray $color_alt_bg $color_text_light $color_primary -client.urgent $color_tertiary $color_alt_bg $color_white $color_tertiary -client.placeholder $color_bg $color_bg $color_white $color_bg - -client.background $color_bg - -# Set inner/outer gaps -gaps inner 10 -gaps outer 0 -smart_gaps on - -# Smart borders (draw borders around container only if it is not the only container on this workspace) -# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) -smart_borders on diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json index 8d59136..8e5cc0b 100644 --- a/nvim/lazyvim.json +++ b/nvim/lazyvim.json @@ -4,6 +4,8 @@ "lazyvim.plugins.extras.dap.core", "lazyvim.plugins.extras.dap.nlua", "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.clangd", + "lazyvim.plugins.extras.lang.clojure", "lazyvim.plugins.extras.lang.docker", "lazyvim.plugins.extras.lang.git", "lazyvim.plugins.extras.lang.go", diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index fd0a4d4..0169103 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua @@ -7,6 +7,18 @@ -- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) -- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") +-- C/C++ uses 2-space indent to match clang-format's LLVM default +vim.api.nvim_create_autocmd("FileType", { + pattern = { "c", "cpp" }, + callback = function() + vim.opt_local.tabstop = 2 + vim.opt_local.shiftwidth = 2 + vim.opt_local.softtabstop = 2 + -- Disable LazyVim's format-on-save for C/C++ + vim.b.autoformat = false + end, +}) + -- When opening multiple files, tile them vertically (side by side) vim.api.nvim_create_autocmd("VimEnter", { callback = function() diff --git a/nvim/lua/plugins/clangd.lua b/nvim/lua/plugins/clangd.lua new file mode 100644 index 0000000..7a8647d --- /dev/null +++ b/nvim/lua/plugins/clangd.lua @@ -0,0 +1,22 @@ +return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + clangd = { + cmd = { + "clangd", + "--background-index", + "--clang-tidy", + "--header-insertion=iwyu", + "--completion-style=detailed", + "--function-arg-placeholders", + -- ColumnLimit: 0 = fix indentation only; keep existing line + -- breaks, never rewrap or join lines + "--fallback-style={BasedOnStyle: LLVM, ColumnLimit: 0}", + }, + }, + }, + }, + }, +} diff --git a/sh/gen-colors b/sh/gen-colors index 17b81df..75b4201 100755 --- a/sh/gen-colors +++ b/sh/gen-colors @@ -16,15 +16,16 @@ while IFS='=' read -r key value; do eval "color_$key=$value" done <"$SRC" -# Hyprland: $color_name = rgb(HEXVAL) format (no #) +# Hyprland (Lua): color_name = "rgb(HEXVAL)" globals (no #) { + echo "-- Generated by sh/gen-colors from colors.conf. Do not edit." while IFS='=' read -r key value; do case "$key" in \#* | "") continue ;; esac hex="${value#\#}" - echo "\$color_$key = rgb($hex)" + echo "color_$key = \"rgb($hex)\"" done <"$SRC" -} >"$SCRIPT_DIR/hypr/colors.conf" -echo "Wrote hypr/colors.conf" +} >"$SCRIPT_DIR/hypr/colors.lua" +echo "Wrote hypr/colors.lua" # Sway: set $color_name #HEXVAL { diff --git a/sway/config b/sway/config deleted file mode 100644 index 5c91605..0000000 --- a/sway/config +++ /dev/null @@ -1,341 +0,0 @@ -set $color_primary #55ffbb -set $color_secondary #62ff57 -set $color_tertiary #ff579a -set $color_bg #1b110e -set $color_bg_secondary #000000 -set $color_alt_bg #024942 -set $color_gray #222222 -set $color_text_light #F0F0F0 -set $color_text_dark #1b110e -set $color_white #FFFFFF - -output * scale 1.2 - - -# WORKSPACE NAMES ----------------------------------- -set $ws1 1:ツ -set $ws2 2:ಠ‿ಠ -set $ws3 3:◕‿◕ -set $ws4 4:ʘ‿ʘ -set $ws5 5:˘◡˘ -set $ws6 6:◠‿◠ -set $ws7 7:ᵔᴥᵔ -set $ws8 8:æ - -# DEFAULT STARTUP -------------------------------------- -# Keyboard: caps:swapescape via sway input (replaces setxkbmap) -input * { - xkb_options caps:swapescape - xkb_layout gb -} - -exec --no-startup-id volctl -exec --no-startup-id fcitx5 -exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec --no-startup-id nm-applet --indicator -exec --no-startup-id pamac-tray -# clipit is X11-only; use cliphist + wl-paste instead: -exec wl-paste --watch cliphist store -exec --no-startup-id dunst -# swayidle replaces xautolock -exec swayidle -w timeout 1800 'swaylock -f' before-sleep 'swaylock -f' -exec --no-startup-id waterfox -exec --no-startup-id steam -exec --no-startup-id surfshark - -# picom is X11-only; sway has a built-in compositor — no exec needed - -# PACTL BINDINGS --------------------------------------- - -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle - -# BRIGHTNESSCTL BINDINGS ---------------------------------- - -bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5% -bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- - -# DEFAULT WINDOW LAYOUT ------------------------------------- - -workspace_layout stacking -default_border pixel 1 -default_floating_border normal -hide_edge_borders none - -# KEYBINDS -------------------------------------------------- - -set $mod Mod4 - -# change borders -bindsym $mod+u border none -bindsym $mod+y border pixel 1 -bindsym $mod+n border normal - -# Use Mouse+$mod to drag floating windows -floating_modifier $mod normal - -# start a terminal -bindsym $mod+Return exec kitty -# kill focused window -bindsym $mod+Shift+q kill -# start program launcher -bindsym $mod+d exec --no-startup-id wofi --show drun --style ~/scripts/wofi/wofi_style.css - -bindsym $mod+Ctrl+m exec pavucontrol - -# Start Applications -bindsym $mod+F2 exec waterfox -bindsym $mod+F3 exec kitty -e ranger -bindsym $mod+Shift+F3 exec pcmanfm -bindsym $mod+F5 exec kitty -e 'mocp' -# picom keybinds removed (not applicable on Wayland) -bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" -# Screenshots: grim + slurp replace i3-scrot / flameshot -bindsym Print exec grim -g "$(slurp)" -bindsym $mod+Print exec grim -g "$(swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')" -bindsym $mod+Shift+Print exec grim -g "$(slurp)" -# xkill not available on Wayland; swaymsg kill is the closest equivalent -bindsym $mod+Ctrl+x exec swaymsg kill - -focus_follows_mouse yes - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# workspace back and forth (with/without active container) -workspace_auto_back_and_forth yes -bindsym $mod+b workspace back_and_forth -bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth - -# split orientation -bindsym $mod+g split h;exec notify-send 'tile horizontally' -bindsym $mod+v split v;exec notify-send 'tile vertically' -bindsym $mod+q split toggle - -# toggle fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking;exec notify-send 'layout stacking' -bindsym $mod+w layout tabbed; exec notify-send 'layout tabbed' -bindsym $mod+e layout toggle split; exec notify-send 'layout split' - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# toggle sticky -bindsym $mod+Shift+s sticky toggle - -# focus the parent container -bindsym $mod+a focus parent - -# move the currently focused window to the scratchpad -bindsym $mod+Shift+minus move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -bindsym $mod+minus scratchpad show - -#navigate workspaces next / previous -bindsym $mod+Ctrl+Right workspace next -bindsym $mod+Ctrl+Left workspace prev - - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 - -# Move focused container to workspace -bindsym $mod+Ctrl+1 move container to workspace $ws1 -bindsym $mod+Ctrl+2 move container to workspace $ws2 -bindsym $mod+Ctrl+3 move container to workspace $ws3 -bindsym $mod+Ctrl+4 move container to workspace $ws4 -bindsym $mod+Ctrl+5 move container to workspace $ws5 -bindsym $mod+Ctrl+6 move container to workspace $ws6 -bindsym $mod+Ctrl+7 move container to workspace $ws7 -bindsym $mod+Ctrl+8 move container to workspace $ws8 - -# Move to workspace with focused container -bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 - -# reload the configuration file -bindsym $mod+Shift+c reload - -# restart sway inplace -bindsym $mod+Shift+r reload - -# exit sway (logs you out of your Wayland session) -bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' - -# Set shut down, restart and locking features -bindsym $mod+0 mode "$mode_system" -set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown -mode "$mode_system" { - bindsym l exec swaylock -f, mode "default" - bindsym s exec systemctl suspend, mode "default" - bindsym u exec swaymsg exit, mode "default" - bindsym e exit - bindsym h exec systemctl hibernate, mode "default" - bindsym r exec systemctl reboot - bindsym Shift+s exec systemctl poweroff - - # exit system mode: "Enter" or "Escape" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Resize window (you can also use the mouse for that) -bindsym $mod+r mode "resize" -mode "resize" { - bindsym h resize shrink width 5 px or 5 ppt - bindsym j resize grow height 5 px or 5 ppt - bindsym k resize shrink height 5 px or 5 ppt - bindsym l resize grow width 5 px or 5 ppt - - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# Gaps mode -set $mode_gaps Gaps: (o) outer, (i) inner -set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) -set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) -bindsym $mod+Shift+g mode "$mode_gaps" - -mode "$mode_gaps" { - bindsym o mode "$mode_gaps_outer" - bindsym i mode "$mode_gaps_inner" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -mode "$mode_gaps_inner" { - bindsym plus gaps inner current plus 5 - bindsym minus gaps inner current minus 5 - bindsym 0 gaps inner current set 0 - - bindsym Shift+plus gaps inner all plus 5 - bindsym Shift+minus gaps inner all minus 5 - bindsym Shift+0 gaps inner all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} - -mode "$mode_gaps_outer" { - bindsym plus gaps outer current plus 5 - bindsym minus gaps outer current minus 5 - bindsym 0 gaps outer current set 0 - - bindsym Shift+plus gaps outer all plus 5 - bindsym Shift+minus gaps outer all minus 5 - bindsym Shift+0 gaps outer all set 0 - - bindsym Return mode "default" - bindsym Escape mode "default" -} - - -# Lock screen -bindsym $mod+9 exec --no-startup-id swaylock -f - -# APPLICATION WORKSPACES ---------------------------------------------------- -assign [app_id="Surfshark"] $ws8 - -# APPLICATION WINDOW MODES -------------------------------------------------- -# Note: use app_id for native Wayland apps, class for XWayland apps -for_window [title="Picture-in-Picture"] floating disable border pixel 0 - -for_window [title="alsamixer"] floating enable border pixel 1 -for_window [class="calamares"] floating enable border normal -for_window [class="Clipgrab"] floating enable -for_window [title="File Transfer*"] floating enable -for_window [class="fpakman"] floating enable -for_window [class="Galculator"] floating enable border pixel 1 -for_window [class="GParted"] floating enable border normal -for_window [title="i3_help"] floating enable sticky enable border normal -for_window [class="Lightdm-settings"] floating enable -for_window [class="Lxappearance"] floating enable sticky enable border normal -for_window [class="Manjaro-hello"] floating enable -for_window [class="Manjaro Settings Manager"] floating enable border normal -for_window [title="MuseScore: Play Panel"] floating enable -for_window [class="Nitrogen"] floating enable sticky enable border normal -for_window [class="Oblogout"] fullscreen enable -for_window [class="octopi"] floating enable -for_window [title="About Pale Moon"] floating enable -for_window [class="Pamac-manager"] floating enable -for_window [app_id="pavucontrol"] floating enable -for_window [class="qt5ct"] floating enable sticky enable border normal -for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal -for_window [class="Simple-scan"] floating enable border normal -for_window [class="(?i)System-config-printer.py"] floating enable border normal -for_window [class="Skype"] floating enable border normal -for_window [class="Timeset-gui"] floating enable border normal -for_window [class="(?i)virtualbox"] floating enable border normal -for_window [class="Xfburn"] floating enable - -# switch to workspace with urgent window automatically -for_window [urgent=latest] focus - -# AESTETICS ---------------------------------------------------------------- -exec_always waybar -c ~/scripts/waybar/waybar_sway_config.json -s ~/scripts/waybar/waybar_style.css - -# Theme colors -# class border backgr. text indic. -client.focused $color_secondary $color_primary $color_text_dark $color_primary -client.focused_inactive $color_primary $color_alt_bg $color_text_light $color_tertiary -client.unfocused $color_gray $color_alt_bg $color_text_light $color_primary -client.urgent $color_tertiary $color_alt_bg $color_white $color_tertiary -client.placeholder $color_bg $color_bg $color_white $color_bg - -client.background $color_bg - -# Set inner/outer gaps -gaps inner 10 -gaps outer 0 -smart_gaps on - -smart_borders on diff --git a/waybar/style.css b/waybar/style.css deleted file mode 100644 index 5efa766..0000000 --- a/waybar/style.css +++ /dev/null @@ -1,148 +0,0 @@ -@define-color color_primary #55ffbb; -@define-color color_secondary #62ff57; -@define-color color_tertiary #ff579a; -@define-color color_bg #1b110e; -@define-color color_bg_secondary #000000; -@define-color color_alt_bg #024942; -@define-color color_gray #222222; -@define-color color_text_light #F0F0F0; -@define-color color_text_dark #1b110e; -@define-color color_white #FFFFFF; - -* { - font-family: "URWGothic-Book", monospace; - font-size: 16px; - min-height: 0; - border: none; - border-radius: 0; - padding: 0; - margin: 0; -} - -window#waybar { - background-color: @color_bg; - color: @color_primary; -} - -/* Workspaces */ -#workspaces button { - padding: 0 8px; - background-color: @color_alt_bg; - color: @color_white; - border-bottom: 2px solid transparent; -} - -#workspaces button:hover { - background-color: @color_alt_bg; - border-bottom: 2px solid @color_primary; - box-shadow: none; -} - -#workspaces button.focused, -#workspaces button.active { - background-color: @color_bg; - color: @color_white; - border-bottom: 2px solid @color_primary; -} - -#workspaces button.urgent { - background-color: @color_tertiary; - color: @color_white; -} - -#mode { - background-color: @color_tertiary; - color: @color_text_dark; - padding: 0 8px; - font-style: italic; -} - -/* Right-side modules */ -#custom-greetings, -#custom-history, -#custom-claudebar, -#pulseaudio, -#cpu, -#memory, -#disk, -#network, -#battery, -#clock { - padding: 0 10px; - color: @color_primary; -} - -/* Pink separators between modules (matching i3bar separator color) */ -#custom-history, -#custom-claudebar, -#pulseaudio, -#cpu, -#memory, -#disk, -#network, -#battery, -#clock { - border-left: 1px solid @color_tertiary; -} - -#battery.warning { - color: @color_secondary; -} - -#battery.critical { - color: @color_tertiary; -} - -#custom-greetings { - color: @color_secondary; -} - -#clock { - color: @color_tertiary; -} - -/* claudebar severity classes */ -#custom-claudebar.low { - color: @color_primary; -} - -#custom-claudebar.mid { - color: @color_secondary; -} - -#custom-claudebar.high { - color: @color_tertiary; -} - -#custom-claudebar.critical { - color: @color_tertiary; -} - -/* App launcher buttons */ -#custom-steam, -#custom-waterfox, -#custom-discord, -#custom-spotify, -#custom-obsidian { - padding: 0 10px; - color: @color_primary; -} - -#custom-steam { - margin-left: 8px; - border-left: 1px solid @color_tertiary; -} - -#tray { - padding: 0 8px; - border-left: 1px solid @color_tertiary; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: @color_tertiary; -} diff --git a/wofi/style.css b/wofi/style.css deleted file mode 100644 index 62e10af..0000000 --- a/wofi/style.css +++ /dev/null @@ -1,59 +0,0 @@ -@define-color color_primary #55ffbb; -@define-color color_secondary #62ff57; -@define-color color_tertiary #ff579a; -@define-color color_bg #1b110e; -@define-color color_bg_secondary #000000; -@define-color color_alt_bg #024942; -@define-color color_gray #222222; -@define-color color_text_light #F0F0F0; -@define-color color_text_dark #1b110e; -@define-color color_white #FFFFFF; - -window { - margin: 0px; - border: 1px solid @color_primary; - background-color: @color_bg; - border-radius: 8px; -} - -#input { - padding: 4px 8px; - margin: 6px; - color: @color_text_light; - background-color: @color_alt_bg; - border: 1px solid @color_primary; - border-radius: 4px; -} - -#inner-box { - background-color: @color_bg; -} - -#outer-box { - margin: 4px; - padding: 4px; - background-color: @color_bg; -} - -#scroll { - margin: 0px; - padding: 4px; -} - -#text { - margin: 2px 8px; - color: @color_primary; -} - -#entry { - border-radius: 4px; -} - -#entry:selected { - background-color: @color_alt_bg; - border: 1px solid @color_primary; -} - -#text:selected { - color: @color_tertiary; -}