-
Notifications
You must be signed in to change notification settings - Fork 16
/
.kdeSetup.sh
131 lines (112 loc) · 7.54 KB
/
.kdeSetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/bin/sh
# curl https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.kdeSetup.sh | sh
wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/.__KEY_REPEAT_SETTINGS__ -P ~/
. ~/.__KEY_REPEAT_SETTINGS__
# Determine kde version and configure based on that.
if [ "`which kwriteconfig5`" ]; then
KWRITECONF=kwriteconfig5
HOTKEYS="$HOME/.config/khotkeysrc"
PLASMADESK="$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc"
KDEVER=5
else
KWRITECONF=kwriteconfig
HOTKEYS="$HOME/.kde/share/config/khotkeysrc"
PLASMADESK="$HOME/.kde/share/config/plasma-desktop-appletsrc"
KDEVER=4
fi
# Kwallet is annoying, and also makes connecting
# to wireless networks take multiple attempts -- no thanks.
# ${KWRITECONF} --file kwalletrc --group Wallet --key "Enabled" false
# ${KWRITECONF} --file kwalletrc --group Wallet --key "First Use" false
# Set keyboard repeat/delay to be blazingly fast.
${KWRITECONF} --file kcminputrc --group "Keyboard" --key "RepeatDelay" ${KEY_REPEAT_DELAY}
${KWRITECONF} --file kcminputrc --group "Keyboard" --key "RepeatRate" ${KEY_REPEAT_RATE}
# Caps Lock as Ctrl! Try it, you'll like it.
${KWRITECONF} --file kxkbrc --group "Layout" --key "ResetOldOptions" true
${KWRITECONF} --file kxkbrc --group "Layout" --key "Options" "ctrl:nocaps"
# Make kde faster, effects are for people who have leisure time.
${KWRITECONF} --file kdeglobals --group "KDE-Global GUI Settings" --key "GraphicEffectsLevel" 0
# Just using more defaults in my old age.
#${KWRITECONF} --file kdeglobals --group "General" --key "desktopFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "fixed" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "font" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "menuFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "smallestReadableFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "taskbarFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "toolBarFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "General" --key "activeFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file kdeglobals --group "WM" --key "activeFont" "Terminus,9,-1,5,50,0,0,0,0,0"
#${KWRITECONF} --file plasma-desktop-appletsrc --group "General" --key "fontTime" "Terminus,9,-1,5,50,0,0,0,0,0"
# Minimalist splash.
#${KWRITECONF} --file startupconfig --group "ksplashrc KSplash Theme Default" --key "ksplashrc_ksplash_theme" Minimalistic
# Note that the theme depends on the engine setting,
# it will not function otherwise.
#${KWRITECONF} --file ksplashrc --group "KSplash" --key "Engine" KSplashQML
#${KWRITECONF} --file ksplashrc --group "KSplash" --key "Theme" Minimalistic
# Mostly make kwin faster, but also add wobbly windows.
# ${KWRITECONF} --file kwinrc --group "Windows" --key "FocusPolicy" FocusFollowsMouse
# ${KWRITECONF} --file kwinrc --group "Windows" --key "AutoRaise" true
# ${KWRITECONF} --file kwinrc --group "Windows" --key "AutoRaiseInterval" 500
# ${KWRITECONF} --file kwinrc --group "Windows" --key "DelayFocusInterval" 500
# ${KWRITECONF} --file kwinrc --group "Windows" --key "FocusStealingPreventionLevel" 2
#${KWRITECONF} --file kwinrc --group "Plugins" --key "kwin4_effect_wobblywindowsEnabled" true
#${KWRITECONF} --file kwinrc --group "Plugins" --key "kwin4_effect_cubeEnabled" true
#${KWRITECONF} --file kwinrc --group "Plugins" --key "kwin4_effect_cubeslideEnabled" true
${KWRITECONF} --file kwinrc --group "Compositing" --key "UnredirectFullscreen" true
#${KWRITECONF} --file kwinrc --group "Compositing" --key "AnimationSpeed" 1
${KWRITECONF} --file kwinrc --group "Compositing" --key "Enabled" true
# Give less notifications.
${KWRITECONF} --file ksmserverrc --group "General" --key "confirmLogout" false
${KWRITECONF} --file ksmserverrc --group "General" --key "shutdownType" 1
${KWRITECONF} --file ksmserverrc --group "General" --key "loginMode" default
# Make the kate editor a little nicer for me:
${KWRITECONF} --file katerc --group "TipOfDay" --key "RunOnStart" false
${KWRITECONF} --file katerc --group "General" --key "Show Full Path in Title" true
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "Encoding" UTF-8
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "ReplaceTabsDyn" true
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "Tab Handling" 4
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "Tab Width" 4
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "Indentation Width" 4
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "Word Wrap" false
${KWRITECONF} --file katerc --group "Kate Document Defaults" --key "Newline At EOF" true
${KWRITECONF} --file katerc --group "Kate Part Defaults" --key "Fallback Encoding" UTF-8
# Turns on example shortcuts, including: Konsole = Ctrl + Alt + T
#sed -i.bak 's/Enabled=false/Enabled=true/g' $HOTKEYS
# Make folder view the default.
#sed -i.bak 's/plugin=desktop/plugin=folderview/g' $PLASMADESK
# Make the power settings a little more sane.
#${KWRITECONF} --file powermanagementprofilesrc --group "AC" --group "DimDisplay" --key "idleTime" 600000
#${KWRITECONF} --file powermanagementprofilesrc --group "Battery" --group "DimDisplay" --key "idleTime" 600000
#${KWRITECONF} --file powermanagementprofilesrc --group "LowBattery" --group "DimDisplay" --key "idleTime" 600000
#${KWRITECONF} --file powermanagementprofilesrc --group "AC" --group "DPMSControl" --key "idleTime" 600
#${KWRITECONF} --file powermanagementprofilesrc --group "Battery" --group "DPMSControl" --key "idleTime" 600
#${KWRITECONF} --file powermanagementprofilesrc --group "LowBattery" --group "DPMSControl" --key "idleTime" 600
# I do not like forcing session suspension, let the user decide this.
#${KWRITECONF} --file powermanagementprofilesrc --group "AC" --group "SuspendSession" --key "idleTime" 600000
#${KWRITECONF} --file powermanagementprofilesrc --group "Battery" --group "SuspendSession" --key "idleTime" 600000
#${KWRITECONF} --file powermanagementprofilesrc --group "LowBattery" --group "SuspendSession" --key "idleTime" 600000
#${KWRITECONF} --file powermanagementprofilesrc --group "AC" --group "BrightnessControl" --key "value" 100
#${KWRITECONF} --file powermanagementprofilesrc --group "Battery" --group "BrightnessControl" --key "value" 100
#${KWRITECONF} --file powermanagementprofilesrc --group "LowBattery" --group "BrightnessControl" --key "value" 80
# Disable compositing, as it breaks some things ... and I am not fancy.
#if [ "`qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive`" = true ]; then
# qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing
#fi
# This only seems to apply to old versions:
#
# Restart services so that new settings take effect.
# if [ "$(env | grep XDG_CURRENT_DESKTOP=KDE)" ]; then
# qdbus org.kde.kded /kded unloadModule powerdevil
# qdbus org.kde.keyboard /modules/khotkeys reread_configuration
# qdbus org.kde.kded /kbuildsycoca recreate
# qdbus org.kde.kded /kded reconfigure
# qdbus org.kde.plasma-desktop /MainApplication reparseConfiguration
# qdbus org.kde.kwin /KWin reconfigure
# qdbus org.kde.kded /kded loadModule powerdevil
# fi
[ -e /usr/bin/ssh-add ] && ln -sf /usr/bin/ssh-add ~/.config/autostart-scripts/
echo
echo "This scipt detected that you are using KDE $KDEVER."
echo "If this is not correct, please file an issue at: "
echo "https://github.com/ryanpcmcquen/linuxTweaks"
echo