Skip to content
TerrydaktalPublic

About

Personal Linux/KDE Plasma Wayland dotfiles, desktop launchers, global shortcuts, shell configs, and bootstrap tooling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

config

Arch Linux / CachyOS KDE Plasma 6 (Wayland) workstation dotfiles, input and window-management automation, browser and clipboard helpers, native KWin plugins, local DKMS packaging, and bootstrap provisioning scripts.

Each major subsystem includes its own focused README.md with detailed configuration tables and troubleshooting notes; this root document provides the repository map, script reference, provisioning order, runtime pipelines, and operational caveats.


Project Structure

config/
├── APP-VERSION                                 # Repository version epoch (0.0) for script stamping
├── bootstrap.sh                                # Main workstation migration, symlink & system bootstrap script
├── applicationlauncher/                        # Preferences, pins & window size for custom applicationlauncher
│   ├── README.md
│   ├── pinned_apps.txt
│   ├── settings.txt
│   └── window_size.txt
├── applications/                               # User .desktop launchers & overrides (~/.local/share/applications/)
│   ├── README.md
│   ├── net.local.copyq.desktop
│   ├── net.local.dictation-rambler.desktop
│   ├── net.local.dictation-whisper.desktop
│   └── org.xfce.mousepad.desktop
├── autostart/                                  # Login autostart entries (~/.config/autostart/)
│   ├── README.md
│   ├── com.github.hluk.copyq.desktop
│   └── import-environment.desktop
├── bash/                                       # Interactive Bash configuration
│   ├── README.md
│   └── .bashrc
├── build-support/                              # Version-stamping & runtime --version verification tooling
│   ├── README.md
│   ├── app_version.py
│   ├── script_runtime.py
│   └── script_version.py
├── chrome/                                     # Google Chrome flags, fast launcher & window cycler
│   ├── README.md
│   ├── activate-or-launch-chrome.sh
│   ├── build-support/script_runtime.py
│   ├── chrome-flags.conf
│   └── google-chrome-fast
├── codex/                                      # Codex CLI preferences (~/.codex/config.toml; no auth/state)
│   ├── README.md
│   └── config.toml
├── CopyQ/                                      # CopyQ config, Wayland paste/persistence override, toggle & tests
│   ├── README.md
│   ├── build-support/script_runtime.py
│   ├── copyq-commands.ini
│   ├── copyq-toggle-window
│   ├── copyq-wayland-paste.sh
│   ├── copyq.conf
│   ├── copyq_script_override.js
│   ├── ensure-copyq-window-toggle
│   ├── test-tools/                             # Mock kdotool, wl-paste, ydotool & JSON behavior cases
│   ├── test_script_override.js
│   ├── test_wayland_image.sh
│   └── test_wayland_paste.sh
├── environment.d/                              # systemd user environment variables (NVIDIA VA-API)
│   ├── README.md
│   └── 90-nvidia-vaapi.conf
├── etc/                                        # Machine-wide /etc configs & /usr/local/bin monitor helper
│   ├── README.md
│   ├── NetworkManager/                         # Connectivity check, Wi-Fi powersave & iwd backend drop-ins
│   ├── conf.d/wireless-regdom
│   ├── iw-regdomain
│   ├── iwd/                                    # iwd periodic scan & powersave quirk config
│   ├── mkinitcpio.conf.d/20-wireless-regdb.conf
│   ├── modprobe.d/cfg80211-regdom.conf
│   ├── modules-load.d/uinput.conf
│   ├── ssh/                                    # Hardened key-only sshd drop-in (99-security.conf)
│   ├── systemd/system/nvidia-power-limit.service
│   ├── udev/                                   # Monitor hotplug helper & HDD/RAPL/xremap/KWin udev rules
│   └── ufw/                                    # Snapshotted UFW config and IPv4/IPv6 user rules
├── firefox/                                    # Firefox user.js, shared AutoConfig modules, autoscroll & tests
│   ├── README.md
│   ├── 99-firefox-autoconfig.js
│   ├── autoconfig/                             # british-dictionary.js, reverse-autoscroll.js
│   ├── autoscroll/                             # ReverseAutoScrollChild.sys.mjs, scroll-range.sys.mjs & test
│   ├── firefox-autoconfig.cfg
│   ├── firefox-new-window-fast
│   ├── install-autoconfig.sh
│   ├── test_autoconfig.mjs
│   └── user.js
├── fish/                                       # Primary Fish shell config, alias-aware sudo, theme, colors & font
│   ├── README.md
│   ├── config.fish
│   ├── fish_frozen_theme.fish
│   ├── fonts/hack-tight/HackTight-Regular.ttf
│   ├── ls_colours.dircolors
│   ├── print_extension_groups.sh
│   └── test_sudo.py
├── git/                                        # Global Git identity, default branch & gh credential helper
│   ├── README.md
│   └── gitconfig
├── kde/                                        # KDE Plasma 6 & KWin configs, shortcuts, MIME defaults & plugins
│   ├── README.md
│   ├── baloofilerc, kcminputrc, kdeglobals, kglobalshortcutsrc, kwinrc, kwinrulesrc
│   ├── kxkbrc, mimeapps.list, plasma-localerc, plasma-org.kde.plasma.desktop-appletsrc
│   ├── plasmashellrc, powerdevilrc, powermanagementprofilesrc
│   └── kwin/
│       ├── effects/desktop-depth-preview/      # Native C++20/Qt6 KWin depth-plane preview effect + tests
│       └── scripts/copyq-window-toggle/        # KWin JS script for F24 CopyQ toggle
├── keyd/                                       # Documentation-only note (replaced by xremap + wayland daemon)
│   └── README.md
├── kwin/                                       # Shared Plasma taskbar new-instance launcher helper
│   ├── README.md
│   └── launch-taskbar-app.sh
├── legacy/                                     # Archived X11 xbindkeys & older tmux configs (inactive)
│   ├── README.md
│   ├── tmux/
│   └── xbindkeys/
├── mousepad/                                   # Exported dconf preferences for Xfce Mousepad
│   ├── README.md
│   └── preferences.dconf
├── nano/                                       # Keybinding overrides (~/.nanorc)
│   ├── README.md
│   └── .nanorc
├── packages/                                   # Local Arch/CachyOS PKGBUILD definitions
│   ├── README.md
│   └── asrock-nct6683-dkms-git/                # ASRock NCT6683 sensor/fan DKMS package, hook & verifier
├── pcmanfm/                                    # PCManFM & LibFM file-manager preferences
│   ├── README.md
│   ├── libfm.conf
│   └── pcmanfm.conf
├── ssh/                                        # SSH client aliases, authorized public keys & managed known_hosts
│   ├── README.md
│   ├── authorized_keys
│   ├── config
│   └── known_hosts-managed
├── systemd/                                    # User-session systemd units & PowerDevil lock-recovery helper
│   ├── README.md
│   └── user/
│       ├── build-support/script_runtime.py
│       ├── copyq-show-window.service
│       ├── copyq-window-toggle-loader.service
│       ├── kde-refresh-powerdevil-after-lock
│       ├── kde-refresh-powerdevil-after-lock.service
│       ├── krfb-tunnel.service
│       ├── wayland-scroll-daemon.service
│       └── xremap-meta-keyboard.service
├── tmux/                                       # Prefix-free config for patched native tmux + Fish wrapper
│   ├── README.md
│   ├── integration.conf
│   ├── link.sh
│   ├── tmux.conf
│   └── tmux.fish
├── wayland/                                    # Unified evdev Wayland mouse/scroll daemon & KWin window helpers
│   ├── README.md
│   ├── meta-wheel-close-wayland
│   ├── meta-wheel-minimize-wayland
│   ├── meta-wheel-restore-wayland
│   └── wayland_scroll_daemon.py
├── xfce4-terminal/                             # Preferences & accelerators for locally patched Xfce Terminal
│   ├── README.md
│   ├── accels.scm
│   ├── terminalrc
│   └── xfce4-terminal.xml
└── xremap/                                     # Keyboard normalization, device-scoped shortcuts & tests
    ├── README.md
    ├── meta-keyboard.yml
    ├── test_meta_keyboard.py
    └── xremap-launch-scoped

