Skip to content

Instantly share code, notes, and snippets.

@whaaaley
Created December 21, 2025 16:18
Show Gist options
  • Select an option

  • Save whaaaley/045eb6a2c10423033b0687a9bab14209 to your computer and use it in GitHub Desktop.

Select an option

Save whaaaley/045eb6a2c10423033b0687a9bab14209 to your computer and use it in GitHub Desktop.
Debian system configuration backup before Trixie upgrade - 2025-12-21

System Changes

Scripts Created in ~/.local/bin/

  • logout - i3 logout script (i3-msg exit) (~/.local/bin/logout)
  • audio-switcher - Rofi-based audio output device switcher using pactl (~/.local/bin/audio-switcher)
  • kill-app - Rofi-based GUI application killer (uses wmctrl via nix-shell for fast window detection) (~/.local/bin/kill-app)
  • wallpaper-picker - Rofi-based wallpaper selector using feh (~/.local/bin/wallpaper-picker)
  • gpick-toggle - Smart gpick launcher with optimized scratchpad behavior (~/.local/bin/gpick-toggle)
    • Toggles scratchpad visibility for instant show/hide
    • Prevents duplicate instances
    • Auto-launches on first keypress with optimized polling (1.5s initial delay, 50ms poll interval)
    • Auto-shows from scratchpad after launch (~1.6s total launch time)
    • Resizes window to 960x480 and centers it on screen
    • Launches via nix-shell with dark theme (GTK_THEME=Adwaita:dark)
  • sensor-monitor - System resource monitoring script (~/.local/bin/sensor-monitor)
    • Uses nix-shell with btop for interactive system monitoring
    • Shows CPU, memory, disk, network, and processes with graphs
  • gpu-monitor - NVIDIA GPU monitoring script (~/.local/bin/gpu-monitor)
    • Uses watch + nvidia-smi to display GPU temperature, usage, memory, and stats
    • Auto-refreshes every second in terminal window
    • Note: Tested nvitop and gpustat but both had NVML library conflicts with system NVIDIA drivers

Desktop Files Created/Modified in ~/.local/share/applications/

Naming Convention: All desktop files follow a standardized naming pattern:

  • (Script) - Custom bash scripts in ~/.local/bin/
  • (Nix) - Applications launched via nix-shell
  • (Native) - Applications installed via apt or native installers
  • (Distrobox) - Applications running in distrobox containers

Metadata Standards: All desktop files include:

  • Version=1.0 - Desktop Entry Specification version
  • GenericName - Category description (e.g., "System Monitor", "Color Picker")
  • Keywords - Searchable terms for dmenu/rofi (semicolon-separated)
  • Comment - Brief description of functionality

Scripts

  • logout.desktop - Logout (Script) - Log out of i3 session
  • audio-switcher.desktop - Audio Output Switcher (Script) - Switch between audio devices
  • kill-app.desktop - Kill Application (Script) - Kill running GUI applications
  • wallpaper-picker.desktop - Wallpaper Picker (Script) - Choose wallpaper from collection
  • gpick.desktop - Gpick (Script) - Color picker with scratchpad toggle
    • Optimized launch: ~1.6 seconds from keypress to visible
    • Single keypress toggle (Super+Shift+C)
    • Window: 960x480, centered on screen
    • Subsequent toggles: instant (window stays in scratchpad)
  • sensor-monitor.desktop - Sensor Monitor (Script) - Monitor system resources with btop
  • gpu-monitor.desktop - GPU Monitor (Script) - Monitor NVIDIA GPU with nvidia-smi

Nix Applications

  • gedit-nix.desktop - gedit (Nix) - Text editor with dark mode
  • nautilus-nix.desktop - Nautilus (Nix) - File manager with dark mode
  • discord-nix.desktop - Discord (Nix) - Voice and text chat
  • chatterino2-nix.desktop - Chatterino 2 (Nix) - Twitch chat client
  • screenkey.desktop - Screenkey (Nix) - Keyboard visualizer
  • opencode.desktop - OpenCode (Nix) - AI-powered code editor
  • vlc-nix.desktop - VLC Media Player (Nix) - Video and media player
  • mpv-nix.desktop - mpv (Nix) - Lightweight video player (handles videos + animated GIFs)
    • Set as default for GIF files (xdg-mime default mpv-nix.desktop image/gif)
  • feh-nix.desktop - feh (Nix) - Fast image viewer for static images

