2017-05-03 13:10:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Resources
|
|
|
|
resources=( '/etc/X11/xinit/.Xresources' "$HOME/.Xresources" )
|
|
|
|
modmaps=( '/etc/X11/xinit/.Xmodmap' "$HOME/.Xmodmap" )
|
|
|
|
|
|
|
|
# Set DPI
|
|
|
|
xrandr --dpi 95
|
|
|
|
|
|
|
|
for r in "${resources[@]}"; do
|
|
|
|
if [[ -f "$r" ]]; then
|
|
|
|
xrdb -merge "$r"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for m in modmaps; do
|
|
|
|
if [[ -f "$m" ]]; then
|
|
|
|
xmodmap "$m"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Common services
|
|
|
|
common_services+=( pulseaudio lockd )
|
|
|
|
for i in "${common_services[@]}"; do
|
|
|
|
service "$i" start
|
|
|
|
done
|
|
|
|
|
|
|
|
# Fonts
|
|
|
|
xset +fp /usr/share/fonts/local
|
|
|
|
|
|
|
|
# Screensaver settings
|
|
|
|
xset -dpms
|
|
|
|
xset s 300
|
|
|
|
xset s noblank
|
|
|
|
xset s noexpose
|
|
|
|
|
|
|
|
# Solid black root window
|
|
|
|
# chameleon is available at https://github.com/fbt/misc
|
|
|
|
chameleon -C '#151515'
|
|
|
|
|
|
|
|
# Set a wallpaper if it exists
|
|
|
|
if [[ -f "$HOME/wallpaper.png" ]]; then
|
|
|
|
chameleon "$HOME/wallpaper.png"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Input settings
|
2018-07-29 12:11:03 +00:00
|
|
|
setxkbmap -layout "ducky-mini(us),ducky-mini(ru)" \
|
|
|
|
-option "lv3:menu_switch,grp:caps_toggle,grp_led:caps,compose:ralt,terminate:ctrl_alt_bksp"
|
2017-05-03 13:10:13 +00:00
|
|
|
xmodmap -e 'remove lock = Caps_Lock' \
|
2018-07-29 12:11:03 +00:00
|
|
|
-e 'keycode 135 = KP_Insert' \
|
|
|
|
-e 'keycode 49 = Escape asciitilde'
|
2020-12-08 21:34:57 +00:00
|
|
|
#xmodmap -e "pointer = 3 2 1"
|
2017-05-03 13:10:13 +00:00
|
|
|
|
|
|
|
# Start a dbus session
|
|
|
|
if ! [[ "$DBUS_SESSION_BUS_ADDRESS" ]]; then
|
|
|
|
export $(dbus-launch)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Some nvidia tweaks
|
|
|
|
export VDPAU_NVIDIA_NO_OVERLAY=1
|
|
|
|
#export __GL_THREADED_OPTIMIZATIONS=1
|
|
|
|
nvidia-settings -l
|
|
|
|
nvidia-settings -a InitialPixmapPlacement=2
|
|
|
|
|
2020-12-08 21:34:57 +00:00
|
|
|
# Colour temp
|
|
|
|
xsct 6000
|
|
|
|
|
2017-05-03 13:10:13 +00:00
|
|
|
# Custom functions
|
|
|
|
services() {
|
|
|
|
for i in "${session_services[@]}"; do
|
|
|
|
service "$i" "$1"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|