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
|
2023-10-26 01:22:14 +00:00
|
|
|
[[ -f "$r" ]] && xrdb -merge "$r"
|
2017-05-03 13:10:13 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
for m in modmaps; do
|
2023-10-26 01:22:14 +00:00
|
|
|
[[ -f "$m" ]] && xmodmap "$m"
|
2017-05-03 13:10:13 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# Common services
|
2023-10-26 01:22:14 +00:00
|
|
|
common_services+=( jackd pulseaudio lockd )
|
2017-05-03 13:10:13 +00:00
|
|
|
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
|
2023-03-07 13:45:07 +00:00
|
|
|
setxkbmap -layout "us,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' \
|
2023-03-07 13:45:07 +00:00
|
|
|
-e 'keycode 49 = Escape asciitilde' \
|
|
|
|
-e "pointer = 3 2 1"
|
2023-10-26 01:22:14 +00:00
|
|
|
#xinput --set-prop 22 'libinput Accel Speed' -0.92
|
2023-03-07 13:45:07 +00:00
|
|
|
#xinput set-button-map 17 3 2 1 4 5 6 7 8 9
|
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
|
|
|
|
|
2023-03-07 13:45:07 +00:00
|
|
|
# Warmer colours
|
|
|
|
xsct 4500
|
2020-12-08 21:34:57 +00:00
|
|
|
|
2017-05-03 13:10:13 +00:00
|
|
|
# Custom functions
|
|
|
|
services() {
|
|
|
|
for i in "${session_services[@]}"; do
|
|
|
|
service "$i" "$1"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|