foxygit / dotfiles Log in
commit e07b81c03f5d80efdde353a036661e179fb9ba09
Author:     MrJensK <jens.se@icloud.com>
AuthorDate: Sun Aug 9 16:15:46 2026 +0200
Commit:     MrJensK <jens.se@icloud.com>
CommitDate: Sun Aug 9 16:15:46 2026 +0200

    Updated
---
 README.md | 234 +++++++++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 157 insertions(+), 77 deletions(-)

diff --git a/README.md b/README.md
index 21849f1..ef58cf4 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,16 @@
 <div align="center">

 ```
-      _/      _/  _/_/_/        _/_/_/_/    _/_/    _/      _/                      _/_/_/      _/_/    _/_/_/_/_/
-     _/_/  _/_/  _/    _/      _/        _/    _/    _/  _/                        _/    _/  _/    _/      _/
-    _/  _/  _/  _/_/_/        _/_/_/    _/    _/      _/          _/_/_/_/_/      _/    _/  _/    _/      _/
-   _/      _/  _/    _/      _/        _/    _/    _/  _/                        _/    _/  _/    _/      _/
-  _/      _/  _/    _/      _/          _/_/    _/      _/                      _/_/_/      _/_/        _/
+######   #####  ####### ####### ####### ###     #######  #####
+####### ####### ####### ####### ####### ###     ####### #######
+### ### ### ###   ###   ###       ###   ###     ###     ###
+### ### ### ###   ###   #######   ###   ###     #######  #####
+### ### ### ###   ###   ###       ###   ###     ###         ###
+####### #######   ###   ###     ####### ####### ####### #######
+######   #####    ###   ###     ####### ####### #######  #####
 ```

