From 625ee5145757be6703c10caa398653d47bd6fc50 Mon Sep 17 00:00:00 2001
From: Tobias Reisinger <tobias@msrg.cc>
Date: Thu, 27 Feb 2020 22:43:20 +0100
Subject: [PATCH] add: add bspwm rules add: XDG_XXXXX_DIR config add: zathura
 config fix: launch of mpd and mopidy

---
 .config/bspwm/bspwmrc      |  5 +++--
 .config/mpd/mpd.conf       | 12 ++++++------
 .config/polybar/custom.ini |  2 +-
 .config/user-dirs.dirs     | 11 +++++++++++
 .config/zathura/zathurarc  |  4 ++++
 .profile                   |  8 +++++++-
 6 files changed, 32 insertions(+), 10 deletions(-)
 create mode 100644 .config/user-dirs.dirs
 create mode 100644 .config/zathura/zathurarc

diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index 64eed6e..36d17ff 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -28,13 +28,14 @@ bspc config gapless_monocle      true
 bspc config focus_follows_pointer true
 
 bspc rule -a 'firefox' desktop='web'
-bspc rule -a 'firefox:Toolkit' desktop='side-view' state='fullscreen'
+bspc rule -a 'firefox:Toolkit' follow='true' desktop='side-view' state='fullscreen'
 bspc rule -a 'TeamSpeak 3' desktop='voip'
 bspc rule -a 'discord' desktop='voip'
 bspc rule -a 'Evolution' desktop='messenger'
 bspc rule -a 'Riot' desktop='messenger'
-bspc rule -a 'Signal' desktop='messenger'
+bspc rule -a 'Signal' desktop='messenger' follow='true'
 bspc rule -a 'Steam' desktop='game'
+bspc rule -a 'Zathura' state='tiled'
 
 setxkbmap de
 
diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf
index d9c482d..68f92a8 100644
--- a/.config/mpd/mpd.conf
+++ b/.config/mpd/mpd.conf
@@ -1,11 +1,11 @@
 # Recommended location for database
-db_file            "~/.config/mpd/database"
+db_file            "$XDG_CONFIG_DIR/mpd/database"
 
 # Logs to systemd journal
 log_file           "syslog"
 
 # The music directory is by default the XDG directory, uncomment to amend and choose a different directory
-music_directory    "~/Music"
+music_directory    "$XDG_MUSIC_DIR"
 
 # Refresh the database whenever files in the music_directory are changed
 auto_update "yes"
@@ -14,10 +14,10 @@ auto_update "yes"
 restore_paused "yes"
 
 # Uncomment to enable the functionalities
-playlist_directory "~/.config/mpd/playlists"
-pid_file           "~/.config/mpd/pid"
-state_file         "~/.config/mpd/state"
-sticker_file       "~/.config/mpd/sticker.sql"
+playlist_directory "$XDG_CONFIG_DIR/mpd/playlists"
+pid_file           "$XDG_CONFIG_DIR/mpd/pid"
+state_file         "$XDG_CONFIG_DIR/mpd/state"
+sticker_file       "$XDG_CONFIG_DIR/mpd/sticker.sql"
 
 audio_output {
     type    "pulse"
diff --git a/.config/polybar/custom.ini b/.config/polybar/custom.ini
index a17fc2e..70dc81e 100644
--- a/.config/polybar/custom.ini
+++ b/.config/polybar/custom.ini
@@ -13,7 +13,7 @@
 [module/arch-updates]
     type = custom/script
     exec = $HOME/.config/polybar/scripts/arch-updates.sh
-    interval = 10
+    interval = 60
 
     format-prefix = " "
     format-prefix-foreground = ${colors.foreground-alt}
diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs
new file mode 100644
index 0000000..9bb433a
--- /dev/null
+++ b/.config/user-dirs.dirs
@@ -0,0 +1,11 @@
+XDG_DESKTOP_DIR="$HOME/desktop"
+XDG_DOWNLOAD_DIR="$HOME/downloads"
+XDG_TEMPLATES_DIR="$HOME/"
+XDG_PUBLICSHARE_DIR="$HOME/"
+XDG_DOCUMENTS_DIR="$HOME/documents"
+XDG_MUSIC_DIR="$HOME/music"
+XDG_PICTURES_DIR="$HOME/pictures"
+XDG_VIDEOS_DIR="$HOME/videos"
+XDG_CONFIG_DIR="$HOME/.config"
+XDG_CACHE_DIR="$HOME/.cache"
+XDG_DATA_DIR="$HOME/.local/share"
diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc
new file mode 100644
index 0000000..67bbbff
--- /dev/null
+++ b/.config/zathura/zathurarc
@@ -0,0 +1,4 @@
+set selection-clipboard clipboard
+set statusbar-home-tilde
+
+set guioptions ""
diff --git a/.profile b/.profile
index e7efdd7..f519cb0 100644
--- a/.profile
+++ b/.profile
@@ -9,7 +9,13 @@ then
     gpgconf --launch gpg-agent
 fi
 
-[ -x "$(command -v mpd)" ] && mpd &
+if [ -x "$(command -v mopidy)" ]
+then
+    mpd &
+else
+    if [ -x "$(command -v mpd)" ] && mopidy &
+fi
+
 [ -x "$(command -v ympd)" ] && ympd --webport 54594 &
 
 [ $SHELL = "/bin/bash" ] && source $HOME/.bashrc