Native Applications

  • chromium.desktop - Chromium Web Browser (Native) - Modified with dark mode flags (--force-dark-mode --enable-features=WebUIDarkMode)
  • org.flameshot.Flameshot.desktop - Flameshot (Native) - Screenshot tool (launches GUI directly)
  • dev.zed.Zed.desktop - Zed (Native) - Code editor (v0.217.3)

Configuration Files Modified

Display & Window Manager

  • ~/.config/i3/config - i3 window manager configuration

    • Font: IBM Plex Mono 10
    • Display: USB-C-0 at 5120x2160 @ 165.06Hz, DPI 96
    • Wallpaper: feh with ~/.fehbg or fallback wallpaper
    • Startup applications: polybar, nm-applet, xss-lock
    • Screensaver/DPMS disabled: xset s off dpms 0 0 0 -dpms (sets timeouts to 0 and disables DPMS to prevent screen from sleeping)
    • Keybindings:
      • Super+Shift+S → flameshot (launches org.flameshot.Flameshot.desktop)
      • Super+Shift+C → gpick (color picker)
      • Ctrl+H → Previous tab (global, all apps)
      • Ctrl+L → Next tab (global, all apps)
      • Ctrl+Shift+H → Move tab left (global, all apps)
      • Ctrl+Shift+L → Move tab right (global, all apps)
      • Mod+Space → rofi drun
      • Mod+Tab → rofi window switcher
      • Mod+Right/Left → workspace next/prev
      • Mod+Shift+Right/Left → move container and follow to next/prev workspace
      • Mod+minus → scratchpad show
      • Mod+Shift+minus → move to scratchpad
      • Mod+Shift+R → restart i3
    • Gaps: 12px inner, 3px top
    • Borders: 2px pixel borders (no titlebar)
    • Border colors:
      • Focused: #5C9CF5 (Dark Sky Blue)
      • Focused inactive: #282A2E
      • Unfocused: #282A2E
      • Background: #000000
    • Window rules:
      • gpick: floating enabled, automatically moves to scratchpad on launch
      • Nautilus (Org.gnome.Nautilus): floating enabled, automatically moves to scratchpad on launch
  • ~/.config/polybar/config.ini - Status bar configuration

    • Right modules include: filesystem, pulseaudio, xkeyboard, memory, cpu, temperature-cpu, temperature-gpu, wlan, eth, date
    • Temperature monitoring:
      • temperature-cpu module: internal/temperature using thermal_zone0, updates every 2s, warning threshold 80°C
      • temperature-gpu module: custom/script using nvidia-smi, updates every 2s, displays GPU temperature
    • GPU monitoring history: Tested during video playback, temps peaked at 60°C (well within safe range of 88°C)