Top-Level Directories Overview

Directory / File Scope Handled by bootstrap.sh? Sub-Documentation
bootstrap.sh End-to-end user & system provisioning script Entry point —
APP-VERSION, build-support/ Deterministic 0.<gen>.<commits>-<build> version stamping for standalone scripts Manual build-support/README.md
applicationlauncher/ UI settings, pins, and window size for external applicationlauncher Symlinked applicationlauncher/README.md
applications/ .desktop entries for CopyQ toggle, Rambler/Whisper dictation, and Mousepad X11 override Mousepad only applications/README.md
autostart/ CopyQ login autostart and KDE D-Bus/systemd session env import Symlinked autostart/README.md
bash/ Interactive .bashrc with trash alias, history, and PATH setup Manual bash/README.md
chrome/ Chrome Wayland/XWayland flags, fast launcher, and Meta+5 window cycler Flags & google-chrome-fast symlinked chrome/README.md
codex/ Codex CLI config.toml preferences (no credentials/history) Symlinked (0600) codex/README.md
CopyQ/ CopyQ preferences, Wayland clipboard persistence/paste script, KWin toggle helpers & tests Loader unit & autostart only; prefs/script manual CopyQ/README.md
environment.d/ LIBVA_DRIVER_NAME=nvidia user session environment file Symlinked environment.d/README.md
etc/ System configs (/etc/*) and /usr/local/bin/kwin-monitor-change-reinit Mixed: SSH & regdom installed; others snapshot-only or manual etc/README.md
firefox/ user.js, shared AutoConfig (british-dictionary, reverse-autoscroll), fast new-window helper & tests Profile user.js, dictionary dir & AutoConfig installed firefox/README.md
fish/ Primary Fish shell config, alias-aware sudo, Ctrl+Up friz/unearth picker, colors, theme & HackTight font Manual fish/README.md
git/ Global ~/.gitconfig (default main, gh auth git-credential) Symlinked git/README.md
kde/ 13 KDE Plasma 6 / KWin config files + native Desktop Depth Preview effect & CopyQ KWin script 13 top-level RC files symlinked; plugins manual kde/README.md
keyd/ Empty archive stub noting migration to xremap + wayland No keyd/README.md
kwin/ Shared Plasma taskbar slot launcher (launch-taskbar-app.sh) Invoked directly by xremap kwin/README.md
legacy/ Inactive archived tmux and X11 xbindkeys configurations No legacy/README.md
mousepad/ Exported Mousepad dconf preferences Imported via dconf load mousepad/README.md
nano/ ~/.nanorc key overrides (Ctrl+S/O/Z/U/W/H) Manual nano/README.md
packages/ Local Arch/CachyOS asrock-nct6683-dkms-git PKGBUILD & DKMS verifier Built, installed & verified if missing/outdated packages/README.md
pcmanfm/ PCManFM and LibFM preferences Symlinked pcmanfm/README.md
ssh/ Client config, authorized_keys, and known_hosts-managed Linked & role-configured ssh/README.md
systemd/ 6 user-session .service units + kde-refresh-powerdevil-after-lock Symlinked, reloaded & enabled systemd/README.md
tmux/ Prefix-free patched tmux.conf, integration hooks, tmux.fish wrapper & link.sh Invokes tmux/link.sh tmux/README.md
wayland/ Unified evdev mouse/scroll daemon & KWin minimize/restore/close scripts Service unit linked & enabled wayland/README.md
xfce4-terminal/ accels.scm, terminalrc, and Xfconf XML for patched Xfce Terminal Manual xfce4-terminal/README.md
xremap/ Split-keyboard/mouse normalizer YAML, transient-service launcher wrapper & tests Service unit linked & enabled xremap/README.md

Scripts, Modules & Components

Core Provisioning

bootstrap.sh

Restores user dotfiles, links systemd user services, snapshots selected /etc files, and applies privileged system configuration via pkexec.

  • Options:
    • --role managed-target (default): Links ~/.ssh/config and ~/.ssh/authorized_keys, installs the key-only sshd policy, and leaves any existing outgoing SSH client identity untouched.
    • --role peer-workstation: Performs everything above, validates any existing ~/.ssh/id_ed25519(.pub), or generates a new local Ed25519 key pair (printing its fingerprint and public key for enrollment) if both standard paths are absent.
    • -h, --help: Prints man-style usage documentation.
  • Inputs: Repository files under ~/Dev/config, ~/.config/mozilla/firefox/profiles.ini (for locating the default Firefox profile), and live files under /etc during the snapshot phase.
  • Outputs / Side Effects:
    • Stops/disables obsolete xremap-keyboard.service and xremap-wheel.service and removes legacy xremap/taskbar files.
    • Migrates and symlinks KDE, PCManFM/LibFM, Application Launcher, Git, Codex, Autostart, environment.d, Mousepad desktop override, Chrome flags/wrapper, systemd user units, PowerDevil helper, SSH user configs, and Firefox user.js.
    • Runs tmux/link.sh and dconf load /org/xfce/mousepad/preferences/ < mousepad/preferences.dconf.
    • Copies active /etc files (NetworkManager 20-connectivity.conf, udev rules, /usr/local/bin/kwin-monitor-change-reinit, nvidia-power-limit.service, and UFW files) into the repository.
    • Reloads systemd --user and enables wayland-scroll-daemon.service, xremap-meta-keyboard.service, copyq-window-toggle-loader.service, kde-refresh-powerdevil-after-lock.service, krfb-tunnel.service, and ydotool.service (when available).
    • Elevates once via pkexec to install /etc/ssh/sshd_config.d/99-security.conf and wireless regulatory files (iw-regdomain, cfg80211-regdom.conf, 20-wireless-regdb.conf), install wireless-regdb and hunspell-en_gb, run firefox/install-autoconfig.sh, create /usr/local/share/firefox-dictionaries, build/install asrock-nct6683-dkms-git if needed, run /usr/lib/asrock-nct6683/verify-dkms, run mkinitcpio -P, and enable systemd-timesyncd.service, nvidia-power-limit.service, ufw.service, and sshd.service (plus systemctl reload sshd.service).

Input Normalization & Wayland Window Management

xremap/xremap-launch-scoped & xremap/meta-keyboard.yml

  • meta-keyboard.yml: Combines two Corsair keyboard interfaces and the mouse's keyboard interface into a single xremap normalized keyboard device while preserving source-device matching (exact_match: true).
    • Direct launches: Keyboard Meta/Ctrl/Ctrl+Meta+Grave -> ~/.local/bin/applicationlauncher; mouse-originated Meta/Ctrl/Ctrl+Meta+Grave -> KWin ToggleDesktopDepthPreview over D-Bus; Meta+5 -> chrome/activate-or-launch-chrome.sh; Ctrl+1-9 and Ctrl+Meta+1-3,5-9 -> kwin/launch-taskbar-app.sh N; Ctrl+Meta+4 -> firefox/firefox-new-window-fast.
    • Suppressed: Ctrl+W (C-w: null).
    • Key translations: KEY_KPENTER -> KEY_MUTE; Ctrl+Shift+Up / Ctrl+Meta+Shift+Up -> F24 (triggers KWin CopyQ toggle).
  • xremap-launch-scoped COMMAND [ARG...]: Starts launched GUI commands inside a detached transient systemd --user unit (systemd-run --user --quiet --collect --no-block --property=ExitType=cgroup) so restarting xremap-meta-keyboard.service does not kill launched applications. Falls back to exec "$@" if the user manager is unavailable; exits 64 when invoked with no arguments.
  • xremap/test_meta_keyboard.py: Offline regression test verifying device scope, rule precedence, exact shortcut combinations, and executable launch targets without opening input devices.

wayland/wayland_scroll_daemon.py & Action Helpers

  • wayland_scroll_daemon.py: Python evdev background daemon (wayland-scroll-daemon.service, requiring xremap-meta-keyboard.service). Tracks modifiers from xremap normalized keyboard plus physical devices, dynamically grabs the gaming mouse (/dev/input/by-id/usb-04d9_USB_Gaming_Mouse-event-mouse) only when Meta or Shift is held with no mouse button pressed, and dispatches:
    • Meta + Wheel Down/Up -> meta-wheel-minimize-wayland / meta-wheel-restore-wayland
    • Ctrl + Meta + Middle Click -> meta-wheel-close-wayland
    • Shift + Wheel -> KWin Desktop Zoom via D-Bus
    • Mouse Back/Forward in xfce4-terminal -> virtual Alt+Left / Alt+Right (bound in Fish to prevd/nextd)
    • Outputs: Publishes held modifier state to $XDG_RUNTIME_DIR/wayland_modifier_state.env (consumed by CopyQ/copyq-wayland-paste.sh).
  • wayland/meta-wheel-minimize-wayland, wayland/meta-wheel-restore-wayland, wayland/meta-wheel-close-wayland: Use kdotool to minimize/restore/close the captured KWin window ID (falling back to cursor window lookup if invoked directly). Minimize/restore maintain a locked, deduplicated stack at $XDG_RUNTIME_DIR/meta-wheel-min-stack.

kwin/launch-taskbar-app.sh

  • Inputs: Required one-based taskbar slot N (typically 1–9); reads the first launchers= line from ~/.config/plasma-org.kde.plasma.desktop-appletsrc.
  • Outputs / Behavior: Resolves applications:*, preferred://browser, and preferred://filemanager to .desktop files, prefers [Desktop Action new-window] over [Desktop Entry] Exec=, strips desktop field codes, launches detached, and logs to $XDG_RUNTIME_DIR/launch-taskbar-app.log (or /tmp/launch-taskbar-app.log).

Clipboard (CopyQ) & KWin Plugins

CopyQ/ Scripts & Tests

  • CopyQ/copyq-wayland-paste.sh: Standalone Wayland paste helper supporting --version/-V (when stamped). Uses flock ($XDG_RUNTIME_DIR/copyq-ydotool-paste.lock), releases stuck modifiers, ensures ydotool.service/ydotoold.service is reachable, polls kdotool until a non-CopyQ, non-Plasma window has focus, optionally verifies image clipboard payload SHA-256 via wl-paste when COPYQ_PASTE_MIME and COPYQ_PASTE_SHA256 are supplied, and sends a single Ctrl+V. Exits 4 if ydotoold is unreachable, 6 if target focus is not confirmed, or 7 if image verification fails.
  • CopyQ/copyq_script_override.js: Source for the JavaScript clipboard-persistence and global.paste() override embedded inside CopyQ/copyq-commands.ini (skips transient dictation MIME application/x-assistant-dictation-transient).
  • CopyQ/copyq-toggle-window: Shows, focuses, or minimizes CopyQ directly via kdotool (or starts copyq --start-server show), referenced by applications/net.local.copyq.desktop.
  • CopyQ/ensure-copyq-window-toggle: Waits for KWin D-Bus readiness and loads/starts the installed copyq-window-toggle KWin script; run by systemd/user/copyq-window-toggle-loader.service.
  • CopyQ/test_wayland_paste.sh, CopyQ/test_wayland_image.sh, CopyQ/test_script_override.js: Offline regression tests using mock tools under CopyQ/test-tools/ without sending real input events.

kde/kwin/effects/desktop-depth-preview/

  • Native C++20/Qt6 KWin Effect: Snapshots overlapping windows into depth planes and lets you browse/select them (Meta+Z or mouse DPI combination) without mutating stacking order during preview.
  • build.sh: Reads the installed kwin_wayland --version, configures and builds with CMake + Ninja into ${XDG_CACHE_HOME:-$HOME/.cache}/desktop-depth-preview/kwin-<version>, runs ctest --output-on-failure, and prints the compiled desktop-depth-preview.so path (does not install or reload KWin).

kde/kwin/scripts/copyq-window-toggle/

  • KWin JavaScript plugin (metadata.json + contents/code/main.js) registering copyq-window-toggle (F24) to toggle the CopyQ window or start copyq-show-window.service when no CopyQ window exists.

Browsers (chrome/ & firefox/)

chrome/

  • google-chrome-fast: Wrapper for /usr/bin/google-chrome-stable supporting --version/-V (when stamped). With no arguments, opens --new-window https://www.google.com/; explicit arguments pass straight through.
  • activate-or-launch-chrome.sh: Uses kdotool and process inspection to cycle main-profile Chrome windows (excluding child processes and custom --user-data-dir instances), or launches ~/.local/bin/google-chrome-fast when none exist.
  • chrome-flags.conf: Explicit startup flags (--ozone-platform=x11, MiddleClickAutoscroll, --disable-features=Vulkan, GPU rasterization/zero-copy/ignore-blocklist).

firefox/

  • install-autoconfig.sh [FIREFOX_DIR]: Atomically installs firefox-autoconfig.cfg, defaults/pref/99-firefox-autoconfig.js, autoconfig/{british-dictionary.js,reverse-autoscroll.js}, and autoscroll/{ReverseAutoScrollChild.sys.mjs,scroll-range.sys.mjs} into FIREFOX_DIR (defaults to /usr/lib/firefox). Preserves an existing applicationlauncher-audio-bridge.js integration and backs up legacy dictionary-only configs.
  • firefox-new-window-fast: Opens https://www.google.com/ in a new window via the running profile's org.mozilla.firefox.* D-Bus remote endpoint, falling back to /usr/lib/firefox/firefox --new-window https://www.google.com/.
  • user.js: Profile startup preferences (session restore, British spellcheck en-GB-large, middle-click autoscroll, hardware video decode, content isolation).
  • test_autoconfig.mjs & autoscroll/test_scroll_range.mjs: Node.js unit tests verifying AutoConfig loader/modules and reversed scroll-range math without launching Firefox.

Shells, Terminal & Multiplexer (fish/, bash/, tmux/, xfce4-terminal/)

  • tmux/link.sh: Validates and symlinks ~/.tmux.conf, ${XDG_CONFIG_HOME:-$HOME/.config}/tmux-simple/tmux.conf (compatibility alias), and ${XDG_CONFIG_HOME:-$HOME/.config}/fish/functions/tmux.fish. Refuses to overwrite foreign files or unrecognized symlinks.
  • tmux/tmux.fish: Fish wrapper that routes ordinary tmux invocations to a private mode-0700 socket at $XDG_RUNTIME_DIR/tmux-simple-<uid>/server.sock (falling back to /tmp) unless -S, -L, or $TMUX is already set.
  • fish/config.fish: Primary interactive Fish configuration featuring PATH deduplication, LS_COLORS/EZA_COLORS caching, zoxide auto-reporting, friz+unearth interactive cd/nano/Ctrl+Up pickers, xfce4-terminal hyperlink click handling (0x1f), alias-aware sudo (redirecting elevated rm to ~/.local/bin/trash and rewriting unearth --index-if-watched to --live), and command-duration prompt hooks.
  • fish/print_extension_groups.sh: Reads LS_COLOURS_FILE (or the default ls_colours.dircolors) and prints colorized extension/type swatches to stdout without modifying files.
  • fish/test_sudo.py: Python unittest suite exercising the alias-aware sudo resolver in isolated fixtures without executing real privileged commands.

System Recovery, Versioning & Local Packaging

  • systemd/user/kde-refresh-powerdevil-after-lock: Watches KDE ScreenSaver lock/unlock D-Bus signals, caches validated screen brightness in $XDG_RUNTIME_DIR/kde-refresh-powerdevil-after-lock.brightness, restarts plasma-powerdevil.service on unlock (10-second cooldown), and restores brightness. Supports --version/-V when stamped.
  • etc/udev/kwin-monitor-change-reinit: Triggered by etc/udev/rules.d/99-kwin-reinit-on-hotplug.rules on DRM hotplug events; fingerprints connected outputs via kscreen-doctor --outputs, caches them in ~/.cache/kwin-monitor-reinit/connected-displays, and calls qdbus6 org.kde.KWin /Compositor org.kde.kwin.Compositing.reinitialize only when the connected display identity changes.
  • build-support/app_version.py, script_version.py, script_runtime.py: Computes 0.<history-generation>.<commit-count>-<build> from APP-VERSION, full Git history, and .app-version/state.json; stamps adjacent *.program-metadata.json files (ignored by Git) verified at runtime by script_runtime.py on --version/-V for chrome/google-chrome-fast, CopyQ/copyq-wayland-paste.sh, and systemd/user/kde-refresh-powerdevil-after-lock.
  • packages/asrock-nct6683-dkms-git/: Local Arch/CachyOS PKGBUILD building upstream branchmispredictor/asrock-nct6683 with DKMS sources, asrock-nct6683.modules-load, asrock-nct6683.modprobe (nct6687 alias), pacman post-transaction hook (75-asrock-nct6683-dkms.hook), and verify-dkms checker.

Pipeline & Execution Order

1. Workstation Provisioning Order

  1. Clone to the expected checkout path (bootstrap.sh, service units, and xremap/meta-keyboard.yml expect ~/Dev/config):
    git clone <repo-url> ~/Dev/config
    cd ~/Dev/config
  2. Review hardware- and machine-specific files before provisioning (see Notes & Caveats):
    • xremap/meta-keyboard.yml and systemd/user/xremap-meta-keyboard.service (/dev/input/by-id/ device paths)
    • wayland/wayland_scroll_daemon.py (gaming mouse /dev/input/by-id/ path)
    • etc/iw-regdomain & etc/modprobe.d/cfg80211-regdom.conf (wireless regulatory domain GB)
    • ssh/config and ssh/authorized_keys (target hosts and permitted management public keys)
    • etc/systemd/system/nvidia-power-limit.service (123 W GPU power limit)
  3. Run the main bootstrap script (choose the SSH role explicitly):
    ./bootstrap.sh --role managed-target
    # Or, to also generate/validate a machine-local ~/.ssh/id_ed25519 client identity:
    ./bootstrap.sh --role peer-workstation
    bootstrap.sh executes six ordered stages:
    1. Disables/removes legacy xremap and taskbar user units/configs.
    2. Migrates/symlinks user dotfiles, imports Mousepad dconf preferences, runs tmux/link.sh, configures SSH user files/role, and links Firefox user.js.
    3. Snapshots live /etc NetworkManager connectivity, udev rules, KWin hotplug helper, NVIDIA power-limit unit, and UFW rules into the repo (copy-only).
    4. Reloads systemctl --user daemon-reload.
    5. Enables the six tracked/dependent systemd user services (wayland-scroll-daemon, xremap-meta-keyboard, copyq-window-toggle-loader, kde-refresh-powerdevil-after-lock, krfb-tunnel, ydotool).
    6. Authenticates via pkexec to deploy sshd policy & wireless regdom, install wireless-regdb & hunspell-en_gb, run firefox/install-autoconfig.sh, populate /usr/local/share/firefox-dictionaries, build/install/verify asrock-nct6683-dkms-git, rebuild initramfs (mkinitcpio -P), and enable system services (systemd-timesyncd, nvidia-power-limit, ufw, sshd).
  4. Complete manual / separately managed component setups not performed by bootstrap.sh:
    • Shells & editors: Symlink fish/config.fish and fish/ls_colours.dircolors into ~/.config/fish/, bash/.bashrc to ~/.bashrc, nano/.nanorc to ~/.nanorc, and xfce4-terminal/* into ~/.config/xfce4/ (see each folder's README.md).
    • CopyQ: Close CopyQ, symlink CopyQ/copyq.conf and CopyQ/copyq-commands.ini into ~/.config/copyq/, install the kde/kwin/scripts/copyq-window-toggle/ KWin script, and install applications/net.local.copyq.desktop (plus dictation .desktop entries if used) into ~/.local/share/applications/.
    • Native KWin Depth Preview effect: Build with bash kde/kwin/effects/desktop-depth-preview/build.sh and install the resulting .so matching the running KWin ABI.
    • Optional /etc drop-ins: Deliberately deploy etc/modules-load.d/uinput.conf, etc/udev/rules.d/*, etc/udev/kwin-monitor-change-reinit, etc/iwd/main.conf, etc/NetworkManager/conf.d/*, etc/systemd/system/nvidia-power-limit.service, and etc/ufw/* as appropriate for the target machine.
  5. Stamp versioned standalone scripts (required for --version / -V on fresh checkouts or after editing those scripts):
    for entry in chrome/google-chrome-fast CopyQ/copyq-wayland-paste.sh \
        systemd/user/kde-refresh-powerdevil-after-lock; do
        python3 -B build-support/script_version.py --root . --entry "$entry" || exit
        "$entry" --version || exit
    done
  6. Start or recover the user input service chain (startup order matters: xremap must create the virtual keyboard before wayland_scroll_daemon.py binds):
    systemctl --user restart xremap-meta-keyboard.service wayland-scroll-daemon.service ydotool.service

2. Runtime Input & Shortcut Pipeline

Physical Corsair keyboard interfaces + Mouse keyboard interface
                          │
                          ▼
         xremap-meta-keyboard.service (meta-keyboard.yml)
         ├── Launch actions ─► xremap-launch-scoped ─► transient systemd --user unit
         │                     ├── applicationlauncher / chrome / firefox-new-window-fast
         │                     ├── kwin/launch-taskbar-app.sh N
         │                     └── D-Bus: KWin ToggleDesktopDepthPreview (mouse-only)
         ├── Suppressed     ─► Ctrl+W dropped
         └── Normalized key ─► "xremap normalized keyboard" (incl. F24, KEY_MUTE)
                                      │
          ┌───────────────────────────┴───────────────────────────┐
          ▼                                                       ▼
  KWin / KDE / Apps                               wayland-scroll-daemon.service
  ├── F24 ─► copyq-window-toggle KWin script      ├── Modifiers ─► wayland_modifier_state.env
  │          └─► CopyQ paste override             ├── Meta+Wheel ─► minimize/restore helpers
  │              └─► copyq-wayland-paste.sh       ├── Ctrl+Meta+Mid ─► close helper
  │                  (kdotool + wl-paste + ydotool)├── Shift+Wheel ─► KWin Zoom (D-Bus)
  └── KEY_MUTE ─► Audio Volume Mute               └── Mouse Back/Fwd (xfce4-terminal only)
                                                      └─► Alt+Left/Right ─► Fish prevd/nextd

3. Verification & Test Commands

Run from the repository root (~/Dev/config):

# CopyQ Wayland paste, image readiness & script override tests (mocked; no real input sent)
bash CopyQ/test_wayland_paste.sh
bash CopyQ/test_wayland_image.sh
node CopyQ/test_script_override.js

# Firefox AutoConfig & reversed scroll-range tests (offline)
node --test firefox/test_autoconfig.mjs firefox/autoscroll/test_scroll_range.mjs

# Fish alias-aware sudo wrapper tests (isolated fixtures; no privileged execution)
python3 -B -m unittest discover -s fish -p test_sudo.py -v

# xremap shortcut & device-scope regression tests (uses system PyYAML)
python3 xremap/test_meta_keyboard.py

# KWin Desktop Depth Preview build & CTest suite
bash kde/kwin/effects/desktop-depth-preview/build.sh

# ASRock NCT6683 DKMS verification (requires root)
sudo /usr/lib/asrock-nct6683/verify-dkms

Prerequisites & Dependencies

  • Platform: Arch Linux / CachyOS with KDE Plasma 6 on Wayland, systemd (system + user managers), pacman, mkinitcpio, and pkexec (Polkit) for bootstrap.sh.
  • Core system & runtime tools:
    • Input & Wayland automation: xremap, ydotool (ydotool.service), kdotool (PATH or ~/.cargo/bin/kdotool), wl-clipboard (wl-paste/wl-copy), python3 with evdev and PyYAML, /dev/uinput kernel module and input group permissions.
    • Desktop & system utilities: qdbus6, kscreen-doctor, dconf, flock, openssh, ufw, wireless-regdb, hunspell-en_gb, gh (GitHub CLI for Git HTTPS credentials).
    • Shell & CLI ecosystem (used by fish/config.fish): fish, zoxide, unearth, friz, twig, xdg-open, plus local helpers at ~/.local/bin/trash, ~/.local/bin/copy, and ~/.local/bin/tree.
    • Test & build tooling: node (Node.js), jq, rg, base64, cmake, ninja, C++20 compiler, Qt 6.10+, ECM/KF6 6.26+, KWin dev libraries (for desktop-depth-preview), and base-devel, dkms, linux-cachyos-headers (for asrock-nct6683-dkms-git).
  • Separately built local applications (configured here, but built/installed from external repositories):
    • Custom CopyQ build (~/repos/CopyQ/build/copyq / ~/.local/bin/copyq) passing activation payload context to global.paste().
    • Locally patched xfce4-terminal (hyperlinks, pixel resize hints, Codex clipboard fallback, Ctrl+Backspace).
    • Patched native tmux backend and its ~/.local/libexec/tmux/ + ~/.local/bin/tmux-mosh helpers.
    • Custom applicationlauncher (~/.local/bin/applicationlauncher) and optional Firefox audio bridge.
    • Custom krfb build (~/repos/krfb/install/bin/krfb) and dictation toggle scripts (~/Dev/dictation/{rambler,whisper}/toggle.sh).

Notes & Caveats

  • Hardcoded repository path: bootstrap.sh sets REPO_DIR="$HOME/Dev/config", and multiple systemd user units and xremap/meta-keyboard.yml reference scripts under ~/Dev/config. Cloning elsewhere requires updating those paths.
  • Migration helper writes back to the repository: migrate_and_link() in bootstrap.sh copies a differing regular live file into the repository before moving the original to *.bak and creating the symlink. Inspect existing files and run git status / git diff after running bootstrap.sh so unintended live state is not committed.
  • Asymmetric /etc handling: bootstrap.sh restores etc/ssh/sshd_config.d/99-security.conf and wireless regulatory files to /etc, but only snapshots (copies live -> repo) NetworkManager/conf.d/20-connectivity.conf, udev/rules.d/*, kwin-monitor-change-reinit, nvidia-power-limit.service, and ufw/*. Other files under etc/ (iwd/main.conf, NetworkManager/conf.d/{30,40}-*, modules-load.d/uinput.conf, conf.d/wireless-regdom) are tracked for manual deployment only.
  • Hardware-specific settings: Device /dev/input/by-id/ paths target a specific Corsair keyboard and Holtek USB gaming mouse; packages/asrock-nct6683-dkms-git targets ASRock NCT6683-family Super I/O sensors; nvidia-power-limit.service sets a 123 W GPU cap; etc/iw-regdomain selects GB; kde/ files store workstation-specific monitor geometry and panel layouts; etc/udev/kwin-monitor-change-reinit assumes UID 1000. Review these before deploying to another machine.
  • Security & secrets: No private SSH keys, Codex auth/history, keyring data, or real PASSGEN_PEPPER values are tracked in this repository. Note that bootstrap.sh installs ssh/authorized_keys (granting incoming key-only access to the keys listed there), etc/ssh/sshd_config.d/99-security.conf sets PermitRootLogin prohibit-password, and fish/config.fish aliases codex to codex --dangerously-bypass-approvals-and-sandbox (deliberately overriding the stricter defaults in codex/config.toml).
  • Live Plasma / Xfconf / CopyQ rewrites: Running GUI apps overwrite their config files. Close CopyQ, PCManFM, or Plasma sessions as appropriate before replacing symlinked configs, and avoid restarting xremap-meta-keyboard.service during active work if any GUI app was launched via the direct fallback inside its cgroup.

About

Personal Linux/KDE Plasma Wayland dotfiles, desktop launchers, global shortcuts, shell configs, and bootstrap tooling

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages