]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add xprofile and xinitrc files
authorMaximilian Friedersdorff <max@friedersdorff.com>
Sun, 24 Jan 2021 10:55:02 +0000 (10:55 +0000)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Sun, 24 Jan 2021 10:55:02 +0000 (10:55 +0000)
states/i3/files/xinitrc.jinja [new file with mode: 0755]
states/i3/files/xprofile.jinja [new file with mode: 0755]

diff --git a/states/i3/files/xinitrc.jinja b/states/i3/files/xinitrc.jinja
new file mode 100755 (executable)
index 0000000..0c30100
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# ~/.xinitrc
+#
+# Executed by startx (run your window manager from here)
+
+
+if [ -d /etc/X11/xinit/xinitrc.d ]; then
+  for f in /etc/X11/xinit/xinitrc.d/*; do
+    [ -x "$f" ] && . "$f"
+  done
+  unset f
+fi
+
+# Source ~/.xprofile
+[ -f /etc/xprofile ] && . /etc/xprofile
+[ -f ~/.xprofile ] && . ~/.xprofile
+case $HOSTNAME in
+  barium)
+    exec i3
+    ;;
+  *)
+    exec startxfce4
+    ;;
+esac
+
+# vim: set expandtab tabstop=2 smarttab:
diff --git a/states/i3/files/xprofile.jinja b/states/i3/files/xprofile.jinja
new file mode 100755 (executable)
index 0000000..11877f6
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Load .Xresources
+xrdb -merge ~/.Xresources &> /dev/null
+if [ -f ~/.Xresources.$HOSTNAME ]; then
+  xrdb -merge ~/.Xresources.$HOSTNAME &> /dev/null
+fi
+
+# Set keyboard layout
+case $HOSTNAME in
+  barium)
+    setxkbmap -variant colemak us
+    xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L"
+    xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R"
+    xmodmap -e "add Control = Control_L Control_R"
+    ;;
+  *)
+    setxkbmap -variant colemak gb
+    xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L"
+    xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R"
+    xmodmap -e "add Control = Control_L Control_R"
+    ;;
+esac
+
+# Set screen layout
+case $HOSTNAME in
+  barium)
+    xrandr --output DP-1 --mode 1920x1080 --pos 0x540
+    xrandr --output HDMI-1 --mode 3840x2160 --pos 1920x0
+    xrandr --output eDP-1 --mode 1920x1080 --pos 0x540
+    ;;
+  *)
+    ;;
+esac
+
+# Set java font option
+export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"
+
+feh --bg-scale ~/Pictures/background_1080_1.png&
+
+dunst&
+
+xset -b
+
+export QT_QPA_PLATFORM="xcb"
+
+# vim: set expandtab tabstop=2 smarttab: