diff --git a/config/sets/kde/apply.sh b/config/sets/kde/apply.sh index 2938cb9..ffc4ea3 100755 --- a/config/sets/kde/apply.sh +++ b/config/sets/kde/apply.sh @@ -1,8 +1,8 @@ #!/bin/bash set -euo pipefail -# Sets the KDE Plasma keyboard repeat rate to 50 repeats/sec with a 250ms -# initial delay (System Settings > Keyboard > Advanced), via kcminputrc. +# KDE Plasma settings that diverge from stock defaults on this machine. +# Each section below is independent and safe to re-run. kwriteconfig="" for candidate in kwriteconfig6 kwriteconfig5; do @@ -13,10 +13,12 @@ for candidate in kwriteconfig6 kwriteconfig5; do done if [ -z "$kwriteconfig" ]; then - echo "Warning: kwriteconfig5/6 not found (not a KDE Plasma system?); skipping keyboard repeat settings." >&2 + echo "Warning: kwriteconfig5/6 not found (not a KDE Plasma system?); skipping KDE settings." >&2 exit 0 fi +# Keyboard repeat rate: 50 repeats/sec with a 250ms initial delay +# (System Settings > Keyboard > Advanced), via kcminputrc. "$kwriteconfig" --file kcminputrc --group Keyboard --key RepeatDelay 250 "$kwriteconfig" --file kcminputrc --group Keyboard --key RepeatRate 50 @@ -25,3 +27,35 @@ fi if [ -n "${DISPLAY:-}" ] && command -v xset >/dev/null 2>&1; then xset r rate 250 50 || true fi + +# Remap Caps Lock to Escape (System Settings > Keyboard > Advanced > Caps +# Lock behavior). +"$kwriteconfig" --file kxkbrc --group Layout --key Options "caps:escape" + +# Disable screen locking entirely (System Settings > Screen Locking). +"$kwriteconfig" --file kscreenlockerrc --group Daemon --key Autolock false +"$kwriteconfig" --file kscreenlockerrc --group Daemon --key Timeout 0 + +# Never dim or turn off the display when idle, on AC or battery +# (System Settings > Power Management > Energy Saving). +for profile in AC Battery; do + "$kwriteconfig" --file powerdevilrc --group "$profile" --group Display --key DimDisplayWhenIdle false + "$kwriteconfig" --file powerdevilrc --group "$profile" --group Display --key TurnOffDisplayWhenIdle false +done + +# Disable automounting of removable devices (System Settings > Removable +# Storage). +"$kwriteconfig" --file kded5rc --group Module-device_automounter --key autoload false + +# Dolphin: hide the menu bar, and use an editable path bar instead of +# breadcrumbs in file open/save dialogs. +"$kwriteconfig" --file dolphinrc --group MainWindow --key MenuBar Disabled +"$kwriteconfig" --file kdeglobals --group "KFileDialog Settings" --key "Breadcrumb Navigation" false + +# Use the Breeze Dark global theme (System Settings > Appearance > Global +# Theme). +if command -v plasma-apply-lookandfeel >/dev/null 2>&1; then + plasma-apply-lookandfeel -a org.kde.breezedark.desktop || true +else + "$kwriteconfig" --file kdeglobals --group KDE --key LookAndFeelPackage org.kde.breezedark.desktop +fi diff --git a/config/sets/kde/description b/config/sets/kde/description index 518ef50..5280ac9 100644 --- a/config/sets/kde/description +++ b/config/sets/kde/description @@ -1 +1,3 @@ -KDE Plasma: keyboard repeat rate 50/s, 250ms delay +KDE Plasma: keyboard repeat rate 50/s + 250ms delay, Caps Lock as Escape, +screen locking and idle display dim/off disabled, device automounter +disabled, Dolphin menu bar hidden + editable path bar, Breeze Dark theme