Note: Picom compositor was removed after testing. It was found to be unnecessary because:

  • Rounded corners showed visual artifacts (app content wasn't rounded, only window frame)

  • Didn't fix cursor rendering issues

  • Background color rendering issues with GLX backend

  • User determined compositor features weren't needed for their minimal setup

  • ~/.config/rofi/config.rasi - Application launcher theming

    • Theme: Arc-Dark
    • Font: IBM Plex Mono 14
    • Modes: window, run, drun
    • Icons: disabled
    • Window width: 960px

Terminal & Shell

  • ~/.tmux.conf - Tmux configuration

    • Default terminal: tmux-256color
    • RGB color support: terminal-features ",*:RGB"
    • Mouse support enabled
    • Status bar at top
    • Allow passthrough enabled
    • Status bar background: #282A2E
  • ~/.config/alacritty/alacritty.yml - Terminal emulator config

    • Font: IBM Plex Mono (Regular, Bold, Italic, Bold Italic)
    • Font offset: x=0, y=3
    • Environment: TERM=xterm-256color, WINIT_X11_SCALE_FACTOR=1.0
    • Colors: Primary background #1a1c1f (merged from OpenCode #0a0a0a and Zed #282c33), foreground #ffffff
  • ~/.config/starship.toml - Shell prompt configuration

    • Using plain-text-symbols preset (no emojis, plain text only)

X11 & Display

  • ~/.Xresources - X resources
    • Cursor theme: Breeze6
    • Cursor size: 36

Theme & Appearance

  • ~/.config/gtk-3.0/settings.ini - GTK3 dark theme preference
  • ~/.config/gtk-4.0/settings.ini - GTK4 dark theme preference

Applications

  • ~/.local/share/chatterino/Settings/settings.json - Chatterino settings
  • ~/.config/opencode/opencode.json - OpenCode configuration
  • ~/.local/zed.app/ - Zed editor installation (v0.217.3)
    • Installed via official install script from zed.dev
    • Binary at ~/.local/bin/zed
    • Works with NVIDIA proprietary drivers on X11 (direct install required, nix-shell version had GPU initialization issues)

Display Settings

  • Primary monitor: DP-4 at 3440x1440 resolution
  • Configured via xrandr in i3 config

Audio Configuration

  • PulseAudio management via pactl
  • Custom audio switcher script for easy output device switching

Cursor Theme

  • Breeze6 cursor theme (size 36)
  • Configured in .Xresources
  • Environment variables set in discord-wrapper

Installed Software

  • Flameshot - Screenshot tool (installed via apt, v12.1.0)
  • Zed Editor - Code editor (installed via official installer, v0.217.3)
    • Replaced VS Code (removed)
  • Docker CE - Container engine (installed via Docker's official repository, v29.1.3)
    • Modern Docker Engine with Compose v2 plugin (v5.0.0)
    • Repository: https://download.docker.com/linux/debian
    • Installed packages: docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, docker-compose-plugin
    • Provides docker command and docker compose subcommand (v2, no hyphen)
    • User added to docker group for non-root access
    • Old docker.io (v20.10.24) removed and purged
    • Service runs automatically on boot
  • Podman - Container engine (installed via apt, v4.3.1)
    • Rootless container runtime, Docker-compatible
    • Use podman command directly
    • Runs alongside Docker CE (different binaries: docker vs podman)
  • Distrobox - Container management (installed via apt, v1.4.2.1)
  • debian-goodies - Debian system utilities (installed via apt, v0.88.1)
    • Provides dpigs (show largest packages), popbugs, which-pkg-broke, etc.
    • Note: deborphan is a separate package if needed for orphaned package detection
  • xdotool - X11 automation tool (installed via apt)
    • Used for global tab navigation keybindings (Ctrl+H/L)
    • ~6ms latency (3ms xdotool + 3ms i3 overhead)

System Maintenance

Package Cleanup Routine

Regular cleanup commands to maintain a clean system:

# Remove unneeded packages
sudo apt autoremove

# Purge config leftovers from removed packages
sudo apt purge $(dpkg -l | grep "^rc" | awk '{print $2}')

# Clean package cache (if disk space is a concern)
sudo apt clean

# Show largest installed packages
dpigs -H

# Check current kernel version
uname -r

# List all installed kernels
dpkg -l | grep "^ii" | grep linux-image

Understanding Package States

  • ii = Installed and working
  • rc = Removed but Config files remain (safe to purge)
  • pn = Purged, nothing left

Notes

  • Keep only current kernel (currently 6.1.0-41-amd64), remove old ones to save ~400MB per old kernel
  • Always check dpkg -l | grep "^rc" after removing packages
  • User cache at ~/.cache/ can grow large (currently ~2.3GB) - not managed by apt
  • Desktop file utilities: desktop-file-utils package is not required for i3+rofi (reads .desktop files directly)

Hardware & Diagnostics

GPU Information

  • GPU: NVIDIA GeForce RTX 2080 (8GB VRAM)
  • Driver: NVIDIA 535.247.01 (proprietary)
  • Normal operating temps: 50-60°C during video playback (safe range up to 88°C)
  • Power usage: 30-64W typical (245W max)
  • Known issue: Occasional "Xid 79: GPU has fallen off the bus" error
    • Not thermal-related (temps are normal)
    • Likely driver or PCIe communication bug
    • Does not occur in Windows

Monitoring Tools

  • Polybar shows real-time CPU and GPU temps in status bar
  • sensor-monitor script for detailed system monitoring (btop)
  • gpu-monitor script for GPU stats (nvidia-smi)
  • Tested nvitop and gpustat but incompatible due to NVML library conflicts with system NVIDIA drivers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment