aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/kanshi/config4
-rwxr-xr-x.config/river/autostart.sh37
-rwxr-xr-x.config/river/init206
-rw-r--r--.config/yambar/config.yml271
-rwxr-xr-x.config/yambar/scripts/brightnesscontrol44
-rwxr-xr-x.config/yambar/scripts/calendar.sh26
-rwxr-xr-x.config/yambar/scripts/date-time.sh12
-rwxr-xr-x.config/yambar/scripts/dater.sh26
-rwxr-xr-x.config/yambar/scripts/idleinhibit.sh36
-rwxr-xr-x.config/yambar/scripts/network.sh48
-rwxr-xr-x.config/yambar/scripts/scratchpad-indicator.sh18
-rwxr-xr-x.config/yambar/scripts/void-updates.sh38
-rwxr-xr-x.config/yambar/scripts/volumecontrol107
-rwxr-xr-x.config/yambar/scripts/yambar-start.sh18
14 files changed, 889 insertions, 2 deletions
diff --git a/.config/kanshi/config b/.config/kanshi/config
index 70c1ced..b617c94 100644
--- a/.config/kanshi/config
+++ b/.config/kanshi/config
@@ -1,10 +1,10 @@
profile Laptop {
output eDP-1 position 0,0 mode 1920x1080
- #exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh"
+ exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh"
}
profile Dock {
output HDMI-A-1 position 0,0 mode 1920x1080
output eDP-1 position 1920,0 mode 1920x1080
- #exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh"
+ exec sh -c "$HOME/.config/yambar/scripts/yambar-start.sh"
}
diff --git a/.config/river/autostart.sh b/.config/river/autostart.sh
new file mode 100755
index 0000000..758fefa
--- /dev/null
+++ b/.config/river/autostart.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Authentication dialog
+
+pkill -f /usr/libexec/polkit-gnome-authentication-agent-1
+/usr/libexec/polkit-gnome-authentication-agent-1 &
+
+# Kill any existing pipewire / wireplumber daemons and only then try to start a new set.
+
+pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
+dbus-run-session pipewire &> /dev/null &
+
+# Start xdg-desktop-portal-wlr
+
+pkill -f /usr/libexec/xdg-desktop-portal-wlr
+/usr/libexec/xdg-desktop-portal-wlr &
+
+# Start Kanshi which also starts Yambar
+pkill -f kanshi
+kanshi &
+
+pkill -f swaybg
+swaybg -m fill -i ~/.cache/wallpaper &
+
+pkill -f dunst
+dunst &
+
+pkill -f wlsunset
+wlsunset -l 57.4 -L -1.9 &
+
+export wallpaper='~/.cache/wallpaper'
+
+pkill -f swayidle
+swayidle -w \
+ timeout 300 'swaylock -f -i $wallpaper' \
+ timeout 600 'wlopm --off \*;swaylock -F -i ~/.cache/wallpaper' resume 'wlopm --on \*' \
+ before-sleep 'swaylock -f -i $wallpaper' &
diff --git a/.config/river/init b/.config/river/init
new file mode 100755
index 0000000..6997f1b
--- /dev/null
+++ b/.config/river/init
@@ -0,0 +1,206 @@
+#!/bin/sh
+
+# See the river(1), riverctl(1), and rivertile(1) man pages for complete
+# documentation.
+
+# Focus follows mouse
+riverctl focus-follows-cursor normal
+
+# Let the cursor follow focused screen
+riverctl set-cursor-warp on-focus-change
+
+# Atatch new windows at the bottom of the stack
+riverctl attach-mode bottom
+
+# Hide cursor
+riverctl hide-cursor timeout 5000
+riverctl hide-cursor when-typing enabled
+
+# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
+
+# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
+riverctl map normal Super Return spawn foot
+
+# Super+Q to close the focused view
+riverctl map normal Super Q close
+
+# Super+Shift+E to exit river
+riverctl map normal Super+Shift E exit
+
+# Launcher
+riverctl map normal Super D spawn "fuzzel"
+
+# Toggle waybar
+riverctl map normal Super B spawn "killall yambar || ~/.config/yambar/scripts/yambar-start.sh"
+
+# Power Menu
+riverctl map normal Control+Super P spawn "~/.local/bin/powermenu"
+
+# Super+J and Super+K to focus the next/previous view in the layout stack
+riverctl map normal Super J focus-view next
+riverctl map normal Super K focus-view previous
+
+# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
+# view in the layout stack
+riverctl map normal Super+Shift J swap next
+riverctl map normal Super+Shift K swap previous
+
+# Super+Period and Super+Comma to focus the next/previous output
+riverctl map normal Super Period focus-output next
+riverctl map normal Super Comma focus-output previous
+
+# Super+Shift+{Period,Comma} to send the focused view to the next/previous output
+riverctl map normal Super+Shift Period send-to-output next
+riverctl map normal Super+Shift Comma send-to-output previous
+
+# Super+Return to bump the focused view to the top of the layout stack
+# riverctl map normal Super Return zoom
+
+# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
+riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
+riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
+
+# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
+riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1"
+riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1"
+
+# Super+Alt+{H,J,K,L} to move views
+riverctl map normal Super+Alt H move left 100
+riverctl map normal Super+Alt J move down 100
+riverctl map normal Super+Alt K move up 100
+riverctl map normal Super+Alt L move right 100
+
+# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
+riverctl map normal Super+Alt+Control H snap left
+riverctl map normal Super+Alt+Control J snap down
+riverctl map normal Super+Alt+Control K snap up
+riverctl map normal Super+Alt+Control L snap right
+
+# Super+Alt+Shift+{H,J,K,L} to resize views
+riverctl map normal Super+Alt+Shift H resize horizontal -100
+riverctl map normal Super+Alt+Shift J resize vertical 100
+riverctl map normal Super+Alt+Shift K resize vertical -100
+riverctl map normal Super+Alt+Shift L resize horizontal 100
+
+# Super + Left Mouse Button to move views
+riverctl map-pointer normal Super BTN_LEFT move-view
+
+# Super + Right Mouse Button to resize views
+riverctl map-pointer normal Super BTN_RIGHT resize-view
+
+# Super + Middle Mouse Button to toggle float
+riverctl map-pointer normal Super BTN_MIDDLE toggle-float
+
+for i in $(seq 1 9)
+do
+ tags=$((1 << ($i - 1)))
+
+ # Super+[1-9] to focus tag [0-8]
+ riverctl map normal Super $i set-focused-tags $tags
+
+ # Super+Shift+[1-9] to tag focused view with tag [0-8]
+ riverctl map normal Super+Shift $i set-view-tags $tags
+
+ # Super+Control+[1-9] to toggle focus of tag [0-8]
+ riverctl map normal Super+Control $i toggle-focused-tags $tags
+
+ # Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
+ riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
+done
+
+# Super+0 to focus all tags
+# Super+Shift+0 to tag focused view with all tags
+all_tags=$(((1 << 32) - 1))
+riverctl map normal Super 0 set-focused-tags $all_tags
+riverctl map normal Super+Shift 0 set-view-tags $all_tags
+
+# Super+Space to toggle float
+riverctl map normal Super Space toggle-float
+
+# Super+F to toggle fullscreen
+riverctl map normal Super F toggle-fullscreen
+
+# Super+{Up,Right,Down,Left} to change layout orientation
+riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
+riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
+riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
+riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
+
+# Declare a passthrough mode. This mode has only a single mapping to return to
+# normal mode. This makes it useful for testing a nested wayland compositor
+riverctl declare-mode passthrough
+
+# Super+F11 to enter passthrough mode
+riverctl map normal Super F11 enter-mode passthrough
+
+# Super+F11 to return to normal mode
+riverctl map passthrough Super F11 enter-mode normal
+
+# Take a screenshot of the active output
+riverctl map normal None Print spawn "grim -o $(lswt -j | jq -c '.[] | select(.activated) | .outputs' | awk -F'"' '{print $2}') -t jpeg ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg"
+
+# Take a screenshot of the selected region
+riverctl map normal Super Print spawn 'grim -t jpeg -g "$(slurp)" ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg'
+
+# Take a screenshot and save it to the clipboard
+riverctl map normal Super+Shift Print spawn 'grim -g "$(slurp)" -| wl-copy && notify-send "Screenshot Clipped"'
+
+# The scratchpad will live on an unused tag. Which tags are used depends on your
+# config, but rivers default uses the first 9 tags.
+scratch_tag=$((1 << 20 ))
+
+# Toggle the scratchpad with Super+P
+riverctl map normal Super P toggle-focused-tags ${scratch_tag}
+
+# Send windows to the scratchpad with Super+Shift+P
+riverctl map normal Super+Shift P set-view-tags ${scratch_tag}
+
+# Set spawn tagmask to ensure new windows don't have the scratchpad tag unless
+# explicitly set.
+all_but_scratch_tag=$(( ((1 << 32) - 1) ^ $scratch_tag ))
+riverctl spawn-tagmask ${all_but_scratch_tag}
+
+# Various media key mapping examples for both normal and locked mode which do
+# not have a modifier
+for mode in normal locked
+do
+ # Control volume
+ riverctl map $mode None XF86AudioRaiseVolume spawn 'amixer sset Master 2%+'
+ riverctl map $mode None XF86AudioLowerVolume spawn 'amixer sset Master 2%-'
+ riverctl map $mode None XF86AudioMute spawn 'amixer set Master 1+ toggle'
+
+ # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
+ riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
+ riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
+ riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
+ riverctl map $mode None XF86AudioNext spawn 'playerctl next'
+
+ # Control screen backlight brightness with light (https://github.com/haikarainen/light)
+ riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5; light -O'
+ riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5; light -O'
+done
+
+# Set background and border color
+riverctl background-color 0x002b36
+riverctl border-color-focused 0x33ccff
+riverctl border-color-unfocused 0x595959
+
+# Set keyboard repeat rate
+riverctl set-repeat 50 300
+
+# auto starting apps
+bash $HOME/.config/river/autostart.sh
+
+# Make all views with an app-id that starts with "float" and title "foo" start floating.
+riverctl rule-add float -app-id 'float*' -title 'foo'
+
+# Make all views with app-id "bar" and any title use client-side decorations
+riverctl rule-add csd -app-id "bar"
+
+# Float mpv when it's started
+riverctl rule-add float -app-id 'mpv'
+riverctl rule-add csd -app-id 'libreoffice*'
+# Set the default layout generator to be rivertile and start it.
+# River will send the process group of the init executable SIGTERM on exit.
+riverctl default-layout rivertile
+rivertile -view-padding 5 -outer-padding 5 -main-ratio 0.5 &
diff --git a/.config/yambar/config.yml b/.config/yambar/config.yml
new file mode 100644
index 0000000..2c402fb
--- /dev/null
+++ b/.config/yambar/config.yml
@@ -0,0 +1,271 @@
+nerdfont: &nerdfont Symbols Nerd Font Mono:pixelsize=12
+gomono: &gomono GoMono Nerd Font Mono:pixelsize=12
+bg_default: &bg_default {stack: [{background: {color: 00000000}}, {underline: {size: 3, color: 98971aff}}]}
+
+std_underline: &std_underline {underline: { size: 5, color: 98c379ff}}
+
+bar:
+ font: *gomono
+ height: 20
+ location: top
+ right-spacing: 8
+ right-margin: 10
+ border:
+ top-margin: 5
+ left-margin: 10
+ right-margin: 10
+ color: d8dee900
+ background: 000000aa
+ foreground: ffffffff
+
+ left:
+ # - i3:
+ # # persistent: [1, 2, 3, 4, 5, 6, 7, 8, 9]
+ # sort: ascending
+ # anchors:
+ # - string: &i3_common {margin: 5, on-click: "~/.config/waybar/scripts/dispatch.sh {name}"}
+ # - string: &default {<<: *i3_common, text: "{name}", margin: 10}
+ # - focused: &focused
+ # deco: {stack: [ *bg_default]}
+ # - invisible: &invisible {foreground: 888888ff}
+ # - urgent: &urgent
+ # deco: {stack: [background: {color: eb6e67ff}, <<: *std_underline]}
+ # - map: &i3_mode
+ # default:
+ # - string:
+ # margin: 5
+ # text: "{mode}"
+ # deco: {background: {color: cc421dff}}
+ # - empty: {right-margin: 0}
+ # conditions:
+ # mode == default: {empty: {}}
+ # content:
+ # "":
+ # map:
+ # conditions:
+ # state == focused: {string: {<<: [*default, *focused]}}
+ # state == unfocused: {string: {<<: *default}}
+ # state == invisible: {string: {<<: [*default, *invisible]}}
+ # state == urgent: {string: {<<: [*default, *urgent]}}
+ #
+ # current:
+ # map:
+ # left-margin: 7
+ # conditions:
+ # application == "":
+ # - map: {<<: *i3_mode}
+ # - string: {text: "{title}"}
+ # default:
+ # list:
+ # spacing: 0
+ # items:
+ # - map: {<<: *i3_mode}
+ - river:
+ anchors:
+ - base: &river_base
+ left-margin: 10
+ right-margin: 10
+ default: {string: {text: , font: *gomono}}
+ conditions:
+ id == 1: {string: {text: 1, font: *gomono}}
+ id == 2: {string: {text: 2, font: *gomono}}
+ id == 3: {string: {text: 3, font: *gomono}}
+ id == 4: {string: {text: 4, font: *gomono}}
+ id == 5: {string: {text: 5, font: *gomono}}
+ id == 6: {string: {text: 6, font: *gomono}}
+ id == 7: {string: {text: 7, font: *gomono}}
+ id == 8: {string: {text: 8, font: *gomono}}
+ id == 9: {string: {text: 9, font: *gomono}}
+ # id == 21: {string: {text: "Scratchpad", font: *gomono}}
+
+ content:
+ map:
+ on-click:
+ left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
+ right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
+ middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
+ conditions:
+ state == urgent:
+ map:
+ <<: *river_base
+ deco: {background: {color: D08770ff}}
+ state == focused:
+ map:
+ <<: *river_base
+ deco: *bg_default
+ state == visible && ~occupied:
+ map:
+ <<: *river_base
+ state == visible && occupied:
+ map:
+ <<: *river_base
+ deco: *bg_default
+ state == unfocused:
+ map:
+ <<: *river_base
+ state == invisible && ~occupied: {empty: {}}
+ state == invisible && occupied:
+ map:
+ <<: *river_base
+ deco: {underline: {size: 3, color: 00000000}}
+
+ center:
+ - script:
+ path: ~/.config/yambar/scripts/dater.sh
+ args: []
+ content:
+ string:
+ margin: 0
+ text: "{date}"
+ on-click: sh -c "~/.config/yambar/scripts/calendar.sh show"
+ - clock:
+ content:
+ - string:
+ margin: 0
+ text: "{time}"
+
+ right:
+ - script:
+ path: ~/.config/yambar/scripts/void-updates.sh
+ args: []
+ content:
+ string:
+ margin: 0
+ text: "{updates}"
+ font: *nerdfont
+ foreground: 98971aff
+ on-click: sh -c "~/.config/yambar/scripts/void-updates.sh update"
+ - script:
+ path: ~/.config/yambar/scripts/idleinhibit.sh
+ args: []
+ content:
+ string:
+ margin: 0
+ text: "{idleinhibit}"
+ font: *nerdfont
+ on-click: sh -c "~/.config/yambar/scripts/idleinhibit.sh toggle"
+ - sway-xkb:
+ identifiers:
+ - 1:1:AT_Translated_Set_2_keyboard
+ spacing: 5
+ content: {string: {text: "{layout}"}}
+ - pipewire:
+ anchors:
+ volume: &volume
+ conditions:
+ muted:
+ string:
+ text: "0%"
+ on-click:
+ middle: sh -c "amixer set Master 1+ toggle"
+ ~muted:
+ string:
+ text: "{cubic_volume}%"
+ on-click:
+ left: sh -c "amixer sset Master 2%-"
+ middle: sh -c "amixer set Master 1+ toggle"
+ right: sh -c "amixer sset Master 2%+"
+ content:
+ list:
+ items:
+ - map:
+ conditions:
+ type == "sink":
+ map:
+ conditions:
+ icon == "audio-headset-bluetooth":
+ string: {text: "󰋋", font: *nerdfont}
+ muted: {string: {text: "󰝟", font: *nerdfont}}
+ default:
+ - ramp:
+ tag: cubic_volume
+ items:
+ - string: {text: "󰕿", font: *nerdfont}
+ - string: {text: "󰖀", font: *nerdfont}
+ - string: {text: "󰕾", font: *nerdfont}
+ type == "source":
+ - string: {text: "", font: *nerdfont, left-margin: 5}
+ - map:
+ <<: *volume
+ - backlight:
+ name: amdgpu_bl0
+ content: [ string: {text: , font: *nerdfont}, string: {text: "{percent}%", on-click: { left: sh -c "light -U 5", right: sh -c "light -A 5"}}]
+ - network:
+ name: enp5s0
+ content:
+ map:
+ conditions:
+ state == down: {string: {text: 󰲜, font: *nerdfont, foreground: ffffffff}}
+ ~carrier: {empty: {}}
+ carrier:
+ map:
+ default: {string: {text: 󰈀, font: *nerdfont, foreground: ffffffff}}
+ conditions:
+ state == up && ipv4 != "": {string: {text: 󰈀, font: *nerdfont}}
+ - network:
+ name: wlp3s0
+ poll-interval: 1000
+ content:
+ map:
+ default: {string: {text: , font: *nerdfont, foreground: ffffff66}}
+ conditions:
+ state == down: {string: {text: , font: *nerdfont, foreground: ffffffff}}
+ state == up:
+ map:
+ default:
+ - string: {text: , font: *nerdfont}
+ - string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s"}
+
+ conditions:
+ ipv4 == "":
+ - string: {text: , font: *nerdfont, foreground: ffffff66}
+ - string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: ffffff66}
+ - battery:
+ name: BAT0
+ poll-interval: 10000
+ anchors:
+ discharging: &discharging
+ list:
+ items:
+ - ramp:
+ tag: capacity
+ items:
+ - string: {text: , foreground: ff0000ff, font: *nerdfont}
+ - string: {text: , foreground: ffa600ff, font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , font: *nerdfont}
+ - string: {text: , foreground: ffffffff, font: *nerdfont}
+ - string: {text: "{capacity}% {estimate}"}
+ content:
+ map:
+ conditions:
+ state == unknown:
+ <<: *discharging
+ state == discharging:
+ <<: *discharging
+ state == charging:
+ - string: {text: , foreground: ffffffff, font: *nerdfont}
+ - string: {text: "{capacity}% {estimate}"}
+ state == full:
+ - string: {text: , foreground: ffffffff, font: *nerdfont}
+ - string: {text: "{capacity}% full"}
+ state == "not charging":
+ - ramp:
+ tag: capacity
+ items:
+ - string: {text:  , foreground: ff0000ff, font: *nerdfont}
+ - string: {text:  , foreground: ffa600ff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text:  , foreground: ffffffff, font: *nerdfont}
+ - string: {text: "{capacity}%"}
diff --git a/.config/yambar/scripts/brightnesscontrol b/.config/yambar/scripts/brightnesscontrol
new file mode 100755
index 0000000..718cb05
--- /dev/null
+++ b/.config/yambar/scripts/brightnesscontrol
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# You can call this script like this:
+# brightnessControl up
+# brightnessControl down
+
+# Script inspired by these wonderful people:
+# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
+# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
+
+function send_notification {
+ icon=/usr/share/icons/Papirus-Dark/16x16/actions/brightnesssettings.svg
+ brightness=$(light -G)
+ brightness=$(echo "$brightness" | awk '{print ($0-int($0)<0.499)?int($0):int($0)+1}')
+ # Make the bar with the special character ─ (it's not dash -)
+ # https://en.wikipedia.org/wiki/Box-drawing_character
+ bar=$(seq -s "─" 0 $((brightness / 10 )) | sed 's/[0-9]//g')
+ #brightness=$((brightness *100 / 255 ))
+ #echo $bar
+ #echo $test
+ # Send the notification
+ notify-send -i "$icon" -r 5555 -u normal "$bar $brightness"
+}
+
+case $1 in
+ up)
+ # increase the backlight by 5%
+ light -A 5
+ send_notification
+ #canberra-gtk-play -i audio-volume-change
+ ;;
+ down)
+ # decrease the backlight by 5%
+ light -U 5
+ send_notification
+ #canberra-gtk-play -i audio-volume-change
+ ;;
+ *)
+ brightness=$(light -G)
+ brightness=$(echo "$brightness" | awk '{print ($0-int($0)<0.499)?int($0):int($0)+1}')
+ icon="󰃞"
+ printf "%s" "$icon $brightness" "%"
+ ;;
+esac
diff --git a/.config/yambar/scripts/calendar.sh b/.config/yambar/scripts/calendar.sh
new file mode 100755
index 0000000..d066cf8
--- /dev/null
+++ b/.config/yambar/scripts/calendar.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Calendar script
+
+function ShowCalendar() {
+ dunstify -i "calendar" "  Calendar" "$(cal --color=always | sed "s/..7m/<b><span color=\"#fabd2f\">/;s/..27m/<\/span><\/b>/")" -r 124
+}
+
+function EditCalendar() {
+ echo
+}
+
+case "$1" in
+ show)
+ ShowCalendar
+ ;;
+
+ edit)
+ EditCalendar
+ ;;
+
+ *)
+ echo $"Usage: ${0##*/} {show|edit}"
+ exit 1
+
+esac
diff --git a/.config/yambar/scripts/date-time.sh b/.config/yambar/scripts/date-time.sh
new file mode 100755
index 0000000..6968cec
--- /dev/null
+++ b/.config/yambar/scripts/date-time.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+DaySuffix() {
+ case `date +%-d` in
+ 1|21|31) echo "st";;
+ 2|22) echo "nd";;
+ 3|23) echo "rd";;
+ *) echo "th";;
+ esac
+}
+date=$(date "+%A %-d`DaySuffix` %B %Y - %H:%M")
+icon=""
+printf "%s" "$date"
diff --git a/.config/yambar/scripts/dater.sh b/.config/yambar/scripts/dater.sh
new file mode 100755
index 0000000..00d4b7e
--- /dev/null
+++ b/.config/yambar/scripts/dater.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+
+while true; do
+number=$(date +'%d')
+
+case $number in
+ 1*)extension=th;;
+ *1)extension=st;;
+ *2)extension=nd;;
+ *3)extension=rd;;
+ *)extension=th;;
+esac
+
+date=$(date +"%A $(printf ${number##0}$extension) %B %Y -")
+
+echo "date|string|$date"
+echo ""
+
+hour=$(date +'%H')
+minute=$(date +'%M')
+
+second=$(expr $hour \* 3600 + $minute \* 60)
+
+sleep "$second"
+done
diff --git a/.config/yambar/scripts/idleinhibit.sh b/.config/yambar/scripts/idleinhibit.sh
new file mode 100755
index 0000000..90dfcb2
--- /dev/null
+++ b/.config/yambar/scripts/idleinhibit.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# River swayidle toggle
+function toggle {
+if pgrep "swayidle" > /dev/null
+then
+ pkill swayidle
+ notify-send -r 5556 -u normal " Swayidle Inactive"
+else
+ swayidle -w \
+ timeout 300 'swaylock -f -i ~/.cache/wallpaper' \
+ timeout 600 'wlopm --off \*;swaylock -F -i ~/.cache/wallpaper' resume 'wlopm --on \*' \
+ before-sleep 'swaylock -f -i $wallpaper' &
+ notify-send -r 5556 -u normal " Swayidle Active"
+fi
+}
+
+case $1 in
+ toggle)
+ toggle
+ ;;
+ *)
+ while true; do
+ if pgrep "swayidle" > /dev/null
+ then
+ icon=""
+ else
+ icon=""
+ fi
+ echo "idleinhibit|string|$icon"
+ echo ""
+ sleep 1
+ done
+ ;;
+esac
+exit 0
diff --git a/.config/yambar/scripts/network.sh b/.config/yambar/scripts/network.sh
new file mode 100755
index 0000000..73338f9
--- /dev/null
+++ b/.config/yambar/scripts/network.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# This script requires dnsutils aka bind to fetch the WAN IP address
+
+# Shows the connections names
+# nmcli connection show --active | grep 'ethernet' | awk '{ print $1 }' FS=' '
+# nmcli connection show --active | grep 'wifi' | awk '{ print $1 }' FS=' '
+
+# Show ethernet interface name
+# nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' '
+
+# Show wifi interface name
+# nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' '
+
+function ShowInfo {
+ if [ "$(nmcli connection show --active | grep -oh "\w*ethernet\w*")" == "ethernet" ]; then
+ wan="$(dig +short myip.opendns.com @resolver1.opendns.com)"
+ connection="$(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' '): $(nmcli connection show --active | grep 'ethernet' | awk '{ print $1 }' FS=' ') - $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'ethernet' | awk '{ print $6 }' FS=' ') | awk '{print $2}' FS='[:/]')
+WAN IP: $wan"
+ elif [ "$(nmcli connection show --active | grep -oh "\w*wifi\w*")" == "wifi" ]; then
+ wan="$(dig +short myip.opendns.com @resolver1.opendns.com)"
+ connection="$(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' '): $(nmcli connection show --active | grep 'wifi' | awk '{ print $1 }' FS=' ') - $(nmcli -t -f IP4.ADDRESS dev show $(nmcli connection show --active | grep 'wifi' | awk '{ print $4 }' FS=' ') | awk '{print $2}' FS='[:/]')
+WAN IP: $wan"
+ else
+ connection="No active connection."
+ fi
+}
+
+function IconUpdate() {
+ if [ "$(nmcli connection show --active | grep -oh "\w*ethernet\w*")" == "ethernet" ]; then
+ icon="󰈀"
+ elif [ "$(nmcli connection show --active | grep -oh "\w*wifi\w*")" == "wifi" ]; then
+ icon=""
+ else
+ icon="󰲜"
+ fi
+}
+
+ShowInfo
+IconUpdate
+
+text="$icon"
+
+tooltip="$(echo "$connection" | sed -z 's/\n/\\n/g')"
+tooltip=${tooltip::-2}
+
+echo "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}"
+exit 0
diff --git a/.config/yambar/scripts/scratchpad-indicator.sh b/.config/yambar/scripts/scratchpad-indicator.sh
new file mode 100755
index 0000000..05ba3b1
--- /dev/null
+++ b/.config/yambar/scripts/scratchpad-indicator.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+output="$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?)|recurse(.floating_nodes[]?)|select(.name == "__i3_scratch").floating_nodes[]|"`<b>"+.name+"`</b> - "+.app_id+" "+(.id|tostring)')"
+number="$(swaymsg -r -t get_tree | jq -r 'recurse(.nodes[]) | first(select(.name=="__i3_scratch")) | .floating_nodes | length')"
+
+if [ "$number" -gt 0 ]; then
+ text=" $number"
+else
+ text=""
+fi
+
+output="$(echo "$output" | sed -r 's/[&]+/and/g')" # Replace unprintable & character with the word 'and'
+tooltip=" Scratchpad\n\n"
+tooltip+="$(echo "$output" | sed -z 's/\n/\\n/g')"
+tooltip=${tooltip::-2}
+
+echo "{\"text\":\"$text\", \"tooltip\":\"$tooltip\"}"
+exit 0
diff --git a/.config/yambar/scripts/void-updates.sh b/.config/yambar/scripts/void-updates.sh
new file mode 100755
index 0000000..98b3e0b
--- /dev/null
+++ b/.config/yambar/scripts/void-updates.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+function update-yambar {
+echo "updates|string|"
+echo ""
+
+while true; do
+
+xbps-install -Mun 1> /tmp/void-updates
+updates="$(cat /tmp/void-updates | awk '{ print $1 }')"
+number="$(cat /tmp/void-updates | wc -l)"
+
+if [ "$number" -gt 0 ]; then
+ text=" $number"
+else
+ text=""
+fi
+
+echo "updates|string|$text"
+echo ""
+sleep 30m
+
+done
+}
+
+function update {
+ foot bash -c "sudo xbps-install -Suv"; sh -c "~/.config/yambar/scripts/yambar-start.sh"
+}
+
+case $1 in
+ update)
+ update
+ ;;
+ *)
+ update-yambar
+ ;;
+esac
+exit 0
diff --git a/.config/yambar/scripts/volumecontrol b/.config/yambar/scripts/volumecontrol
new file mode 100755
index 0000000..65b0082
--- /dev/null
+++ b/.config/yambar/scripts/volumecontrol
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+# You can call this script like this:
+# volumecontrol up
+# volumecontrol down
+# volumecontrol mute
+
+function get_volume {
+ amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
+}
+
+function is_mute {
+ amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off > /dev/null
+}
+
+function send_notification {
+ volume=$(get_volume)
+ # Make the bar with the special character ─ (it's not dash -)
+ # https://en.wikipedia.org/wiki/Box-drawing_character
+if [ "$volume" = "0" ]; then
+ icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-muted.png"
+notify-send -i "$icon_name" -r 5556 -u normal "$volume"
+ else
+ if [ "$volume" -lt "10" ]; then
+ icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-low.png"
+notify-send -i "$icon_name" -r 5556 -u normal "$volume"
+ else
+ if [ "$volume" -lt "30" ]; then
+ icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-low.png"
+ else
+ if [ "$volume" -lt "70" ]; then
+ icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-medium.png"
+ else
+ icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-high.png"
+ fi
+ fi
+ fi
+fi
+bar=$(seq -s "─" $(($volume/5)) | sed 's/[0-9]//g')
+# Send the notification
+notify-send -i "$icon_name" -r 5556 -u normal "$bar $volume"
+}
+
+case $1 in
+ up)
+ # Set the volume on (if it was muted)
+ amixer set Master on > /dev/null
+ # Up the volume (+ 2%)
+ amixer sset Master 2%+ > /dev/null
+ send_notification
+ canberra-gtk-play -i audio-volume-change
+ ;;
+ down)
+ amixer set Master on > /dev/null
+ amixer sset Master 2%- > /dev/null
+ send_notification
+ canberra-gtk-play -i audio-volume-change
+ ;;
+ mute)
+ # Toggle mute
+ amixer set Master 1+ toggle > /dev/null
+ if is_mute ; then
+ notify-send -i "/usr/share/icons/Adwaita/16x16/legacy/audio-volume-muted.png" -r 5556 -u normal "$bar Audio Muted"
+ else
+ send_notification
+ canberra-gtk-play -i audio-volume-change
+ fi
+ ;;
+ *)
+ volume="$(get_volume)"
+
+ if [[ $volume == "100" ]]; then
+ icon=""
+ elif [[ $volume -ge "89" && $volume -le "100" ]]; then
+ icon=""
+ elif [[ $volume -ge "79" && $volume -le "90" ]]; then
+ icon=""
+ elif [[ $volume -ge "69" && $volume -le "80" ]]; then
+ icon=""
+ elif [[ $volume -ge "59" && $volume -le "70" ]]; then
+ icon=""
+ elif [[ $volume -ge "49" && $volume -le "60" ]]; then
+ icon=""
+ elif [[ $volume -ge "39" && $volume -le "50" ]]; then
+ icon=""
+ elif [[ $volume -ge "29" && $volume -le "40" ]]; then
+ icon=""
+ elif [[ $volume -ge "19" && $volume -le "30" ]]; then
+ icon=""
+ elif [[ $volume -ge "9" && $volume -le "20" ]]; then
+ icon=""
+ elif [[ $volume -gt "0" && $volume -le "10" ]]; then
+ icon=""
+ elif [[ $volume -eq "0" ]]; then
+ icon=""
+ volume="M "
+ fi
+
+
+if is_mute; then
+ icon=""
+ volume="M "
+fi
+
+printf "%s" "$icon $volume%"
+ ;;
+esac
diff --git a/.config/yambar/scripts/yambar-start.sh b/.config/yambar/scripts/yambar-start.sh
new file mode 100755
index 0000000..064d984
--- /dev/null
+++ b/.config/yambar/scripts/yambar-start.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+killall yambar
+
+monitors=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }')
+total=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l)
+
+for monitor in ${monitors}; do
+ riverctl focus-output ${monitor}
+ # swaymsg focus output ${monitor}
+ yambar &
+ sleep 0.2
+done
+if [ "$total" -gt "1" ]; then
+ riverctl focus-output HDMI-A-1
+ # swaymsg focus output HDMI-A-1
+fi
+exit 0