diff --git a/mpd/.config/mpd-notification.conf b/mpd/.config/mpd-notification.conf
new file mode 100644
index 0000000..aa9c058
--- /dev/null
+++ b/mpd/.config/mpd-notification.conf
@@ -0,0 +1,8 @@
+host = localhost
+port = 6600
+music-dir = /home/wball/Nextcloud/Music
+text-topic = Music
+text-play = Playing %t\nby %a\nfrom %A
+text-pause = Paused %t\nby %a\nfrom %A
+text-stop = Stopped playback
+timeout = 5
diff --git a/mpd/.config/mpd/mpd.conf b/mpd/.config/mpd/mpd.conf
new file mode 100644
index 0000000..bbb57e2
--- /dev/null
+++ b/mpd/.config/mpd/mpd.conf
@@ -0,0 +1,10 @@
+music_directory "~/Nextcloud/Music"
+playlist_directory "~/Nextcloud/Music/Playlists"
+
+auto_update "yes"
+restore_paused "yes"
+
+audio_output {
+ type "pipewire"
+ name "PipeWire output"
+}
diff --git a/river-classic/.config/river/bluetooth.sh b/river-classic/.config/river/bluetooth.sh
new file mode 100755
index 0000000..90b49ed
--- /dev/null
+++ b/river-classic/.config/river/bluetooth.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+case "$1" in
+ --connect)
+ notify-send 'bluetooth' 'Connecting to Headphones'
+ bluetoothctl connect "88:C9:E8:D7:60:85"
+ ;;
+ --disconnect)
+ notify-send 'bluetooth' 'Disconnecting Headphones'
+ bluetoothctl disconnect "88:C9:E8:D7:60:85"
+ ;;
+ *)
+ exit 1
+ ;;
+esac
diff --git a/river-classic/.config/river/init b/river-classic/.config/river/init
index 00588b5..0f98927 100755
--- a/river-classic/.config/river/init
+++ b/river-classic/.config/river/init
@@ -21,16 +21,15 @@ riverctl map normal $mod+Shift Return spawn $term
riverctl map normal $mod R span "bemenu-run -p launch"
riverctl map normal $mod Semicolon spawn "bemenu-run -p launch"
riverctl map normal $mod+Shift P spawn "$config/power_mode.sh"
-# riverctl map normal $mod+Shift P spawn "passmenu -p password"
riverctl map normal $mod BracketRight spawn "$browser"
riverctl map normal $mod T spawn "$email"
riverctl map normal $mod Z spawn "$books"
riverctl map normal $mod Y spawn "$papers"
riverctl map normal $mod E spawn "$emacs"
-riverctl map normal $mod+Control O spawn "swaylock"
-riverctl map normal $mod B spawn "bluetoothctl connect 88:C9:E8:D7:60:85"
-riverctl map normal $mod+Shift B spawn "bluetoothctl disconnect 88:C9:E8:D7:60:85"
-riverctl map normal $mod+Control S spawn "$config/screenshot.sh clip"
+riverctl map normal $mod+ctrl O spawn "swaylock"
+riverctl map normal $mod B spawn "$config/bluetooth.sh --connect"
+riverctl map normal $mod+Shift B spawn "$config/bluetooth.sh --disconnect"
+riverctl map normal $mod+ctrl S spawn "$config/screenshot.sh clip"
riverctl map normal $mod+Shift E spawn "$config/screenshot.sh menu"
# Close windows & exit wm
@@ -64,10 +63,10 @@ riverctl map normal $mod+Alt J move down 100
riverctl map normal $mod+Alt K move up 100
riverctl map normal $mod+Alt L move right 100
-riverctl map normal $mod+Alt+Control H snap left
-riverctl map normal $mod+Alt+Control J snap down
-riverctl map normal $mod+Alt+Control K snap up
-riverctl map normal $mod+Alt+Control L snap right
+riverctl map normal $mod+Alt+ctrl H snap left
+riverctl map normal $mod+Alt+ctrl J snap down
+riverctl map normal $mod+Alt+ctrl K snap up
+riverctl map normal $mod+Alt+ctrl L snap right
riverctl map normal $mod+Alt+Shift H resize horizontal -100
riverctl map normal $mod+Alt+Shift J resize vertical 100
@@ -85,8 +84,8 @@ do
riverctl map normal $mod $i set-focused-tags $tags
riverctl map normal $mod+Shift $i set-view-tags $tags
- riverctl map normal $mod+Control $i toggle-focused-tags $tags
- riverctl map normal $mod+Shift+Control $i toggle-view-tags $tags
+ riverctl map normal $mod+ctrl $i toggle-focused-tags $tags
+ riverctl map normal $mod+Shift+ctrl $i toggle-view-tags $tags
done
all_tags=$(((1 << 32) - 1))
@@ -98,10 +97,10 @@ riverctl map normal $mod Space toggle-float
riverctl map normal $mod F toggle-fullscreen
# change layout orientation
-riverctl map normal $mod+Control K send-layout-cmd rivertile "main-location top"
-riverctl map normal $mod+Control L send-layout-cmd rivertile "main-location right"
-riverctl map normal $mod+Control J send-layout-cmd rivertile "main-location bottom"
-riverctl map normal $mod+Control H send-layout-cmd rivertile "main-location left"
+riverctl map normal $mod+ctrl K send-layout-cmd rivertile "main-location top"
+riverctl map normal $mod+ctrl L send-layout-cmd rivertile "main-location right"
+riverctl map normal $mod+ctrl J send-layout-cmd rivertile "main-location bottom"
+riverctl map normal $mod+ctrl H send-layout-cmd rivertile "main-location left"
# passthrough mode
riverctl declare-mode passthrough
@@ -113,12 +112,12 @@ for mode in normal locked
do
riverctl map $mode None XF86Eject spawn 'eject -T'
- riverctl map $mode None XF86AudioRaiseVolume spawn "~/.config/river/volume.sh up 0.02"
- riverctl map $mode None XF86AudioLowerVolume spawn "~/.config/river/volume.sh down 0.02"
- riverctl map $mode Shift XF86AudioRaiseVolume spawn "~/.config/river/volume.sh up 0.01"
- riverctl map $mode Shift XF86AudioLowerVolume spawn "~/.config/river/volume.sh down 0.01"
- riverctl map $mode Control XF86AudioRaiseVolume spawn "~/.config/river/volume.sh up 0.10"
- riverctl map $mode Control XF86AudioLowerVolume spawn "~/.config/river/volume.sh down 0.10"
+ riverctl map $mode None XF86AudioRaiseVolume spawn "$config/volume.sh up 0.02"
+ riverctl map $mode None XF86AudioLowerVolume spawn "$config/volume.sh down 0.02"
+ riverctl map $mode Shift XF86AudioRaiseVolume spawn "$config/volume.sh up 0.01"
+ riverctl map $mode Shift XF86AudioLowerVolume spawn "$config/volume.sh down 0.01"
+ riverctl map $mode ctrl XF86AudioRaiseVolume spawn "$config/volume.sh up 0.10"
+ riverctl map $mode ctrl XF86AudioLowerVolume spawn "$config/volume.sh down 0.10"
riverctl map $mode None XF86AudioMute exec spawn "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
@@ -131,7 +130,7 @@ do
done
# "caffeine"
-riverctl map normal $mod+Control C spawn "$HOME/.config/river/toggle_caffeine.sh"
+riverctl map normal $mod+ctrl C spawn "$config/toggle_caffeine.sh"
# colors
riverctl background-color 0x1e1e2e
@@ -166,22 +165,18 @@ riverctl float-filter-add app-id blueman-manager
scratch_tag=$((1 << 20))
riverctl map normal $mod Slash toggle-focused-tags $scratch_tag
riverctl map normal $mod+Shift Slash set-view-tags $scratch_tag
-riverctl map normal $mod+Control Slash toggle-view-tags $scratch_tag
+riverctl map normal $mod+ctrl Slash toggle-view-tags $scratch_tag
riverctl map normal $mod S spawn "$term_float"
riverctl rule-add -app-id float float
# SSD (so GTK apps show border)
-riverctl rule-add -app-id firefox ssd
riverctl rule-add -app-id librewolf ssd
riverctl rule-add -app-id thunderbird ssd
-riverctl rule-add -app-id betterbird ssd
riverctl rule-add -app-id emacs ssd
riverctl rule-add -app-id gnucash ssd
riverctl rule-add -app-id pcmanfm ssd
riverctl rule-add -app-id steam ssd
-riverctl rule-add -app-id drracket ssd
riverctl rule-add -app-id org.pwmt.zathura ssd
-riverctl rule-add -app-id org.gnome.Boxes ssd
riverctl rule-add -app-id com.github.xournalpp.xournalpp ssd
# spawn stuff
@@ -207,14 +202,18 @@ emacs --daemon &
nextcloud &
# pianobar
-riverctl map normal $mod+Shift S spawn '~/.config/pianobar/change_station.sh'
-riverctl map normal $mod P spawn 'echo "p" > ~/.config/pianobar/ctl'
-riverctl map normal $mod C spawn '~/.config/pianobar/display_info.sh'
-riverctl map normal $mod N spawn 'echo "n" > ~/.config/pianobar/ctl'
+# riverctl map normal $mod+Shift S spawn '~/.config/pianobar/change_station.sh'
+# riverctl map normal $mod P spawn 'echo "p" > ~/.config/pianobar/ctl'
+# riverctl map normal $mod N spawn 'echo "n" > ~/.config/pianobar/ctl'
+# riverctl map normal $mod C spawn '~/.config/pianobar/display_info.sh'
+riverctl map normal $mod P spawn 'mpc toggle'
+riverctl map normal $mod+Shift S spawn "$config/music_command.sh --playlist"
+riverctl map normal $mod+ctrl S spawn "$config/music_command.sh --song"
+riverctl map normal $mod N spawn 'mpc next'
# swayidle
pgrep swayidle || swayidle -w \
- timeout 300 '$HOME/.config/river/timeout.sh' \
+ timeout 300 "$config/timeout.sh" \
before-sleep 'swaylock -f -c 000000' &
# gnome-keyring (needed for nextcloud to remember login)
diff --git a/river-classic/.config/river/music_commands.sh b/river-classic/.config/river/music_commands.sh
new file mode 100755
index 0000000..c7f62ce
--- /dev/null
+++ b/river-classic/.config/river/music_commands.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+dmenu="bemenu -p playlist --center --list 20 down --width-factor 0.5 --border 2 --bdr #f6c2e7"
+
+case "$1" in
+ --playlist)
+ choice=$(mpc lsplaylists | $dmenu)
+
+ if [[ -n $choice ]]; then
+ mpc clear
+ mpc load $choice
+ mpc shuffle
+ mpc next
+ mpc play
+ fi
+ ;;
+ --song)
+ choice=$(mpc listall | $dmenu)
+ echo $choice
+
+ if [[ -n $choice ]]; then
+ mpc add "$choice"
+ mpc searchplay "$choice"
+ fi
+ ;;
+ *)
+ exit 1
+ ;;
+esac
diff --git a/zsh/.config/zsh/.zprofile b/zsh/.config/zsh/.zprofile
index f76e120..b750927 100644
--- a/zsh/.config/zsh/.zprofile
+++ b/zsh/.config/zsh/.zprofile
@@ -10,6 +10,7 @@ export BEMENU_OPTS='--ignorecase --fb "#1e1e2e" --ff "#cdd6f4" --nb "#1e1e2e" --
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_MUSIC_DIR="$HOME/Nextcloud/Music"
# General environment variables
export EDITOR=nvim