Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions config/sets/kde/apply.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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
4 changes: 3 additions & 1 deletion config/sets/kde/description
Original file line number Diff line number Diff line change
@@ -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
Loading