-### Mina personliga dotfiles för en minimal, tilingbaserad X11-miljö
+### My personal dotfiles for a minimal, tiling X11 desktop

 ![Platform](https://img.shields.io/badge/platform-Linux%20%2F%20Debian-informational?style=flat-square)
 ![Shell](https://img.shields.io/badge/shell-Bash-4EAA25?style=flat-square&logo=gnubash&logoColor=white)
@@ -20,117 +22,195 @@

 ---

-## Innehåll
+## Contents

-- [Om](#om)
-- [Funktioner](#funktioner)
+- [About](#about)
+- [Features](#features)
 - [Installation](#installation)
-- [Struktur](#struktur)
-- [Tangentbordsgenvägar (sxwm)](#tangentbordsgenvägar-sxwm)
-- [Statusbar-moduler (sxbar)](#statusbar-moduler-sxbar)
-- [Skärmbakgrund](#skärmbakgrund)
+- [Structure](#structure)
+- [sxwm patches](#sxwm-patches)
+- [Keyboard shortcuts (sxwm)](#keyboard-shortcuts-sxwm)
+- [Status bar modules (sxbar)](#status-bar-modules-sxbar)
+- [Utility scripts (bin/)](#utility-scripts-bin)
+- [Screensaver](#screensaver)
+- [Wallpaper](#wallpaper)

 ---

-## Om
+## About

-Det här är min personliga dotfiles-installation för en lättviktig, tangentbordsdriven
-X11-skrivbordsmiljö byggd runt [`sxwm`](https://github.com/uint23/sxwm) (tiling window
-manager), [`sxbar`](https://github.com/MrJensK/sxbar) (statusbar) och
-[`dmenu`](https://github.com/MrJensK/dmenu) (programlauncher). Allt sätts upp automatiskt
-via [`install.sh`](install.sh) — klona repot, kör skriptet, och du har en färdig miljö.
+This is my personal dotfiles setup for a lightweight, keyboard-driven X11 desktop
+environment built around [`sxwm`](https://github.com/uint23/sxwm) (tiling window
+manager, patched with a handful of local fixes — see [below](#sxwm-patches)),
+[`sxbar`](https://github.com/MrJensK/sxbar) (status bar) and
+[`dmenu`](https://github.com/MrJensK/dmenu) (application launcher). Everything is
+set up automatically via [`install.sh`](install.sh) — clone the repo, run the
+script, and you have a working environment.

-## Funktioner
+## Features

 | | |
 |---|---|
-| 🪟 | **sxwm** — tiling window manager, patchad för korrekt cursor-DPI |
-| 📊 | **sxbar** — statusbar med klocka, datum, batteri, volym och CPU |
-| 🚀 | **dmenu** — snabb programlauncher (`mod + p`) |
-| 📶 | **bluetui** — Bluetooth-hantering direkt i terminalen |
-| 🖥️ | **kitty** — GPU-accelererad terminal med GruvBox-tema och svepande cursor |
-| 🔤 | **JetBrainsMono Nerd Font** — ikonstöd i bar och terminal |
-| 🔊 | **PipeWire** — ljud (pipewire + pipewire-pulse + wireplumber) aktiverat automatiskt |
-| 🔇 | Tyst installation — PC-speaker (`pcspkr`) och X-bell avstängda |
-| 🌙 | Skärmsläckning/DPMS efter 5 min inaktivitet |
-| ⌨️ | Svenskt tangentbord (`setxkbmap se`) |
-| 🟢 | Autostart av X på TTY1 vid inloggning |
+| 🪟 | **sxwm** — tiling window manager, patched with 5 local fixes (DPI, taskbar focus, multi-monitor struts, hotplug remap, fullscreen targeting) |
+| 📊 | **sxbar** — status bar with clock, date, battery, volume, CPU, brightness, Bluetooth, network, media player, taskbar and start menu popups |
+| 🚀 | **dmenu** — fast application launcher (`mod + p`) |
+| 📶 | **bluetui** — Bluetooth management right in the terminal |
+| 🖥️ | **kitty** — GPU-accelerated terminal, GruvBox Dark Hard theme, cursor trail effect |
+| 🔤 | **JetBrainsMono Nerd Font** — icon support in the bar and terminal |
+| 🔊 | **PipeWire** — audio (pipewire + pipewire-pulse + wireplumber) enabled automatically |
+| 🔇 | Quiet install — PC speaker (`pcspkr`) and the X bell are disabled |
+| 🌙 | Screen blanking / DPMS after 5 minutes of inactivity, plus a TTE-powered terminal screensaver |
+| 💻 | Laptop-lid handling — auto-toggle the internal display on lid open/close, with an inhibitor to temporarily disable it |
+| 🖱️ | Touchpad tweaks applied automatically (natural scrolling, tap-to-click, etc. via `xinput`) |
+| ⌨️ | Swedish keyboard layout (`setxkbmap se`) |
+| 🟢 | X autostarts on TTY1 at login |

 ## Installation

 ```bash
-git clone <detta repo>
+git clone <this repo>
 cd dotfiles
 ./install.sh
 ```

-Skriptet installerar systempaket, bygger och installerar `sxwm`, `sxbar`, `dmenu` och
-`bluetui` från källkod, kopierar konfigfiler (med backup av befintliga), och frågar om
-det får skriva `~/.xinitrc` åt dig.
+The script installs system packages, builds and installs `sxwm` (with all local
+patches applied), `sxbar`, `dmenu` and `bluetui` from source, installs the
+JetBrainsMono Nerd Font, copies config files (backing up anything that already
+exists), installs the utility scripts under `~/.local/bin`, and offers to write
+`~/.xinitrc` for you. A couple of steps are interactive (writing `~/.xinitrc`,
+enabling the lid-watch daemon) so you can opt out if you already have your own
+setup for those.

-## Struktur
+## Structure

 ```
 dotfiles/
-├── install.sh              # Huvudinstallationsskript
-├── cursor-dpi-fix.patch    # Patch som appliceras på sxwm
+├── install.sh                   # Main install script
 ├── BG/
-│   └── j9huwdxo1zzg1.jpeg  # Skrivbordsbakgrund
+│   └── j9huwdxo1zzg1.jpeg       # Desktop wallpaper
+├── bin/                          # Utility scripts, installed to ~/.local/bin
+│   ├── internal-display          # on/off/toggle/status for the internal (eDP) screen
+│   ├── lid-display-watch         # Background daemon: auto internal-display on lid open/close
+│   ├── lidsuspend                # Temporarily inhibit lid-close suspend
+│   ├── mouse-settings            # Applies touchpad tweaks via xinput
+│   ├── screensaver                # Runs random TTE animations in a loop
+│   ├── screensaverd               # Idle watcher, launches the screensaver after inactivity
+│   ├── screensaver-launch         # Launches the screensaver fullscreen on every monitor
+│   └── screensaver.txt            # ASCII art shown by the screensaver
+├── *.patch                       # Local sxwm patches, see "sxwm patches" below
 └── config/
-    ├── sxwmrc               # sxwm-konfiguration (tangentbord, layout, färger)
-    ├── sxbarc               # sxbar-konfiguration (moduler, färger, ikoner)
+    ├── sxwmrc                    # sxwm config (keybinds, layout, colours)
+    ├── sxbarc                    # sxbar config (modules, colours, icons)
     └── kitty/
-        └── kitty.conf       # kitty-terminalkonfiguration
+        └── kitty.conf             # kitty terminal config
 ```

-## Tangentbordsgenvägar (sxwm)
+## sxwm patches
+
+`install.sh` clones upstream `sxwm` and applies these on top before building, in
+order:
+
+| Patch | Fixes |
+|---|---|
+| [`cursor-dpi-fix.patch`](cursor-dpi-fix.patch) | Incorrect cursor scaling on high-DPI displays |
+| [`net-active-window.patch`](net-active-window.patch) | Adds `_NET_ACTIVE_WINDOW` support — required for sxbar's taskbar module; without it, clicking a taskbar entry does nothing |
+| [`multi-monitor-struts.patch`](multi-monitor-struts.patch) | `_NET_WM_STRUT_PARTIAL` reservations weren't clamped to the panel's own monitor, so a monitor's reserved area could exceed its actual size and push windows off-screen |
+| [`monitor-hotplug-remap.patch`](monitor-hotplug-remap.patch) | Windows lost their correct monitor association on hotplug (e.g. `lid-display-watch` toggling eDP); monitor ownership is now recomputed from each window's actual position |
+| [`fullscreen-monitor-fix.patch`](fullscreen-monitor-fix.patch) | Fullscreening a window that had been moved to another monitor by an external tool (`xdotool`, `screensaver-launch`) fullscreened it on the wrong screen; the target monitor is now recomputed from the window's real geometry |
+
+## Keyboard shortcuts (sxwm)

 `mod` = <kbd>Super</kbd>

-| Genväg | Åtgärd |
+| Shortcut | Action |
 |---|---|
-| `mod + Return` | Öppna kitty |
-| `mod + b` | Öppna Firefox |
-| `mod + p` | dmenu (programlauncher) |
-| `mod + shift + q` | Stäng fönster |
-| `mod + shift + e` | Avsluta sxwm |
-| `mod + c` | Centrera fönster |
-| `mod + m` | Toggle monocle-läge |
-| `mod + j` / `mod + k` | Fokus nästa/föregående fönster |
-| `mod + comma` / `mod + period` | Fokus föregående/nästa skärm |
-| `mod + shift + j` / `mod + shift + k` | Flytta fönster i master/stack |
-| `mod + l` / `mod + h` | Öka/minska master-area |
-| `mod + Piltangenter` | Flytta fönster |
-| `mod + shift + Piltangenter` | Ändra fönsterstorlek |
-| `mod + equal` / `mod + minus` | Öka/minska gaps |
+| `mod + Return` | Open kitty |
+| `mod + b` | Open Firefox |
+| `mod + p` | dmenu (application launcher) |
+| `mod + q` | Close window |
+| `mod + shift + e` | Quit sxwm |
+| `mod + c` | Centre window |
+| `mod + m` | Toggle monocle mode |
+| `mod + j` / `mod + k` | Focus next / previous window |
+| `mod + comma` / `mod + period` | Focus previous / next monitor |
+| `mod + shift + comma` / `mod + shift + period` | Move window to previous / next monitor |
+| `mod + shift + j` / `mod + shift + k` | Move window in master/stack |
+| `mod + l` / `mod + h` | Increase / decrease master area |
+| `mod + ctrl + l` / `mod + ctrl + h` | Increase / decrease stack window size |
+| `mod + Arrow keys` | Move window |
+| `mod + shift + Arrow keys` | Resize window |
+| `mod + o` / `mod + i` | Increase / decrease gaps |
 | `mod + space` | Toggle floating |
+| `mod + shift + space` | Toggle global floating |
 | `mod + shift + f` | Fullscreen |
-| `mod + r` | Ladda om konfiguration |
-| `mod + alt + [1-4]` | Skapa scratchpad |
+| `mod + r` | Reload config |
+| `mod + alt + [1-4]` | Create scratchpad |
 | `mod + ctrl + [1-4]` | Toggle scratchpad |
-| `mod + [1-9]` | Byt workspace |
-| `mod + shift + [1-9]` | Flytta fönster till workspace |
-
-## Statusbar-moduler (sxbar)
-
-| Modul | Uppdateringsintervall | Färg |
-|---|---|---|
-| 🕐 Klocka | 1 s | `#50fa7b` |
-| 📅 Datum | 60 s | `#8be9fd` |
-| 🔋 Batteri | 30 s | `#ffb86c` |
-| 🔊 Volym | 5 s | `#ff79c6` |
-| ⚙️ CPU | 3 s | — |
-
-## Skärmbakgrund
+| `mod + alt + shift + [1-4]` | Remove scratchpad |
+| `mod + [1-9]` | Switch workspace |
+| `mod + shift + [1-9]` | Move window to workspace |
+
+Media/function keys (volume, brightness, playback) are bound too — see
+[`config/sxwmrc`](config/sxwmrc).
+
+## Status bar modules (sxbar)
+
+| Module | Refresh interval | Colour | Notes |
+|---|---|---|---|
+| 🕐 Clock | 1 s | `#50fa7b` | Centred in the bar |
+| 📅 Date | 60 s | `#8be9fd` | |
+| 🔋 Battery | 30 s | `#ffb86c` | |
+| 🔊 Volume | 5 s | `#ff79c6` | |
+| ⚙️ CPU | 3 s | `#bd93f9` | |
+| ☀️ Brightness | 5 s | `#f1fa8c` | Hover to reveal a slider |
+| 🔵 Bluetooth | 10 s | `#4a9eff` | Click for an on/off/scan/pair menu |
+| 👤 User menu | 300 s | `#ff5555` | Click for sleep/log out/shut down |
+| 🌐 Network | 10 s | `#2ee6d6` | Click for a WiFi/Ethernet + IP menu |
+| 🎵 Media | 2 s | `#cba6f7` | Hover for album art + prev/play-pause/next |
+| 🗔 Taskbar | 1 s | — | Secondary bar; click an entry to focus that window |
+| ⭐ Start menu | 3600 s | — | Hover for favourite apps as popup buttons |
+
+## Utility scripts (bin/)
+
+Installed to `~/.local/bin` by `install.sh` and wired into `sxwmrc`/`~/.xinitrc`:
+
+- **`mouse-settings`** — applies libinput touchpad tweaks via `xinput` (natural
+  scrolling on the touchpad only, tap-to-click, etc.). Safe to re-run any time.
+- **`internal-display [on|off|toggle|status]`** — (de)activates the internal
+  (eDP) screen via `xrandr`. Refuses to turn it off if it's the only active
+  display.
+- **`lid-display-watch`** — background daemon (started via sxwm's `exec`) that
+  watches the laptop lid state through `systemd-logind` and automatically turns
+  the internal display off on lid-close / on on lid-open, provided an external
+  monitor is connected. Opt-in during install.
+- **`lidsuspend [on|off|status]`** — temporarily disables/re-enables what happens
+  on lid-close (suspend), without touching `/etc/systemd/logind.conf`, by
+  holding a systemd inhibitor lock.
+- **`screensaverd`** — idle watcher; launches the screensaver after a period of
+  inactivity (default 150 s) and kills it the moment real activity resumes.
+- **`screensaver-launch`** — launches the screensaver fullscreen on every
+  connected monitor.
+- **`screensaver`** — runs random [TTE](https://github.com/ChrisBuilds/terminaltexteffects)
+  (terminal text effects) animations in a loop over the ASCII art in
+  `screensaver.txt`.
+
+## Screensaver
+
+The screensaver renders `bin/screensaver.txt` through random
+[terminaltexteffects](https://github.com/ChrisBuilds/terminaltexteffects)
+animations (installed via `pipx` during setup) inside a fullscreen kitty
+window, and exits the instant you touch the mouse or keyboard.
+
+## Wallpaper

 <div align="center">
-<img src="BG/j9huwdxo1zzg1.jpeg" alt="Skrivbordsbakgrund" width="600">
+<img src="BG/j9huwdxo1zzg1.jpeg" alt="Desktop wallpaper" width="600">
 </div>

-Sätts automatiskt via `feh --bg-scale` i [`config/sxwmrc`](config/sxwmrc).
+Set automatically via `feh --bg-scale` in [`config/sxwmrc`](config/sxwmrc).

 ---

 <div align="center">
-<sub>Byggt för en snabb, minimal och tangentbordsdriven arbetsdag.</sub>
+<sub>Built for a fast, minimal, keyboard-driven workday.</sub>
 </div>