]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add basic xfce config
authorMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 23 Jul 2020 15:08:58 +0000 (16:08 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Thu, 23 Jul 2020 15:08:58 +0000 (16:08 +0100)
states/xfce/arch.sls [new file with mode: 0644]
states/xfce/files/xinitrc [new file with mode: 0644]
states/xfce/files/xprofile [new file with mode: 0644]
states/xfce/init.sls [new file with mode: 0644]

diff --git a/states/xfce/arch.sls b/states/xfce/arch.sls
new file mode 100644 (file)
index 0000000..6e66e01
--- /dev/null
@@ -0,0 +1,17 @@
+install xfce:
+  pkg.installed:
+    - pkgs:
+      - thunar
+      - thunar-volman
+      - xfce4-appfinder
+      - xfce4-panel
+      - xfce4-power-manager
+      - xfce4-session
+      - xfce4-settings
+      - xfce4-terminal
+      - xfconf
+      - xfdesktop
+      - xfwm4
+      - xfwm4-themes
+      - dunst
+      - feh
diff --git a/states/xfce/files/xinitrc b/states/xfce/files/xinitrc
new file mode 100644 (file)
index 0000000..50daba1
--- /dev/null
@@ -0,0 +1,24 @@
+#!/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
+  *)
+    exec startxfce4
+    ;;
+esac
+
+# vim: set expandtab tabstop=2 smarttab:
diff --git a/states/xfce/files/xprofile b/states/xfce/files/xprofile
new file mode 100644 (file)
index 0000000..86c965d
--- /dev/null
@@ -0,0 +1,41 @@
+#!/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)
+    ;;
+  *)
+    ;;
+esac
+
+# Set java font option
+export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"
+
+feh --bg-scale ~/Pictures/background_1080_1.png&
+
+exec dunst&
+
+xset -b
+
+# vim: set expandtab tabstop=2 smarttab:
diff --git a/states/xfce/init.sls b/states/xfce/init.sls
new file mode 100644 (file)
index 0000000..b85e1c3
--- /dev/null
@@ -0,0 +1,21 @@
+include:
+  - xfce.{{ grains['os']| lower }}
+  - conky
+  - font.pango-liberation-mono
+  - local.bin
+
+xprofile:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.xprofile
+    - source: salt://xfce/files/xprofile
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - mode: 750
+
+xinitrc:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.xinitrc
+    - source: salt://xfce/files/xinitrc
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - mode: 750