From 2c9d9c7c3227239426d91cc86c1c1ea733e26c00 Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 22 Apr 2026 11:40:31 -0700 Subject: [PATCH] Initial Niri + Wayland dotfiles --- README.md | 0 alacritty/alacritty.toml | 20 +++++++++++ install.sh | 20 +++++++++++ mako/config | 5 +++ niri/config.kdl | 77 ++++++++++++++++++++++++++++++++++++++++ packages.txt | 17 +++++++++ scripts/autostart.sh | 7 ++++ scripts/screenshot.sh | 5 +++ waybar/config.jsonc | 29 +++++++++++++++ waybar/style.css | 22 ++++++++++++ wofi/config | 4 +++ 11 files changed, 206 insertions(+) create mode 100644 README.md create mode 100644 alacritty/alacritty.toml create mode 100755 install.sh create mode 100644 mako/config create mode 100644 niri/config.kdl create mode 100644 packages.txt create mode 100755 scripts/autostart.sh create mode 100644 scripts/screenshot.sh create mode 100644 waybar/config.jsonc create mode 100644 waybar/style.css create mode 100644 wofi/config diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml new file mode 100644 index 0000000..3eba4cb --- /dev/null +++ b/alacritty/alacritty.toml @@ -0,0 +1,20 @@ +[window] +padding = { x = 10, y = 10 } +opacity = 0.95 + +[font] +normal = { family = "JetBrainsMono Nerd Font", style = "Regular" } +size = 11.5 + +[scrolling] +history = 10000 + +[env] +TERM = "xterm-256color" + +[selection] +save_to_clipboard = true +[[keyboard.bindings]] +key = "Return" +mods = "Shift" +chars = "\u001B\r" diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..7b6bf01 --- /dev/null +++ b/install.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +echo "==> Installing packages" +sudo pacman -S --needed - < packages.txt + +echo "==> Creating config directories" +mkdir -p ~/.config/{niri,waybar,wofi,mako,alacritty} + +echo "==> Linking configs" + +ln -sf "$(pwd)/niri/config.kdl" ~/.config/niri/config.kdl +ln -sf "$(pwd)/waybar/config.jsonc" ~/.config/waybar/config.jsonc +ln -sf "$(pwd)/waybar/style.css" ~/.config/waybar/style.css +ln -sf "$(pwd)/wofi/config" ~/.config/wofi/config +ln -sf "$(pwd)/mako/config" ~/.config/mako/config +ln -sf "$(pwd)/alacritty/alacritty.toml" ~/.config/alacritty/alacritty.toml + +echo "==> Done. Start Niri with: niri" diff --git a/mako/config b/mako/config new file mode 100644 index 0000000..8ca5a69 --- /dev/null +++ b/mako/config @@ -0,0 +1,5 @@ +background-color=#1e1e2e +text-color=#cdd6f4 +border-size=2 +border-color=#89b4fa +default-timeout=4000 diff --git a/niri/config.kdl b/niri/config.kdl new file mode 100644 index 0000000..4cb02f8 --- /dev/null +++ b/niri/config.kdl @@ -0,0 +1,77 @@ +input { + keyboard { + repeat-delay 250 + repeat-rate 60 + } + + touchpad { + tap + natural-scroll + dwt + accel-speed 0.4 + } +} + +layout { + gaps 10 + border-width 2 + + focus-ring { + width 3 + active-color "#89b4fa" + inactive-color "#444444" + } +} + +environment { + MOZ_ENABLE_WAYLAND "1" + QT_QPA_PLATFORM "wayland" + SDL_VIDEODRIVER "wayland" +} + +spawn-at-startup [ + "waybar" + "mako" + "swww-daemon" + "nm-applet --indicator" + "polkit-gnome-authentication-agent-1" +] + +binds { + // apps + Mod+Return { spawn "alacritty" } + Mod+D { spawn "wofi --show drun" } + Mod+E { spawn "thunar" } + + // window control + Mod+Q { close-window } + Mod+F { toggle-fullscreen } + + // focus + Mod+H { focus-left } + Mod+J { focus-down } + Mod+K { focus-up } + Mod+L { focus-right } + + // move windows + Mod+Shift+H { move-left } + Mod+Shift+J { move-down } + Mod+Shift+K { move-up } + Mod+Shift+L { move-right } + + // screenshot + Print { spawn "grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +%s).png" } + + // lock / exit + Mod+Shift+E { spawn "swaylock -f -c 000000" } + Mod+Shift+X { quit } + + // volume + XF86AudioRaiseVolume { spawn "pamixer -i 5" } + XF86AudioLowerVolume { spawn "pamixer -d 5" } + XF86AudioMute { spawn "pamixer -t" } + + // brightness + XF86MonBrightnessUp { spawn "brightnessctl set +10%" } + XF86MonBrightnessDown { spawn "brightnessctl set 10%-" } +} diff --git a/packages.txt b/packages.txt new file mode 100644 index 0000000..9689bdc --- /dev/null +++ b/packages.txt @@ -0,0 +1,17 @@ +niri +waybar +wofi +mako +alacritty +swww +grim +slurp +wl-clipboard +brightnessctl +pamixer +swaylock +ttf-jetbrains-mono-nerd +network-manager-applet +polkit-gnome +xdg-desktop-portal-wlr +thunar diff --git a/scripts/autostart.sh b/scripts/autostart.sh new file mode 100755 index 0000000..df84a28 --- /dev/null +++ b/scripts/autostart.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +waybar & +mako & +swww-daemon & +nm-applet --indicator & +polkit-gnome-authentication-agent-1 & diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh new file mode 100644 index 0000000..4275d84 --- /dev/null +++ b/scripts/screenshot.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +FILE=~/Pictures/screenshot-$(date +%s).png +grim -g "$(slurp)" "$FILE" +wl-copy < "$FILE" diff --git a/waybar/config.jsonc b/waybar/config.jsonc new file mode 100644 index 0000000..2b8542c --- /dev/null +++ b/waybar/config.jsonc @@ -0,0 +1,29 @@ +{ + "layer": "top", + "position": "top", + "height": 32, + + "modules-left": ["niri/workspaces"], + "modules-center": ["clock"], + "modules-right": ["pulseaudio", "network", "battery", "tray"], + + "clock": { + "format": "{:%a %b %d %H:%M}" + }, + + "battery": { + "format": "{capacity}% {icon}", + "format-icons": ["","","","",""] + }, + + "network": { + "format-wifi": " {essid}", + "format-ethernet": "󰈀", + "format-disconnected": "⚠" + }, + + "pulseaudio": { + "format": " {volume}%", + "format-muted": "" + } +} diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..9513005 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,22 @@ +* { + font-family: JetBrainsMono Nerd Font; + font-size: 13px; +} + +window#waybar { + background: rgba(15,15,20,0.9); + color: #cdd6f4; +} + +#workspaces button { + padding: 0 8px; + color: #6c7086; +} + +#workspaces button.focused { + color: #89b4fa; +} + +#clock, #battery, #network, #pulseaudio { + padding: 0 12px; +} diff --git a/wofi/config b/wofi/config new file mode 100644 index 0000000..99ebb8b --- /dev/null +++ b/wofi/config @@ -0,0 +1,4 @@ +show=drun +width=700 +height=450 +prompt=Run: