aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-07-17 11:30:31 +0200
committerPatrick Spek <p.spek@tyil.nl>2021-08-14 11:59:40 +0200
commitca69a254f8351e0a23c86ee8075a33ec8c7e7503 (patch)
treee21013d177be70c254211c92fc95bd9ecebdb671 /.local
parent9f6c0fbbdbd0d60ac629f0c38effd97a3ff48b6b (diff)
Update X configs
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/chwp16
-rwxr-xr-x.local/bin/x19
-rw-r--r--.local/etc/x/xinit.d/awesome.rc5
-rw-r--r--.local/etc/x/xinit.d/ob.rc8
-rw-r--r--.local/etc/x/xinitrc42
5 files changed, 71 insertions, 19 deletions
diff --git a/.local/bin/chwp b/.local/bin/chwp
index c25078a..0bec61b 100755
--- a/.local/bin/chwp
+++ b/.local/bin/chwp
@@ -1,4 +1,4 @@
-#! /usr/bin/env sh
+#!/bin/sh
main()
{
@@ -55,18 +55,8 @@ make_pape()
xrandr -q | grep -F ' connected ' > "$monitorlist"
- while read -r monitor
+ for resolution in $CHWP_MONITORS
do
- if [ -f "$HOME/.local/etc/x/chwp-filter" ]
- then
- if printf "%s" "$monitor" | grep -qf "$HOME/.local/etc/x/chwp-filter"
- then
- printf "Filtering %s\n" "$monitor" >&2
- continue
- fi
- fi
-
- resolution="$(printf "%s" "$monitor" | grep -Eo '\b[[:digit:]]+x[[:digit:]]+')"
current_pape=$(get_pape "$resolution")
if [ "$current_pape" = "" ]
@@ -81,7 +71,7 @@ make_pape()
unset resolution
unset current_pape
- done < "$monitorlist"
+ done
# shellcheck disable=SC2046
# shellcheck disable=SC2086
diff --git a/.local/bin/x b/.local/bin/x
index 9c6e9f6..653cfb0 100755
--- a/.local/bin/x
+++ b/.local/bin/x
@@ -1,11 +1,12 @@
-#! /usr/bin/env sh
+#!/bin/sh
+# Return to homedir
cd || exit 3
# If an argument is given, check if we have an xinitrc for that
if [ -n "$1" ]
then
- if [ ! -f "$HOME/.config/xinit.d/$1.rc" ]
+ if [ ! -f "$HOME/.local/etc/x/xinit.d/$1.rc" ]
then
printf "%s\n" "no valid config for $1" >&2
exit 1
@@ -14,9 +15,15 @@ then
# Remove the old config
rm -f -- "$HOME/.xinitrc"
- # Create the new config
- cat -- "$HOME/.config/xinit.d/xinitrc" "$HOME/.config/xinit.d/$1.rc" \
- > "$HOME/.xinitrc"
+ # Add layout script, if one exists
+ if [ -f "$HOME/.local/etc/x/layout.sh" ]
+ then
+ cat "$HOME/.local/etc/x/layout.sh" >> "$HOME/.xinitrc"
+ fi
+
+ # Add the base configuration
+ cat -- "$HOME/.local/etc/x/xinitrc" "$HOME/.local/etc/x/xinit.d/$1.rc" \
+ >> "$HOME/.xinitrc"
fi
# Make sure the xinitrc exists, just in case
@@ -27,4 +34,4 @@ then
fi
# start the X session
-startx
+exec startx
diff --git a/.local/etc/x/xinit.d/awesome.rc b/.local/etc/x/xinit.d/awesome.rc
new file mode 100644
index 0000000..96a165c
--- /dev/null
+++ b/.local/etc/x/xinit.d/awesome.rc
@@ -0,0 +1,5 @@
+sxhkd &
+chwp &
+xcompmgr &
+
+exec dbus-launch --exit-with-session awesome
diff --git a/.local/etc/x/xinit.d/ob.rc b/.local/etc/x/xinit.d/ob.rc
new file mode 100644
index 0000000..36c86d7
--- /dev/null
+++ b/.local/etc/x/xinit.d/ob.rc
@@ -0,0 +1,8 @@
+sxhkd &
+chwp &
+
+xcompmgr &
+
+tint2 &
+
+exec dbus-launch --exit-with-session openbox-session
diff --git a/.local/etc/x/xinitrc b/.local/etc/x/xinitrc
new file mode 100644
index 0000000..77edd40
--- /dev/null
+++ b/.local/etc/x/xinitrc
@@ -0,0 +1,42 @@
+# start dbus if necessary
+[ -f "/etc/X11/xinit/xinitrc.d/80-dbus" ] && source /etc/X11/xinit/xinitrc.d/80-dbus
+
+# start polkit auth agent
+eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gpg)
+export GNOME_KEYRING_PID
+export GNOME_KEYRING_SOCKET
+export SSH_AUTH_SOCK
+
+# extend the fontpath
+xset +fp ~/.fonts/Terminus/BDF
+#xset +fp /usr/share/fonts/local
+
+# set the default mousepointer
+xsetroot -cursor_name left_ptr
+
+# load the .Xresources
+xrdb -merge ~/.Xresources
+
+# xkbmap options
+setxkbmap \
+ -layout us \
+ \
+ -option compose:menu \
+ -option caps:escape
+
+# add altgr
+xmodmap -e "keycode 108 = ISO_Level3_Shift"
+
+# Enable sound through PulseAudio
+pulseaudio --start
+
+# set a wallpaper
+chwp &
+
+# start background processes
+redshift -l 51.50:4.59 &
+dunst &
+sxhkd &
+
+# Start x11vnc
+x11vnc -display "$DISPLAY" &