From 63d2e4be7ed54b557a5f0dc5eae1da0465a3c17f Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Fri, 15 May 2026 14:48:05 +0200 Subject: [PATCH 1/7] feat: add omarchy speicific configuration and setup script --- omarchy/README.md | 80 +++++++++++++++++++++++++++++++++ omarchy/keyd/dell-internal.conf | 11 +++++ omarchy/setup.sh | 29 ++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 omarchy/README.md create mode 100644 omarchy/keyd/dell-internal.conf create mode 100755 omarchy/setup.sh diff --git a/omarchy/README.md b/omarchy/README.md new file mode 100644 index 0000000..bcf8d6f --- /dev/null +++ b/omarchy/README.md @@ -0,0 +1,80 @@ +# Omarchy + +Linux-specific dotfiles for Omarchy. + +## Setup + +1. Find the internal keyboard ID: + +```bash +sudo keyd monitor +``` + +2. Replace `REPLACE_WITH_KEYD_MONITOR_ID` in `omarchy/keyd/dell-internal.conf`. + +Do not add the `k:` prefix unless tested. On the Dell XPS setup, matching only worked without `k:`. + +3. Run setup: + +```bash +./omarchy/setup.sh +``` + +Override repo path if needed: + +```bash +DOTFILES_DIR=/path/to/dotfiles ./omarchy/setup.sh +``` + +## Hyprland + +Edit `~/.config/hypr/input.conf`: + +```conf +kb_options = + +touchpad { + natural_scroll = true +} +``` + +Do not only comment out `kb_options`. + +Password manager binding in `~/.config/hypr/bindings.conf`: + +```conf +bindd = SUPER SHIFT, SLASH, Passwords, exec, uwsm-app -- enpass +``` + +Install Enpass with `Install > AUR > enpass-bin`. + +## Useful Commands + +Validate: + +```bash +sudo keyd check /etc/keyd/dell-internal.conf +``` + +Reload: + +```bash +sudo keyd reload +``` + +Logs: + +```bash +sudo journalctl -eu keyd +``` + +Emergency stop: + +```text +Backspace + Escape + Enter +``` + +## Notes + +- Keyboard IDs can vary between computers. +- If Caps Lock behaves normally, rerun `sudo keyd monitor` and update `[ids]`. diff --git a/omarchy/keyd/dell-internal.conf b/omarchy/keyd/dell-internal.conf new file mode 100644 index 0000000..be4860f --- /dev/null +++ b/omarchy/keyd/dell-internal.conf @@ -0,0 +1,11 @@ +[ids] +REPLACE_WITH_KEYD_MONITOR_ID + +[main] +capslock = overload(capslock, esc) + +[capslock:C] +h = left +j = down +k = up +l = right diff --git a/omarchy/setup.sh b/omarchy/setup.sh new file mode 100755 index 0000000..9cb7d0a --- /dev/null +++ b/omarchy/setup.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +KEYD_SOURCE="$DOTFILES_DIR/omarchy/keyd/dell-internal.conf" +KEYD_TARGET="/etc/keyd/dell-internal.conf" + +if ! command -v keyd >/dev/null 2>&1; then + if command -v omarchy-pkg-add >/dev/null 2>&1; then + omarchy-pkg-add keyd + else + sudo pacman -S --needed keyd + fi +fi + +if grep -q "REPLACE_WITH_KEYD_MONITOR_ID" "$KEYD_SOURCE"; then + printf 'Replace REPLACE_WITH_KEYD_MONITOR_ID in %s first.\n' "$KEYD_SOURCE" >&2 + printf 'Find the internal keyboard ID with: sudo keyd monitor\n' >&2 + exit 1 +fi + +sudo mkdir -p /etc/keyd +sudo ln -sf "$KEYD_SOURCE" "$KEYD_TARGET" +sudo keyd check "$KEYD_TARGET" +sudo systemctl enable --now keyd +sudo keyd reload + +printf 'Installed keyd config: %s -> %s\n' "$KEYD_TARGET" "$KEYD_SOURCE" +printf 'Ensure ~/.config/hypr/input.conf contains: kb_options =\n' From ba56f8878cfe837792cd3f24c26cc5adeb3a2f2d Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Wed, 10 Jun 2026 17:40:08 +0200 Subject: [PATCH 2/7] feat: tmux for omarchy --- omarchy/README.md | 34 ++++ .../hooks/post-update.d/ensure-tmux-sourced | 5 + omarchy/setup.sh | 6 + omarchy/tmux/ensure-sourced.sh | 29 ++++ omarchy/tmux/setup.sh | 36 +++++ omarchy/tmux/tim.conf | 147 ++++++++++++++++++ 6 files changed, 257 insertions(+) create mode 100755 omarchy/hooks/post-update.d/ensure-tmux-sourced create mode 100755 omarchy/tmux/ensure-sourced.sh create mode 100755 omarchy/tmux/setup.sh create mode 100644 omarchy/tmux/tim.conf diff --git a/omarchy/README.md b/omarchy/README.md index bcf8d6f..5c7fd7d 100644 --- a/omarchy/README.md +++ b/omarchy/README.md @@ -26,6 +26,40 @@ Override repo path if needed: DOTFILES_DIR=/path/to/dotfiles ./omarchy/setup.sh ``` +The setup script installs both the keyd config and the Omarchy tmux overlay. + +## Tmux + +The Omarchy tmux setup keeps Omarchy's base config at `~/.config/tmux/tmux.conf`, then sources a repo-owned personal layer from the end of that file: + +```tmux +source-file -q ~/.config/tmux/tim.conf +``` + +`~/.config/tmux/tim.conf` is symlinked to: + +```text +omarchy/tmux/tim.conf +``` + +This overlay intentionally owns the tmux statusbar, prefix, pane/window bindings, Vim-aware pane navigation, and tmux plugins. Because it is sourced after Omarchy's default config, Tim's statusbar overrides Omarchy's tmux statusbar. + +If `omarchy refresh tmux` or an Omarchy update replaces `~/.config/tmux/tmux.conf`, rerun: + +```bash +./omarchy/tmux/setup.sh +``` + +The setup also installs a post-update hook at: + +```text +~/.config/omarchy/hooks/post-update.d/ensure-tmux-sourced +``` + +That hook re-adds the source line after normal Omarchy updates. + +Tmux plugins are managed by TPM. After the first setup, press `Ctrl-a I` inside tmux to install plugin dependencies. + ## Hyprland Edit `~/.config/hypr/input.conf`: diff --git a/omarchy/hooks/post-update.d/ensure-tmux-sourced b/omarchy/hooks/post-update.d/ensure-tmux-sourced new file mode 100755 index 0000000..136a212 --- /dev/null +++ b/omarchy/hooks/post-update.d/ensure-tmux-sourced @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +exec "$DOTFILES_DIR/omarchy/tmux/ensure-sourced.sh" diff --git a/omarchy/setup.sh b/omarchy/setup.sh index 9cb7d0a..d7e2ce5 100755 --- a/omarchy/setup.sh +++ b/omarchy/setup.sh @@ -27,3 +27,9 @@ sudo keyd reload printf 'Installed keyd config: %s -> %s\n' "$KEYD_TARGET" "$KEYD_SOURCE" printf 'Ensure ~/.config/hypr/input.conf contains: kb_options =\n' + +if [[ -x "$DOTFILES_DIR/omarchy/tmux/setup.sh" ]]; then + "$DOTFILES_DIR/omarchy/tmux/setup.sh" +else + bash "$DOTFILES_DIR/omarchy/tmux/setup.sh" +fi diff --git a/omarchy/tmux/ensure-sourced.sh b/omarchy/tmux/ensure-sourced.sh new file mode 100755 index 0000000..a6d0208 --- /dev/null +++ b/omarchy/tmux/ensure-sourced.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail + +TMUX_CONF="${HOME}/.config/tmux/tmux.conf" +OMARCHY_TMUX_CONF="${HOME}/.local/share/omarchy/config/tmux/tmux.conf" +SOURCE_LINE='source-file -q ~/.config/tmux/tim.conf' +MARKER='# Tim dotfiles tmux overlay' + +mkdir -p "$(dirname "$TMUX_CONF")" + +if [[ ! -f "$TMUX_CONF" ]]; then + if [[ -f "$OMARCHY_TMUX_CONF" ]]; then + cp "$OMARCHY_TMUX_CONF" "$TMUX_CONF" + else + touch "$TMUX_CONF" + fi +fi + +tmp_file=$(mktemp) +grep -vxF "$SOURCE_LINE" "$TMUX_CONF" | grep -vxF "$MARKER" >"$tmp_file" || true +mv "$tmp_file" "$TMUX_CONF" + +printf '\n%s\n%s\n' "$MARKER" "$SOURCE_LINE" >>"$TMUX_CONF" + +if pgrep -x tmux >/dev/null 2>&1; then + tmux source-file "$TMUX_CONF" +fi + +printf 'Ensured tmux overlay is sourced from %s\n' "$TMUX_CONF" diff --git a/omarchy/tmux/setup.sh b/omarchy/tmux/setup.sh new file mode 100755 index 0000000..df02d7f --- /dev/null +++ b/omarchy/tmux/setup.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +TMUX_SOURCE="$DOTFILES_DIR/omarchy/tmux/tim.conf" +TMUX_TARGET="$HOME/.config/tmux/tim.conf" +HOOK_SOURCE="$DOTFILES_DIR/omarchy/hooks/post-update.d/ensure-tmux-sourced" +HOOK_TARGET="$HOME/.config/omarchy/hooks/post-update.d/ensure-tmux-sourced" + +install_packages() { + local packages=(tmux git bc wl-clipboard) + + if command -v omarchy >/dev/null 2>&1; then + omarchy pkg add "${packages[@]}" + elif command -v omarchy-pkg-add >/dev/null 2>&1; then + omarchy-pkg-add "${packages[@]}" + else + sudo pacman -S --needed "${packages[@]}" + fi +} + +install_packages + +mkdir -p "$HOME/.config/tmux" "$HOME/.config/omarchy/hooks/post-update.d" "$HOME/.tmux/plugins" +ln -sfn "$TMUX_SOURCE" "$TMUX_TARGET" +ln -sfn "$HOOK_SOURCE" "$HOOK_TARGET" + +if [[ ! -d "$HOME/.tmux/plugins/tpm/.git" ]]; then + rm -rf "$HOME/.tmux/plugins/tpm" + git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm" +fi + +bash "$DOTFILES_DIR/omarchy/tmux/ensure-sourced.sh" + +printf 'Installed Omarchy tmux config: %s -> %s\n' "$TMUX_TARGET" "$TMUX_SOURCE" +printf 'Installed Omarchy post-update hook: %s -> %s\n' "$HOOK_TARGET" "$HOOK_SOURCE" diff --git a/omarchy/tmux/tim.conf b/omarchy/tmux/tim.conf new file mode 100644 index 0000000..9829562 --- /dev/null +++ b/omarchy/tmux/tim.conf @@ -0,0 +1,147 @@ +# Tim's tmux layer for Omarchy. +# Source this after Omarchy's default tmux.conf so personal bindings and statusbar win. + +# ----------------------------=== General ===-------------------------- + +set -g base-index 1 +set -g pane-base-index 1 +setw -g pane-base-index 1 +set -g renumber-windows on + +set -g default-terminal "tmux-256color" +set -ag terminal-overrides ",*:RGB" + +set -g status-keys vi +setw -g mode-keys vi +setw -g monitor-activity off + +set -g mouse on +set-option -g allow-rename off +set -g bell-action none +set -g visual-bell off +set-option -g default-command "exec $SHELL" + +# Prefix +unbind C-b +unbind C-Space +set -g prefix C-a +bind C-a send-prefix + +# ----------------------------=== Copy mode ===-------------------------- + +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-selection +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel +bind-key -T copy-mode-vi / send-keys -X search-forward + +# ----------------------------=== Panes and windows ===-------------------------- + +unbind a +bind-key a choose-tree -Zs -O name + +unbind Space +bind-key Space switch-client -l + +bind-key c new-window -c "#{pane_current_path}" +bind-key v split-window -h -c "#{pane_current_path}" +bind-key s split-window -v -c "#{pane_current_path}" + +bind-key J resize-pane -D 5 +bind-key K resize-pane -U 5 +bind-key H resize-pane -L 5 +bind-key L resize-pane -R 5 + +bind-key h previous-window +bind-key l next-window + +unbind r +bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!" + +unbind x +bind-key x kill-pane + +# Smart pane switching with awareness of Vim/Neovim splits. +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\/)?g?(view|n?vim?x?)(diff)?$'" + +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' +bind-key -n 'C-\' if-shell "$is_vim" 'send-keys C-\\' 'select-pane -l' +bind-key -n 'C-Space' if-shell "$is_vim" 'send-keys C-Space' 'select-pane -t:.+' + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l +bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+ + +# ----------------------------=== Theme ===-------------------------- + +# Rose Pine Moon-ish palette, kept here because this file intentionally owns tmux statusbar. +set -g @thm_bg "#191724" +set -g @thm_fg "#e0def4" +set -g @thm_cyan "#9ccfd8" +set -g @thm_black "#21202e" +set -g @thm_gray "#403d52" +set -g @thm_magenta "#c6aae8" +set -g @thm_pink "#e5b4e2" +set -g @thm_red "#eb6492" +set -g @thm_green "#b1e3ad" +set -g @thm_yellow "#f6c177" +set -g @thm_blue "#31748f" +set -g @thm_orange "#f6c177" +set -g @thm_black4 "#575268" +set -g @thm_lightgray "#524f67" + +set -g pane-active-border-style "bg=default,fg=#{@thm_pink}" +set -g pane-border-style "fg=#{@thm_black}" + +# ----------------------------=== Status line ===-------------------------- + +set -g status on +set -g status-position bottom +set -g status-bg "#21202e" +set -g status-fg "#524f67" + +set -g status-left-length 90 +set -g status-right-length 90 + +set -g status-left ' #{tmux_mode_indicator} ' +set -g status-right '#[fg=#{@thm_pink}]#S #[default] | #{weather} | #[bg=#{battery_status_bg}]#{battery_percentage} #{battery_remain}#[default] | #{cpu_fg_color} CPU: #{cpu_percentage} #[default] | #[fg=#{@thm_magenta}]%d/%m #[fg=#{@thm_blue}]%H:%M' + +set -g @mode_indicator_prefix_prompt ' * ' +set -g @mode_indicator_copy_prompt ' * ' +set -g @mode_indicator_sync_prompt ' * ' +set -g @mode_indicator_empty_prompt ' * ' + +set -g @mode_indicator_prefix_mode_style "bg=#{@thm_green},fg=#{@thm_bg}" +set -g @mode_indicator_sync_mode_style "bg=#{@thm_pink},fg=#{@thm_bg}" +set -g @mode_indicator_empty_mode_style "bg=#{@thm_magenta},fg=#{@thm_bg}" + +set -g @cpu_percentage_format "%5.1f%%" +set -g @cpu_low_fg_color "#[fg=#{@thm_green}]" +set -g @cpu_medium_fg_color "#[fg=#{@thm_yellow}]" +set -g @cpu_high_fg_color "#[fg=#{@thm_red}]" + +set -g window-status-current-style "bg=#{@thm_black},fg=#{@thm_orange}" +set -g window-status-style "bg=#{@thm_black},fg=#{@thm_fg}" + +setw -g window-status-current-format ' #{window_name} ' +setw -g window-status-format ' #{window_name} ' + +# ----------------------------=== Plugins ===-------------------------- + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'tmux-plugins/tmux-cpu' +set -g @plugin 'tmux-plugins/tmux-battery' +set -g @plugin 'MunifTanjim/tmux-mode-indicator' +set -g @plugin 'xamut/tmux-weather' +set -g @plugin 'tmux-plugins/tmux-yank' + +run -b '~/.tmux/plugins/tpm/tpm' From 390beae698b29b7bd9a29ab211881b951313dad7 Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Wed, 10 Jun 2026 21:36:19 +0200 Subject: [PATCH 3/7] more tmux --- omarchy/tmux/tim.conf | 57 ++++++++++--------------------------------- 1 file changed, 13 insertions(+), 44 deletions(-) diff --git a/omarchy/tmux/tim.conf b/omarchy/tmux/tim.conf index 9829562..1ce8065 100644 --- a/omarchy/tmux/tim.conf +++ b/omarchy/tmux/tim.conf @@ -3,19 +3,6 @@ # ----------------------------=== General ===-------------------------- -set -g base-index 1 -set -g pane-base-index 1 -setw -g pane-base-index 1 -set -g renumber-windows on - -set -g default-terminal "tmux-256color" -set -ag terminal-overrides ",*:RGB" - -set -g status-keys vi -setw -g mode-keys vi -setw -g monitor-activity off - -set -g mouse on set-option -g allow-rename off set -g bell-action none set -g visual-bell off @@ -29,9 +16,7 @@ bind C-a send-prefix # ----------------------------=== Copy mode ===-------------------------- -bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi C-v send-keys -X rectangle-selection -bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel bind-key -T copy-mode-vi / send-keys -X search-forward # ----------------------------=== Panes and windows ===-------------------------- @@ -80,54 +65,38 @@ bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+ # ----------------------------=== Theme ===-------------------------- -# Rose Pine Moon-ish palette, kept here because this file intentionally owns tmux statusbar. -set -g @thm_bg "#191724" -set -g @thm_fg "#e0def4" -set -g @thm_cyan "#9ccfd8" -set -g @thm_black "#21202e" -set -g @thm_gray "#403d52" -set -g @thm_magenta "#c6aae8" -set -g @thm_pink "#e5b4e2" -set -g @thm_red "#eb6492" -set -g @thm_green "#b1e3ad" -set -g @thm_yellow "#f6c177" -set -g @thm_blue "#31748f" -set -g @thm_orange "#f6c177" -set -g @thm_black4 "#575268" -set -g @thm_lightgray "#524f67" - -set -g pane-active-border-style "bg=default,fg=#{@thm_pink}" -set -g pane-border-style "fg=#{@thm_black}" +# Use ANSI colors so Omarchy's active terminal theme controls the palette. +set -g pane-active-border-style "bg=default,fg=magenta" +set -g pane-border-style "fg=brightblack" # ----------------------------=== Status line ===-------------------------- set -g status on set -g status-position bottom -set -g status-bg "#21202e" -set -g status-fg "#524f67" +set -g status-style "bg=default,fg=brightblack" set -g status-left-length 90 set -g status-right-length 90 set -g status-left ' #{tmux_mode_indicator} ' -set -g status-right '#[fg=#{@thm_pink}]#S #[default] | #{weather} | #[bg=#{battery_status_bg}]#{battery_percentage} #{battery_remain}#[default] | #{cpu_fg_color} CPU: #{cpu_percentage} #[default] | #[fg=#{@thm_magenta}]%d/%m #[fg=#{@thm_blue}]%H:%M' +set -g status-right '#[fg=magenta]#S #[default] | #{weather} | #[bg=#{battery_status_bg}]#{battery_percentage} #{battery_remain}#[default] | #{cpu_fg_color} CPU: #{cpu_percentage} #[default] | #[fg=magenta]%d/%m #[fg=blue]%H:%M' set -g @mode_indicator_prefix_prompt ' * ' set -g @mode_indicator_copy_prompt ' * ' set -g @mode_indicator_sync_prompt ' * ' set -g @mode_indicator_empty_prompt ' * ' -set -g @mode_indicator_prefix_mode_style "bg=#{@thm_green},fg=#{@thm_bg}" -set -g @mode_indicator_sync_mode_style "bg=#{@thm_pink},fg=#{@thm_bg}" -set -g @mode_indicator_empty_mode_style "bg=#{@thm_magenta},fg=#{@thm_bg}" +set -g @mode_indicator_prefix_mode_style "bg=green,fg=black" +set -g @mode_indicator_sync_mode_style "bg=magenta,fg=black" +set -g @mode_indicator_empty_mode_style "bg=blue,fg=black" set -g @cpu_percentage_format "%5.1f%%" -set -g @cpu_low_fg_color "#[fg=#{@thm_green}]" -set -g @cpu_medium_fg_color "#[fg=#{@thm_yellow}]" -set -g @cpu_high_fg_color "#[fg=#{@thm_red}]" +set -g @cpu_low_fg_color "#[fg=green]" +set -g @cpu_medium_fg_color "#[fg=yellow]" +set -g @cpu_high_fg_color "#[fg=red]" -set -g window-status-current-style "bg=#{@thm_black},fg=#{@thm_orange}" -set -g window-status-style "bg=#{@thm_black},fg=#{@thm_fg}" +set -g window-status-current-style "bg=default,fg=yellow" +set -g window-status-style "bg=default,fg=default" setw -g window-status-current-format ' #{window_name} ' setw -g window-status-format ' #{window_name} ' From bed4de36d4cf6b60476314ad0a90948e34b03e99 Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Wed, 10 Jun 2026 22:31:31 +0200 Subject: [PATCH 4/7] feat: neovim --- omarchy/README.md | 46 ++++++++++++++- .../hooks/post-update.d/ensure-nvim-symlinks | 5 ++ omarchy/nvim/.neoconf.json | 15 +++++ omarchy/nvim/lazyvim.json | 27 +++++++++ omarchy/nvim/lua/config/autocmds.lua | 1 + omarchy/nvim/lua/config/keymaps.lua | 47 +++++++++++++++ omarchy/nvim/lua/config/options.lua | 21 +++++++ omarchy/nvim/lua/plugins/tim-blink.lua | 14 +++++ omarchy/nvim/lua/plugins/tim-disabled.lua | 6 ++ omarchy/nvim/lua/plugins/tim-lsp.lua | 38 ++++++++++++ omarchy/nvim/lua/plugins/tim-mason.lua | 31 ++++++++++ omarchy/nvim/lua/plugins/tim-neo-tree.lua | 27 +++++++++ omarchy/nvim/lua/plugins/tim-neogit.lua | 8 +++ omarchy/nvim/lua/plugins/tim-neotab.lua | 5 ++ omarchy/nvim/lua/plugins/tim-overrides.lua | 58 +++++++++++++++++++ omarchy/nvim/lua/plugins/tim-snacks.lua | 24 ++++++++ omarchy/nvim/lua/plugins/tim-surround.lua | 8 +++ .../nvim/lua/plugins/tim-tmux-navigation.lua | 7 +++ omarchy/nvim/lua/plugins/tim-treesitter.lua | 34 +++++++++++ omarchy/nvim/setup.sh | 42 ++++++++++++++ omarchy/nvim/snippets/javascript.json | 36 ++++++++++++ omarchy/nvim/snippets/package.json | 24 ++++++++ omarchy/nvim/snippets/svelte.json | 33 +++++++++++ omarchy/nvim/stylua.toml | 3 + omarchy/setup.sh | 6 ++ 25 files changed, 565 insertions(+), 1 deletion(-) create mode 100755 omarchy/hooks/post-update.d/ensure-nvim-symlinks create mode 100644 omarchy/nvim/.neoconf.json create mode 100644 omarchy/nvim/lazyvim.json create mode 100644 omarchy/nvim/lua/config/autocmds.lua create mode 100644 omarchy/nvim/lua/config/keymaps.lua create mode 100644 omarchy/nvim/lua/config/options.lua create mode 100644 omarchy/nvim/lua/plugins/tim-blink.lua create mode 100644 omarchy/nvim/lua/plugins/tim-disabled.lua create mode 100644 omarchy/nvim/lua/plugins/tim-lsp.lua create mode 100644 omarchy/nvim/lua/plugins/tim-mason.lua create mode 100644 omarchy/nvim/lua/plugins/tim-neo-tree.lua create mode 100644 omarchy/nvim/lua/plugins/tim-neogit.lua create mode 100644 omarchy/nvim/lua/plugins/tim-neotab.lua create mode 100644 omarchy/nvim/lua/plugins/tim-overrides.lua create mode 100644 omarchy/nvim/lua/plugins/tim-snacks.lua create mode 100644 omarchy/nvim/lua/plugins/tim-surround.lua create mode 100644 omarchy/nvim/lua/plugins/tim-tmux-navigation.lua create mode 100644 omarchy/nvim/lua/plugins/tim-treesitter.lua create mode 100755 omarchy/nvim/setup.sh create mode 100644 omarchy/nvim/snippets/javascript.json create mode 100644 omarchy/nvim/snippets/package.json create mode 100644 omarchy/nvim/snippets/svelte.json create mode 100644 omarchy/nvim/stylua.toml diff --git a/omarchy/README.md b/omarchy/README.md index 5c7fd7d..8a91ee2 100644 --- a/omarchy/README.md +++ b/omarchy/README.md @@ -26,7 +26,7 @@ Override repo path if needed: DOTFILES_DIR=/path/to/dotfiles ./omarchy/setup.sh ``` -The setup script installs both the keyd config and the Omarchy tmux overlay. +The setup script installs the keyd config, Omarchy tmux overlay, and Omarchy Neovim overlay. ## Tmux @@ -60,6 +60,50 @@ That hook re-adds the source line after normal Omarchy updates. Tmux plugins are managed by TPM. After the first setup, press `Ctrl-a I` inside tmux to install plugin dependencies. +## Neovim + +The Omarchy Neovim setup keeps Omarchy's LazyVim base config and theme integration, then symlinks Tim-specific options, keymaps, plugins, snippets, and LazyVim extras into the existing config. + +Personal files live in: + +```text +omarchy/nvim/ +``` + +They are symlinked into: + +```text +~/.config/nvim/ +``` + +Omarchy still owns theme integration through: + +```text +~/.config/nvim/lua/plugins/theme.lua +``` + +That file should remain a symlink to: + +```text +~/.config/omarchy/current/theme/neovim.lua +``` + +The overlay intentionally does not include the macOS `colors.lua` Rose Pine switcher or theme-specific Neo-tree highlight overrides. + +If `omarchy-nvim-setup`, `omarchy reinstall`, or an Omarchy update replaces `~/.config/nvim`, rerun: + +```bash +./omarchy/nvim/setup.sh +``` + +The setup also installs a post-update hook at: + +```text +~/.config/omarchy/hooks/post-update.d/ensure-nvim-symlinks +``` + +That hook re-adds the symlinks after normal Omarchy updates. + ## Hyprland Edit `~/.config/hypr/input.conf`: diff --git a/omarchy/hooks/post-update.d/ensure-nvim-symlinks b/omarchy/hooks/post-update.d/ensure-nvim-symlinks new file mode 100755 index 0000000..57344b4 --- /dev/null +++ b/omarchy/hooks/post-update.d/ensure-nvim-symlinks @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +exec "$DOTFILES_DIR/omarchy/nvim/setup.sh" diff --git a/omarchy/nvim/.neoconf.json b/omarchy/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/omarchy/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/omarchy/nvim/lazyvim.json b/omarchy/nvim/lazyvim.json new file mode 100644 index 0000000..11f1b53 --- /dev/null +++ b/omarchy/nvim/lazyvim.json @@ -0,0 +1,27 @@ +{ + "extras": [ + "lazyvim.plugins.extras.ai.copilot-native", + "lazyvim.plugins.extras.ai.sidekick", + "lazyvim.plugins.extras.coding.yanky", + "lazyvim.plugins.extras.editor.harpoon2", + "lazyvim.plugins.extras.editor.snacks_picker", + "lazyvim.plugins.extras.editor.telescope", + "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.docker", + "lazyvim.plugins.extras.lang.git", + "lazyvim.plugins.extras.lang.go", + "lazyvim.plugins.extras.lang.json", + "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.lang.ruby", + "lazyvim.plugins.extras.lang.svelte", + "lazyvim.plugins.extras.lang.toml", + "lazyvim.plugins.extras.lang.typescript", + "lazyvim.plugins.extras.lang.yaml", + "lazyvim.plugins.extras.linting.eslint", + "lazyvim.plugins.extras.util.mini-hipatterns" + ], + "news": { + "NEWS.md": "11866" + }, + "version": 8 +} diff --git a/omarchy/nvim/lua/config/autocmds.lua b/omarchy/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..6784c57 --- /dev/null +++ b/omarchy/nvim/lua/config/autocmds.lua @@ -0,0 +1 @@ +-- Add personal autocmds here. LazyVim defaults are loaded automatically. diff --git a/omarchy/nvim/lua/config/keymaps.lua b/omarchy/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..072fbdf --- /dev/null +++ b/omarchy/nvim/lua/config/keymaps.lua @@ -0,0 +1,47 @@ +-- Personal keymaps layered over Omarchy/LazyVim defaults. + +vim.keymap.set("n", "vs", "vs") +vim.keymap.set("n", "sp", "sp") +vim.keymap.set("n", "", ":%s/") +vim.keymap.set("t", "", "", { silent = true }) +vim.keymap.set("n", "", function() + if vim.bo.filetype ~= "qf" then + return "" + end + return "" +end, { expr = true }) + +pcall(vim.keymap.del, "n", "") +pcall(vim.keymap.del, "n", "") + +vim.keymap.set("n", "]q", "cnext") +vim.keymap.set("n", "[q", "cprev") + +vim.keymap.set("v", "K", ":m '<-2gv=gv") +vim.keymap.set("v", "J", ":m '>+1gv=gv") + +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "J", "mzJ`z") + +for _, key in ipairs({ "za", "zc", "zC", "zm", "zM", "zo", "zO", "zr", "zR", "zx", "zX" }) do + vim.keymap.set("n", key, "", { silent = true }) +end + +vim.keymap.set("n", "y", '"+y') +vim.keymap.set("v", "y", '"+y') +vim.keymap.set("n", "Y", '"+Y') + +vim.keymap.set("n", "rw", ":%s//", { desc = "Replace word under cursor" }) +vim.keymap.set({ "n", "v" }, "rW", function() + return ":" .. vim.fn.line(".") .. "s// /g" +end, { expr = true, desc = "Replace word under cursor on current line" }) + +vim.keymap.set("n", "gg", "Neogit", { silent = true }) + +vim.keymap.set("n", "", "NvimTmuxNavigateLeft", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateDown", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateUp", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateRight", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateLastActive", { silent = true }) +vim.keymap.set("n", "", "NvimTmuxNavigateNext", { silent = true }) diff --git a/omarchy/nvim/lua/config/options.lua b/omarchy/nvim/lua/config/options.lua new file mode 100644 index 0000000..25ee2af --- /dev/null +++ b/omarchy/nvim/lua/config/options.lua @@ -0,0 +1,21 @@ +-- Personal options layered over Omarchy/LazyVim defaults. + +-- Avoid root directory suddenly changing. +vim.g.root_spec = { "cwd" } + +vim.opt.list = false +vim.opt.hidden = true +vim.opt.swapfile = false +vim.opt.clipboard = "" -- Do not yank/delete to the system clipboard by default. +vim.opt.conceallevel = 0 +vim.opt.laststatus = 3 +vim.opt.foldenable = false +vim.opt.foldlevel = 99 +vim.opt.foldlevelstart = 99 +vim.opt.relativenumber = false +vim.g.snacks_animate = false + +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = { "*" }, + command = [[%s/\s\+$//e]], +}) diff --git a/omarchy/nvim/lua/plugins/tim-blink.lua b/omarchy/nvim/lua/plugins/tim-blink.lua new file mode 100644 index 0000000..d91e58a --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-blink.lua @@ -0,0 +1,14 @@ +return { + { + "saghen/blink.cmp", + opts = { + keymap = { + preset = "enter", + [""] = { "fallback" }, + [""] = { "accept", "fallback" }, + [""] = { LazyVim.cmp.map({ "ai_accept" }), "fallback" }, + [""] = { "select_prev", "fallback" }, + }, + }, + }, +} diff --git a/omarchy/nvim/lua/plugins/tim-disabled.lua b/omarchy/nvim/lua/plugins/tim-disabled.lua new file mode 100644 index 0000000..818be2c --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-disabled.lua @@ -0,0 +1,6 @@ +return { + { "nvim-mini/mini.surround", enabled = false }, + { "akinsho/bufferline.nvim", enabled = false }, + { "SmiteshP/nvim-navic", enabled = false }, + { "https://codeberg.org/andyg/leap.nvim", enabled = false }, +} diff --git a/omarchy/nvim/lua/plugins/tim-lsp.lua b/omarchy/nvim/lua/plugins/tim-lsp.lua new file mode 100644 index 0000000..acb092b --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-lsp.lua @@ -0,0 +1,38 @@ +return { + { + "neovim/nvim-lspconfig", + opts = { + inlay_hints = { enabled = false }, + servers = { + intelephense = { + settings = { + intelephense = { + stubs = { + "bcmath", + "bz2", + "calendar", + "Core", + "curl", + "zip", + "zlib", + "wordpress", + "woocommerce", + "acf-pro", + "wordpress-globals", + "wp-cli", + "genesis", + "polylang", + }, + environment = { + includePaths = "~/.composer/vendor/php-stubs/", + }, + files = { + maxSize = 5000000, + }, + }, + }, + }, + }, + }, + }, +} diff --git a/omarchy/nvim/lua/plugins/tim-mason.lua b/omarchy/nvim/lua/plugins/tim-mason.lua new file mode 100644 index 0000000..95305b7 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-mason.lua @@ -0,0 +1,31 @@ +return { + "mason-org/mason.nvim", + opts = { + ensure_installed = { + "bash-debug-adapter", + "bash-language-server", + "copilot-language-server", + "css-lsp", + "docker-compose-language-service", + "dockerfile-language-server", + "firefox-debug-adapter", + "go-debug-adapter", + "gofumpt", + "goimports", + "gopls", + "html-lsp", + "jq", + "js-debug-adapter", + "json-lsp", + "lua-language-server", + "markdownlint", + "marksman", + "mdx-analyzer", + "shfmt", + "stylua", + "svelte-language-server", + "typescript-language-server", + "yaml-language-server", + }, + }, +} diff --git a/omarchy/nvim/lua/plugins/tim-neo-tree.lua b/omarchy/nvim/lua/plugins/tim-neo-tree.lua new file mode 100644 index 0000000..ba6d856 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-neo-tree.lua @@ -0,0 +1,27 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + keys = { + { "e", "Neotree toggle reveal float" }, + }, + cmd = "Neotree", + opts = { + window = { + position = "left", + toggle = true, + mappings = { + ["l"] = "open", + ["h"] = "open", + [""] = "open_split", + [""] = "open_vsplit", + [""] = "close_window", + }, + }, + filesystem = { + filtered_items = { + hide_dotfiles = false, + hide_gitignored = false, + hide_by_name = { "node_modules" }, + }, + }, + }, +} diff --git a/omarchy/nvim/lua/plugins/tim-neogit.lua b/omarchy/nvim/lua/plugins/tim-neogit.lua new file mode 100644 index 0000000..8f45593 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-neogit.lua @@ -0,0 +1,8 @@ +return { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", + "sindrets/diffview.nvim", + }, + config = true, +} diff --git a/omarchy/nvim/lua/plugins/tim-neotab.lua b/omarchy/nvim/lua/plugins/tim-neotab.lua new file mode 100644 index 0000000..0367436 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-neotab.lua @@ -0,0 +1,5 @@ +return { + "kawre/neotab.nvim", + event = "InsertEnter", + opts = {}, +} diff --git a/omarchy/nvim/lua/plugins/tim-overrides.lua b/omarchy/nvim/lua/plugins/tim-overrides.lua new file mode 100644 index 0000000..b6dcf14 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-overrides.lua @@ -0,0 +1,58 @@ +return { + { + "nvim-lualine/lualine.nvim", + opts = { + options = { + icons_enabled = true, + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = {}, + always_divide_middle = true, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch" }, + lualine_c = { + { + "filename", + file_status = false, + path = 1, + }, + }, + lualine_x = { "diff", "diagnostics" }, + lualine_y = { "" }, + lualine_z = { "" }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { "location" }, + lualine_y = {}, + lualine_z = {}, + }, + tabline = {}, + extensions = {}, + }, + }, + { + "stevearc/conform.nvim", + opts = function(_, opts) + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters = opts.formatters or {} + + opts.formatters_by_ft.php = { "php-cs-fixer" } + opts.formatters["php-cs-fixer"] = { + command = "php-cs-fixer", + args = { + "fix", + "--rules=@PSR12", + "$FILENAME", + }, + stdin = false, + } + + return opts + end, + }, +} diff --git a/omarchy/nvim/lua/plugins/tim-snacks.lua b/omarchy/nvim/lua/plugins/tim-snacks.lua new file mode 100644 index 0000000..48948d5 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-snacks.lua @@ -0,0 +1,24 @@ +return { + "folke/snacks.nvim", + opts = { + picker = { + sources = { + files = { + hidden = true, + ignored = false, + }, + grep = { + hidden = true, + ignored = false, + }, + explorer = { + hidden = true, + ignored = false, + }, + }, + }, + scroll = { + enabled = false, + }, + }, +} diff --git a/omarchy/nvim/lua/plugins/tim-surround.lua b/omarchy/nvim/lua/plugins/tim-surround.lua new file mode 100644 index 0000000..e859c19 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-surround.lua @@ -0,0 +1,8 @@ +return { + "kylechui/nvim-surround", + version = "*", + event = "VeryLazy", + config = function() + require("nvim-surround").setup() + end, +} diff --git a/omarchy/nvim/lua/plugins/tim-tmux-navigation.lua b/omarchy/nvim/lua/plugins/tim-tmux-navigation.lua new file mode 100644 index 0000000..9f20fb1 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-tmux-navigation.lua @@ -0,0 +1,7 @@ +return { + "alexghergh/nvim-tmux-navigation", + event = "VeryLazy", + config = function() + require("nvim-tmux-navigation").setup({}) + end, +} diff --git a/omarchy/nvim/lua/plugins/tim-treesitter.lua b/omarchy/nvim/lua/plugins/tim-treesitter.lua new file mode 100644 index 0000000..dac71b3 --- /dev/null +++ b/omarchy/nvim/lua/plugins/tim-treesitter.lua @@ -0,0 +1,34 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "css", + "dockerfile", + "fish", + "go", + "html", + "http", + "hurl", + "javascript", + "jsdoc", + "json", + "lua", + "markdown", + "markdown_inline", + "php", + "python", + "query", + "regex", + "rust", + "scss", + "svelte", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, +} diff --git a/omarchy/nvim/setup.sh b/omarchy/nvim/setup.sh new file mode 100755 index 0000000..1a2c2fe --- /dev/null +++ b/omarchy/nvim/setup.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +SOURCE_DIR="$DOTFILES_DIR/omarchy/nvim" +TARGET_DIR="$HOME/.config/nvim" +HOOK_SOURCE="$DOTFILES_DIR/omarchy/hooks/post-update.d/ensure-nvim-symlinks" +HOOK_TARGET="$HOME/.config/omarchy/hooks/post-update.d/ensure-nvim-symlinks" + +if [[ ! -d "$TARGET_DIR" ]]; then + printf 'Neovim config not found at %s. Run omarchy-nvim-setup first.\n' "$TARGET_DIR" >&2 + exit 1 +fi + +link_file() { + local source=$1 + local target=$2 + + mkdir -p "$(dirname "$target")" + ln -sfn "$source" "$target" +} + +link_file "$SOURCE_DIR/lazyvim.json" "$TARGET_DIR/lazyvim.json" +link_file "$SOURCE_DIR/stylua.toml" "$TARGET_DIR/stylua.toml" +link_file "$SOURCE_DIR/.neoconf.json" "$TARGET_DIR/.neoconf.json" + +for file in "$SOURCE_DIR"/lua/config/*.lua; do + link_file "$file" "$TARGET_DIR/lua/config/$(basename "$file")" +done + +for file in "$SOURCE_DIR"/lua/plugins/*.lua; do + link_file "$file" "$TARGET_DIR/lua/plugins/$(basename "$file")" +done + +link_file "$SOURCE_DIR/snippets" "$TARGET_DIR/snippets" + +mkdir -p "$HOME/.config/omarchy/hooks/post-update.d" +link_file "$HOOK_SOURCE" "$HOOK_TARGET" + +printf 'Installed Omarchy Neovim overlay from %s\n' "$SOURCE_DIR" +printf 'Preserved Omarchy theme integration at %s/lua/plugins/theme.lua\n' "$TARGET_DIR" +printf 'Installed Omarchy post-update hook: %s -> %s\n' "$HOOK_TARGET" "$HOOK_SOURCE" diff --git a/omarchy/nvim/snippets/javascript.json b/omarchy/nvim/snippets/javascript.json new file mode 100644 index 0000000..123bd19 --- /dev/null +++ b/omarchy/nvim/snippets/javascript.json @@ -0,0 +1,36 @@ +{ + "Console log": { + "prefix": "cl", + "body": ["console.log( $1 );", ""], + "description": "console.log" + }, + "Console log w. comment": { + "prefix": "clc", + "body": ["console.log( '$1', $1 );", ""], + "description": "console.log with comment" + }, + "Multiple Svelte SSR requests": { + "prefix": "sssr", + "body": [ + "import { error } from '@sveltejs/kit';", + "import type { PageLoad } from './\\$types';", + "", + "export const load: PageLoad = async ({ fetch, params }) => {", + " const [${1:first response}, ${2:second response}] = await Promise.all([", + " fetch(`/api/v1/merchant/sessions/${params.id}`),", + " fetch('/api/v1/merchant/stores')", + " ]);", + "", + " if ($1.ok && $2.ok) {", + " return {", + " session: (await $1.json()) as OrderSearchResponse,", + " stores: (await $2.json()) as MerchantStore[]", + " };", + " }", + " throw error(404, '');", + "};", + "" + ], + "description": "Multiple Svelte SSR requests" + } +} diff --git a/omarchy/nvim/snippets/package.json b/omarchy/nvim/snippets/package.json new file mode 100644 index 0000000..b903c18 --- /dev/null +++ b/omarchy/nvim/snippets/package.json @@ -0,0 +1,24 @@ +{ + "name": "customsnippets", + "engines": { + "vscode": "^1.0.0" + }, + "contributes": { + "snippets": [ + { + "language": [ + "javascript", + "typescript", + "svelte" + ], + "path": "./javascript.json" + }, + { + "language": [ + "svelte" + ], + "path": "./svelte.json" + } + ] + } +} diff --git a/omarchy/nvim/snippets/svelte.json b/omarchy/nvim/snippets/svelte.json new file mode 100644 index 0000000..73ec25b --- /dev/null +++ b/omarchy/nvim/snippets/svelte.json @@ -0,0 +1,33 @@ +{ + "Svelte typescript component": { + "prefix": "stc", + "body": [ + "", + "", + "", + "" + ], + "description": "Simple svelte component" + }, + "Svelte SSR typescript component": { + "prefix": "sstc", + "body": [ + "", + "", + "", + "", + "" + ], + "description": "Svelte SSR typescript component" + } +} diff --git a/omarchy/nvim/stylua.toml b/omarchy/nvim/stylua.toml new file mode 100644 index 0000000..0f90030 --- /dev/null +++ b/omarchy/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 diff --git a/omarchy/setup.sh b/omarchy/setup.sh index d7e2ce5..9a17148 100755 --- a/omarchy/setup.sh +++ b/omarchy/setup.sh @@ -33,3 +33,9 @@ if [[ -x "$DOTFILES_DIR/omarchy/tmux/setup.sh" ]]; then else bash "$DOTFILES_DIR/omarchy/tmux/setup.sh" fi + +if [[ -x "$DOTFILES_DIR/omarchy/nvim/setup.sh" ]]; then + "$DOTFILES_DIR/omarchy/nvim/setup.sh" +else + bash "$DOTFILES_DIR/omarchy/nvim/setup.sh" +fi From d18bdde924be91a25080e8536375a5f522d5fa5b Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Wed, 10 Jun 2026 22:34:16 +0200 Subject: [PATCH 5/7] feat: setup automatic hyprsunset --- omarchy/README.md | 34 +++++++++++++++++++++++++++++++++- omarchy/hypr/hyprsunset.conf | 10 ++++++++++ omarchy/hypr/setup.sh | 36 ++++++++++++++++++++++++++++++++++++ omarchy/setup.sh | 6 ++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 omarchy/hypr/hyprsunset.conf create mode 100755 omarchy/hypr/setup.sh diff --git a/omarchy/README.md b/omarchy/README.md index 8a91ee2..3137c5e 100644 --- a/omarchy/README.md +++ b/omarchy/README.md @@ -26,7 +26,7 @@ Override repo path if needed: DOTFILES_DIR=/path/to/dotfiles ./omarchy/setup.sh ``` -The setup script installs the keyd config, Omarchy tmux overlay, and Omarchy Neovim overlay. +The setup script installs the keyd config, Hyprland nightlight schedule, Omarchy tmux overlay, and Omarchy Neovim overlay. ## Tmux @@ -106,6 +106,38 @@ That hook re-adds the symlinks after normal Omarchy updates. ## Hyprland +Nightlight is configured with `hyprsunset`: + +```text +omarchy/hypr/hyprsunset.conf -> ~/.config/hypr/hyprsunset.conf +``` + +The schedule warms the display from 20:00 until 06:00: + +```conf +profile { + time = 06:00 + identity = true +} + +profile { + time = 20:00 + temperature = 4000 +} +``` + +`omarchy/hypr/setup.sh` also ensures `~/.config/hypr/autostart.conf` starts `hyprsunset` on login: + +```conf +exec-once = uwsm-app -- hyprsunset +``` + +Manual toggle remains available with `Super + Ctrl + N` or: + +```bash +omarchy toggle nightlight +``` + Edit `~/.config/hypr/input.conf`: ```conf diff --git a/omarchy/hypr/hyprsunset.conf b/omarchy/hypr/hyprsunset.conf new file mode 100644 index 0000000..8b5606f --- /dev/null +++ b/omarchy/hypr/hyprsunset.conf @@ -0,0 +1,10 @@ +# Nightlight schedule: warm display from 20:00 until 06:00. +profile { + time = 06:00 + identity = true +} + +profile { + time = 20:00 + temperature = 4000 +} diff --git a/omarchy/hypr/setup.sh b/omarchy/hypr/setup.sh new file mode 100755 index 0000000..ba1685d --- /dev/null +++ b/omarchy/hypr/setup.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +HYPR_CONFIG_DIR="$HOME/.config/hypr" +HYPRSUNSET_SOURCE="$DOTFILES_DIR/omarchy/hypr/hyprsunset.conf" +HYPRSUNSET_TARGET="$HYPR_CONFIG_DIR/hyprsunset.conf" +AUTOSTART_TARGET="$HYPR_CONFIG_DIR/autostart.conf" +HYPRSUNSET_AUTOSTART='exec-once = uwsm-app -- hyprsunset' + +if ! command -v hyprsunset >/dev/null 2>&1; then + if command -v omarchy >/dev/null 2>&1; then + omarchy pkg add hyprsunset + elif command -v omarchy-pkg-add >/dev/null 2>&1; then + omarchy-pkg-add hyprsunset + else + sudo pacman -S --needed hyprsunset + fi +fi + +mkdir -p "$HYPR_CONFIG_DIR" +ln -sfn "$HYPRSUNSET_SOURCE" "$HYPRSUNSET_TARGET" +touch "$AUTOSTART_TARGET" + +if ! grep -qxF "$HYPRSUNSET_AUTOSTART" "$AUTOSTART_TARGET"; then + printf '\n# Nightlight schedule\n%s\n' "$HYPRSUNSET_AUTOSTART" >>"$AUTOSTART_TARGET" +fi + +if pgrep -x hyprsunset >/dev/null 2>&1; then + pkill -x hyprsunset +fi + +setsid uwsm-app -- hyprsunset >/dev/null 2>&1 & + +printf 'Installed hyprsunset config: %s -> %s\n' "$HYPRSUNSET_TARGET" "$HYPRSUNSET_SOURCE" +printf 'Ensured Hyprland autostart contains: %s\n' "$HYPRSUNSET_AUTOSTART" diff --git a/omarchy/setup.sh b/omarchy/setup.sh index 9a17148..2390c90 100755 --- a/omarchy/setup.sh +++ b/omarchy/setup.sh @@ -28,6 +28,12 @@ sudo keyd reload printf 'Installed keyd config: %s -> %s\n' "$KEYD_TARGET" "$KEYD_SOURCE" printf 'Ensure ~/.config/hypr/input.conf contains: kb_options =\n' +if [[ -x "$DOTFILES_DIR/omarchy/hypr/setup.sh" ]]; then + "$DOTFILES_DIR/omarchy/hypr/setup.sh" +else + bash "$DOTFILES_DIR/omarchy/hypr/setup.sh" +fi + if [[ -x "$DOTFILES_DIR/omarchy/tmux/setup.sh" ]]; then "$DOTFILES_DIR/omarchy/tmux/setup.sh" else From 0884246e5da7c6ec395560ca3a819afc933c1fe1 Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Thu, 11 Jun 2026 17:36:03 +0200 Subject: [PATCH 6/7] feat: use caps modifier to produce swedish characters --- omarchy/README.md | 40 ++++++++++++++++++++++++++++++++- omarchy/keyd/dell-internal.conf | 3 +++ omarchy/setup.sh | 6 +++++ omarchy/xkb/setup.sh | 25 +++++++++++++++++++++ omarchy/xkb/symbols/tim | 11 +++++++++ 5 files changed, 84 insertions(+), 1 deletion(-) create mode 100755 omarchy/xkb/setup.sh create mode 100644 omarchy/xkb/symbols/tim diff --git a/omarchy/README.md b/omarchy/README.md index 3137c5e..87c13c7 100644 --- a/omarchy/README.md +++ b/omarchy/README.md @@ -26,7 +26,7 @@ Override repo path if needed: DOTFILES_DIR=/path/to/dotfiles ./omarchy/setup.sh ``` -The setup script installs the keyd config, Hyprland nightlight schedule, Omarchy tmux overlay, and Omarchy Neovim overlay. +The setup script installs the keyd config, Hyprland nightlight schedule, custom keyboard layout, Omarchy tmux overlay, and Omarchy Neovim overlay. ## Tmux @@ -106,6 +106,44 @@ That hook re-adds the symlinks after normal Omarchy updates. ## Hyprland +Custom keyboard layout is configured through XKB and keyd: + +```text +omarchy/xkb/symbols/tim -> ~/.config/xkb/symbols/tim +``` + +The XKB layout keeps US keys and adds Swedish characters on the internal Right Alt level: + +```text +Right Alt + [ -> å +Right Alt + ; -> ö +Right Alt + ' -> ä +Shift + Right Alt + [ -> Å +Shift + Right Alt + ; -> Ö +Shift + Right Alt + ' -> Ä +``` + +Keyd maps the Caps hold layer to those Right Alt combinations, while preserving homerow navigation: + +```text +Tap Caps -> Escape +Hold Caps + h -> Left +Hold Caps + j -> Down +Hold Caps + k -> Up +Hold Caps + l -> Right +Hold Caps + [ -> å +Hold Caps + ; -> ö +Hold Caps + ' -> ä +``` + +`omarchy/xkb/setup.sh` also updates `~/.config/hypr/input.conf`: + +```conf +kb_layout = tim +``` + +The Caps layer lives in `omarchy/keyd/dell-internal.conf`. + Nightlight is configured with `hyprsunset`: ```text diff --git a/omarchy/keyd/dell-internal.conf b/omarchy/keyd/dell-internal.conf index be4860f..0e13dea 100644 --- a/omarchy/keyd/dell-internal.conf +++ b/omarchy/keyd/dell-internal.conf @@ -9,3 +9,6 @@ h = left j = down k = up l = right +leftbrace = G-leftbrace +semicolon = G-semicolon +apostrophe = G-apostrophe diff --git a/omarchy/setup.sh b/omarchy/setup.sh index 2390c90..9d892ed 100755 --- a/omarchy/setup.sh +++ b/omarchy/setup.sh @@ -34,6 +34,12 @@ else bash "$DOTFILES_DIR/omarchy/hypr/setup.sh" fi +if [[ -x "$DOTFILES_DIR/omarchy/xkb/setup.sh" ]]; then + "$DOTFILES_DIR/omarchy/xkb/setup.sh" +else + bash "$DOTFILES_DIR/omarchy/xkb/setup.sh" +fi + if [[ -x "$DOTFILES_DIR/omarchy/tmux/setup.sh" ]]; then "$DOTFILES_DIR/omarchy/tmux/setup.sh" else diff --git a/omarchy/xkb/setup.sh b/omarchy/xkb/setup.sh new file mode 100755 index 0000000..67eef80 --- /dev/null +++ b/omarchy/xkb/setup.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -euo pipefail + +DOTFILES_DIR="${DOTFILES_DIR:-$HOME/Code/dotfiles}" +XKB_SOURCE="$DOTFILES_DIR/omarchy/xkb/symbols/tim" +XKB_TARGET="$HOME/.config/xkb/symbols/tim" +HYPR_INPUT="$HOME/.config/hypr/input.conf" + +mkdir -p "$(dirname "$XKB_TARGET")" "$(dirname "$HYPR_INPUT")" +ln -sfn "$XKB_SOURCE" "$XKB_TARGET" + +if [[ ! -f "$HYPR_INPUT" ]]; then + cat >"$HYPR_INPUT" <<'EOF' +input { + kb_layout = tim +} +EOF +elif grep -qE '^\s*kb_layout\s*=' "$HYPR_INPUT"; then + perl -0pi -e 's/^\s*kb_layout\s*=.*$/ kb_layout = tim/m' "$HYPR_INPUT" +else + perl -0pi -e 's/input \{\n/input {\n kb_layout = tim\n/' "$HYPR_INPUT" +fi + +printf 'Installed XKB layout: %s -> %s\n' "$XKB_TARGET" "$XKB_SOURCE" +printf 'Configured Hyprland keyboard layout: kb_layout = tim\n' diff --git a/omarchy/xkb/symbols/tim b/omarchy/xkb/symbols/tim new file mode 100644 index 0000000..850d47c --- /dev/null +++ b/omarchy/xkb/symbols/tim @@ -0,0 +1,11 @@ +partial alphanumeric_keys +xkb_symbols "basic" { + include "us(basic)" + name[Group1] = "English (US, Tim Swedish Alt)"; + + key { [ bracketleft, braceleft, aring, Aring ] }; + key { [ semicolon, colon, odiaeresis, Odiaeresis ] }; + key { [ apostrophe, quotedbl, adiaeresis, Adiaeresis ] }; + + include "level3(ralt_switch)" +}; From 8f12c0b6407f495797660f49560a15a151ccdd84 Mon Sep 17 00:00:00 2001 From: Tim Jackleus Date: Sun, 21 Jun 2026 14:01:09 +0200 Subject: [PATCH 7/7] better keybindings --- omarchy/README.md | 9 +++++++++ omarchy/keyd/dell-internal.conf | 2 ++ omarchy/nvim/lazyvim.json | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/omarchy/README.md b/omarchy/README.md index 87c13c7..b0206eb 100644 --- a/omarchy/README.md +++ b/omarchy/README.md @@ -144,6 +144,15 @@ kb_layout = tim The Caps layer lives in `omarchy/keyd/dell-internal.conf`. +Keyd also maps `/` as a tap/hold key: + +```text +Tap / -> / +Hold / -> Right Ctrl +``` + +The physical Right Ctrl key is mapped to Super. + Nightlight is configured with `hyprsunset`: ```text diff --git a/omarchy/keyd/dell-internal.conf b/omarchy/keyd/dell-internal.conf index 0e13dea..d92438c 100644 --- a/omarchy/keyd/dell-internal.conf +++ b/omarchy/keyd/dell-internal.conf @@ -3,6 +3,8 @@ REPLACE_WITH_KEYD_MONITOR_ID [main] capslock = overload(capslock, esc) +slash = overload(control, slash) +rightcontrol = rightmeta [capslock:C] h = left diff --git a/omarchy/nvim/lazyvim.json b/omarchy/nvim/lazyvim.json index 11f1b53..f3bc959 100644 --- a/omarchy/nvim/lazyvim.json +++ b/omarchy/nvim/lazyvim.json @@ -3,6 +3,7 @@ "lazyvim.plugins.extras.ai.copilot-native", "lazyvim.plugins.extras.ai.sidekick", "lazyvim.plugins.extras.coding.yanky", + "lazyvim.plugins.extras.editor.dial", "lazyvim.plugins.extras.editor.harpoon2", "lazyvim.plugins.extras.editor.snacks_picker", "lazyvim.plugins.extras.editor.telescope", @@ -18,10 +19,11 @@ "lazyvim.plugins.extras.lang.typescript", "lazyvim.plugins.extras.lang.yaml", "lazyvim.plugins.extras.linting.eslint", + "lazyvim.plugins.extras.util.dot", "lazyvim.plugins.extras.util.mini-hipatterns" ], "news": { "NEWS.md": "11866" }, "version": 8 -} +} \ No newline at end of file