Skip to content

Instantly share code, notes, and snippets.

@thor314
Created October 22, 2020 08:43
Show Gist options
  • Save thor314/451a88526307c89edf60bedf0a7ffa49 to your computer and use it in GitHub Desktop.
Save thor314/451a88526307c89edf60bedf0a7ffa49 to your computer and use it in GitHub Desktop.
#!/bin/sh
# setxkbmap modifies usermodmap
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
setxkbmap us dvorak -option ctrl:swapcaps,altwin:hyper_win
ZDOTDIR="$HOME/.zsh.d"
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs in xinit
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# twm &
# I3 window manager
# xclock -geometry 50x50-1+1 &
# xterm -geometry 80x50+494+51 &
# xterm -geometry 80x20+494-0 &
# exec xterm -geometry 310x80+0+0 -name login
# explicitly run "GNOME on Xorg", not Wayland
# https://wiki.archlinux.org/index.php/GNOME#Manually
export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
exec gnome-session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment