diff options
author | Mattias Andrée <maandree@kth.se> | 2023-11-18 23:23:40 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-11-18 23:23:40 +0100 |
commit | 0f1df0db903ba576fd17b08197d3066af7a61e5f (patch) | |
tree | a59c04307b1382257afa3c3512ec3abadf7e0e47 /xmonad | |
parent | Use losetup -d instead of --detach and add clean up (diff) | |
download | dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.gz dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.bz2 dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.xz |
A lot of changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'xmonad')
-rw-r--r-- | xmonad/Makefile | 35 | ||||
-rw-r--r-- | xmonad/xinit | 32 |
2 files changed, 48 insertions, 19 deletions
diff --git a/xmonad/Makefile b/xmonad/Makefile index 2265823..527b602 100644 --- a/xmonad/Makefile +++ b/xmonad/Makefile @@ -1,25 +1,31 @@ .POSIX: -include ../common.mk XINITRC_ORDER = 80 +CC = gcc + install: xmonad-autofocus-output - $(CHECK_INSTALLED) xwallpaper - $(CHECK_INSTALLED) xcman - $(CHECK_INSTALLED) pdeath - $(CHECK_INSTALLED) mate-panel - -$(CHECK_INSTALLED) mate-settings-daemon + ../check-in-path xwallpaper + ../check-in-path xcman + ../check-in-path pdeath + ../check-in-path mate-panel + -../check-installed mate-settings-daemon mkdir -p -- ~/.config/X11/xinit/xinitrc.d - test ! -d ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad + test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad || \ + test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad ln -sf -- ~/.dotfiles/xmonad/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad - $(CHECK_INSTALLED) general-preprocessor - $(CHECK_INSTALLED) xpybar + ../check-installed general-preprocessor + ../check-in-path xpybar mkdir -p -- ~/.xmonad - test ! -d ~/.xmonad/xmonad.hs + test ! -e ~/.xmonad/xmonad.hs || test -L ~/.xmonad/xmonad.hs ln -sf -- ~/.dotfiles/xmonad/xmonad.hs ~/.xmonad/xmonad.hs - make xmonad.hs + $(MAKE) xmonad.hs mkdir -p ~/.local/bin - ln -sf -- ~/.dotfiles/xmonad/xmonad-autofocus-output ~/.local/bin + test ! -e ~/.local/bin/xmonad-autofocus-output || \ + test -L ~/.local/bin/xmonad-autofocus-output + ln -sf -- ~/.dotfiles/xmonad/xmonad-autofocus-output ~/.local/bin/xmonad-autofocus-output + test ! -e ~/.xmonad/xmonad-session-rc || test -L ~/.xmonad/xmonad-session-rc + ln -sf -- ~/.dotfiles/xmonad/xmonad-session-rc ~/.xmonad/xmonad-session-rc xmonad-autofocus-output: xmonad-autofocus-output.c $(CC) -o $@ $@.c -Wall -s -lX11 -lXtst @@ -27,14 +33,13 @@ xmonad-autofocus-output: xmonad-autofocus-output.c include xmonad.mk uninstall: + +! ../check-installed xmonad -unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad -rmdir -- ~/.config/X11/xinit/xinitrc.d -rmdir -- ~/.config/X11/xinit -rmdir -- ~/.config/X11 -rm -rf -- ~/.xmonad - -make clean + -+$(MAKE) clean clean: -rm -f xmonad.hs xmonad-autofocus-output - -.PHONY: install uninstall clean diff --git a/xmonad/xinit b/xmonad/xinit index bbb15f1..008f3f2 100644 --- a/xmonad/xinit +++ b/xmonad/xinit @@ -6,13 +6,27 @@ if test "${SESSION}" = xmonad; then # Tell Java if we are using a non-reparenting window manager export _JAVA_AWT_WM_NONREPARENTING=1 + # Use GTK2 theming in Qt applications + export QT_QPA_PLATFORMTHEME=gtk2 + # Start GTK2 settings daemon - if test ! "${NO_MATE}" = y && test -x /usr/lib/mate-settings-daemon/mate-settings-daemon; then - /usr/lib/mate-settings-daemon/mate-settings-daemon & - sleep 0.5 + if test ! "${NO_MATE}" = y; then + if test -x /usr/lib/mate-settings-daemon/mate-settings-daemon; then + /usr/lib/mate-settings-daemon/mate-settings-daemon & + sleep 0.5 + elif test -x /usr/bin/mate-settings-daemon; then + /usr/bin/mate-settings-daemon & + sleep 0.5 + elif test -x /usr/libexec/mate-settings-daemon; then + /usr/libexec/mate-settings-daemon & + sleep 0.5 + elif test -x /usr/libexec/mate-settings-daemon/mate-settings-daemon; then + /usr/libexec/mate-settings-daemon/mate-settings-daemon & + sleep 0.5 + fi fi - # Automatically focus output when mouse is moving in root window + # Automatically focus output when mouse is moving in root window pdeath HUP xmonad-autofocus-output & # Start composition manager @@ -21,6 +35,16 @@ if test "${SESSION}" = xmonad; then # Start application panel mate-panel & + # Start screensaver daemon work computers ## TODO not if in virtual machine or at home + if iswork; then + mate-screensaver & + fi + + # Start network manager applet if computer has WiFi + if test ! $(ifconfig | grep '^w' | wc -l) = 0; then + nm-applet & + fi + # Remove old session if test -f ~/.xmonad/xmonad.state; then rm -f -- ~/.xmonad/xmonad.state |