blob: 44f5f56abe4aacf617c855338b399473037d6673 (
plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
#!/bin/bash
echo Running LiveGUI stage2 fsscript ...
source /etc/profile
env-update
source /tmp/envscript
# Create /mnt/gentoo
mkdir /mnt/gentoo
# No we don't want to run xdm...
sed -e '/^DISPLAYMANAGER=/s/.*/DISPLAYMANAGER="sddm"/' -i /etc/conf.d/display-manager
# Don't let NM change hostname (this breaks xauth)
echo "[main]
plugins=keyfile
hostname-mode=none" > /etc/NetworkManager/NetworkManager.conf
# Autologin via sddm to plasma
echo "[Autologin]
User=gentoo
Session=plasma.desktop
Relogin=true" > /etc/sddm.conf
# Set up gentoo user
pushd /home/gentoo
mkdir -pv .config Desktop
# Disable screen lock
echo "[Daemon]
Autolock=false
LockOnResume=false" > .config/kscreenlockerrc
# Firefox as default browser
echo \
"[Added Associations]
inode/directory=org.kde.dolphin.desktop;
x-scheme-handler/http=firefox-esr.desktop;chromium-browser-chromium.desktop;
x-scheme-handler/https=firefox-esr.desktop;chromium-browser-chromium.desktop;
[Default Applications]
inode/directory=org.kde.dolphin.desktop;
x-scheme-handler/http=firefox-esr.desktop;
x-scheme-handler/https=firefox-esr.desktop;" \
> .config/mimeapps.list
# Customize taskbar pinned apps
wget "https://dev.gentoo.org/~bkohler/livegui/plasma-org.kde.plasma.desktop-appletsrc" -O \
.config/plasma-org.kde.plasma.desktop-appletsrc
# User face image
wget "https://dev.gentoo.org/~bkohler/livegui/face.icon.png" -O .face.icon
# Desktop icon setups
#DESKTOP_APPS=( org.kde.konsole firefox org.kde.dolphin )
#for i in "${APPS[@]}"; do
# ln -sv /usr/share/applications/${i}.desktop Desktop/
#done
# Autostart keyboard layout module
mkdir -p .config/autostart
echo "[Desktop Entry]
Version=1.0
Name=Keyboard settings
Icon=preferences-system
Type=Application
SingleMainWindow=true
Exec=systemsettings5 kcm_keyboard
Terminal=false
" > .config/autostart/systemsettings-keyboard.desktop
# Disable suspend
echo "[AC]
icon=battery-charging
[AC][DPMSControl]
idleTime=600
lockBeforeTurnOff=0
[AC][DimDisplay]
idleTime=300000
[AC][HandleButtonEvents]
lidAction=1
powerButtonAction=16
powerDownAction=16
triggerLidActionWhenExternalMonitorPresent=false
[Battery]
icon=battery-060
[Battery][DPMSControl]
idleTime=300
lockBeforeTurnOff=0
[Battery][DimDisplay]
idleTime=120000
[Battery][HandleButtonEvents]
lidAction=1
powerButtonAction=16
powerDownAction=16
triggerLidActionWhenExternalMonitorPresent=false
[LowBattery]
icon=battery-low
[LowBattery][BrightnessControl]
value=30
[LowBattery][DPMSControl]
idleTime=120
lockBeforeTurnOff=0
[LowBattery][DimDisplay]
idleTime=60000
[LowBattery][HandleButtonEvents]
lidAction=1
powerButtonAction=16
powerDownAction=16
triggerLidActionWhenExternalMonitorPresent=false
[LowBattery][SuspendSession]
idleTime=300000
suspendThenHibernate=false
suspendType=1" > .config/powermanagementprofilesrc
popd
# Clean up perms
chown -R gentoo:users /home/gentoo
# Let some tools run as root
mkdir -p /etc/polkit-1/rules.d/
echo 'polkit.addRule(function(action, subject) {
if (action.id == "org.gnome.gparted") {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (action.id == "org.kde.kpmcore.externalcommand.init") {
return polkit.Result.YES;
}
});
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.udisks2.filesystem-mount-system") {
return polkit.Result.YES;
}
});' > /etc/polkit-1/rules.d/livegui-root-tools.rules
|