diff --git a/pkg/tdpeuter/PKGBUILD b/pkg/tdpeuter/PKGBUILD index 4ad659a..cdecae8 100644 --- a/pkg/tdpeuter/PKGBUILD +++ b/pkg/tdpeuter/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Tibo De Peuter pkgbase=tdpeuter pkgname=(tdpeuter-base tdpeuter-dev tdpeuter-desktop) -pkgver=0.1.5 +pkgver=0.1.6 pkgrel=1 pkgdesc="Sysconfig for my systems" arch=(any) @@ -90,14 +90,16 @@ package_tdpeuter-desktop() { # Fonts depends+=( - awesome-terminal-fonts noto-fonts noto-fonts-cjk noto-fonts-emoji + otf-font-awesome ) # Tools depends+=( + duf neofetch vifm + wget zathura zathura-pdf-mupdf zellij ) diff --git a/pkg/tdpeuter/desktop.install b/pkg/tdpeuter/desktop.install index 13a9a0a..6a96b1d 100644 --- a/pkg/tdpeuter/desktop.install +++ b/pkg/tdpeuter/desktop.install @@ -29,13 +29,20 @@ pre_remove() { install_apps() { rm /var/lib/pacman/db.lck - pkgs=" betterbird-bin google-chrome hamsket-bin zenith " - pkgs+=" rstudio-desktop-bin sway-git swaylock-effects-git spotify " - pkgs+=" visual-studio-code-bin " + # Desktop + pkgs=" sway-git swaylock-effects-git " - # Jetbrains + # Socials & entertainment + pkgs+=" betterbird-bin hamsket-bin jellyfin-media-player spotify " + pkgs+=" zoom " + + # Coding pkgs+=" intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre " - pkgs+=" pycharm-professional jetbrains-fleet " + pkgs+=" jetbrains-fleet pycharm-professional rstudio-desktop-bin " + pkgs+=" visual-studio-code-bin " + + # Tools + pkgs+=" google-chrome zenith " # Skip these options="--sudoflags -A --answerclean None --answerdiff None " diff --git a/pkg/tdpeuter/pkg/tdpeuter-base/.BUILDINFO b/pkg/tdpeuter/pkg/tdpeuter-base/.BUILDINFO index bce92d0..d355427 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-base/.BUILDINFO +++ b/pkg/tdpeuter/pkg/tdpeuter-base/.BUILDINFO @@ -1,11 +1,11 @@ format = 2 pkgname = tdpeuter-base pkgbase = tdpeuter -pkgver = 0.1.5-1 +pkgver = 0.1.6-1 pkgarch = any -pkgbuild_sha256sum = 4eb1d3f0d65b95f381b49d64b21931587117b6260668f313d93ea2b629da4a3e +pkgbuild_sha256sum = ee8683179f60c20e680fe804ef258257c27af94e35b47554dc3a252379cdd10a packager = Unknown Packager -builddate = 1666994048 +builddate = 1667142191 builddir = /home/tdpeuter/projects/arch-pkgs/pkg/tdpeuter startdir = /home/tdpeuter/projects/arch-pkgs/pkg/tdpeuter buildtool = makepkg @@ -347,6 +347,7 @@ installed = hwloc-2.8.0-1-x86_64 installed = iana-etc-20221025-1-any installed = icu-72.1-1-x86_64 installed = imath-3.1.5-3-x86_64 +installed = imlib2-1.9.1-2-x86_64 installed = intellij-idea-ultimate-edition-2022.2.3-1-x86_64 installed = intellij-idea-ultimate-edition-jre-2022.2.3-1-x86_64 installed = iproute2-6.0.0-1-x86_64 @@ -400,6 +401,7 @@ installed = libelf-0.187-2-x86_64 installed = libepoxy-1.5.10-1-x86_64 installed = libevdev-1.13.0-1-x86_64 installed = libevent-2.1.12-2-x86_64 +installed = libexif-0.6.24-1-x86_64 installed = libffi-3.4.3-1-x86_64 installed = libfontenc-1.1.6-1-x86_64 installed = libgcrypt-1.10.1-1-x86_64 @@ -674,6 +676,7 @@ installed = sway-git-debug-r6980.8aa89dc2-1-x86_64 installed = swaybg-git-r123.deed2ed-1-x86_64 installed = swayidle-1.7.1-3-x86_64 installed = swaylock-effects-git-r403.4b54b85-1-x86_64 +installed = sxiv-26-1-x86_64 installed = sysfsutils-2.1.1-1-x86_64 installed = systemd-251.7-1-x86_64 installed = systemd-libs-251.7-1-x86_64 diff --git a/pkg/tdpeuter/pkg/tdpeuter-base/.MTREE b/pkg/tdpeuter/pkg/tdpeuter-base/.MTREE index 35a0c3d..ef8c833 100644 Binary files a/pkg/tdpeuter/pkg/tdpeuter-base/.MTREE and b/pkg/tdpeuter/pkg/tdpeuter-base/.MTREE differ diff --git a/pkg/tdpeuter/pkg/tdpeuter-base/.PKGINFO b/pkg/tdpeuter/pkg/tdpeuter-base/.PKGINFO index 7f5ebf7..62437cd 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-base/.PKGINFO +++ b/pkg/tdpeuter/pkg/tdpeuter-base/.PKGINFO @@ -2,10 +2,10 @@ # using fakeroot version 1.29 pkgname = tdpeuter-base pkgbase = tdpeuter -pkgver = 0.1.5-1 +pkgver = 0.1.6-1 pkgdesc = Sysconfig for my systems url = https://git.depeuter.tk/tdpeuter/arch-pkgs -builddate = 1666994048 +builddate = 1667142191 packager = Unknown Packager size = 0 arch = any diff --git a/pkg/tdpeuter/pkg/tdpeuter-desktop/.BUILDINFO b/pkg/tdpeuter/pkg/tdpeuter-desktop/.BUILDINFO index a5d01b3..2023dcd 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-desktop/.BUILDINFO +++ b/pkg/tdpeuter/pkg/tdpeuter-desktop/.BUILDINFO @@ -1,11 +1,11 @@ format = 2 pkgname = tdpeuter-desktop pkgbase = tdpeuter -pkgver = 0.1.5-1 +pkgver = 0.1.6-1 pkgarch = any -pkgbuild_sha256sum = 4eb1d3f0d65b95f381b49d64b21931587117b6260668f313d93ea2b629da4a3e +pkgbuild_sha256sum = ee8683179f60c20e680fe804ef258257c27af94e35b47554dc3a252379cdd10a packager = Unknown Packager -builddate = 1666994048 +builddate = 1667142191 builddir = /home/tdpeuter/projects/arch-pkgs/pkg/tdpeuter startdir = /home/tdpeuter/projects/arch-pkgs/pkg/tdpeuter buildtool = makepkg @@ -347,6 +347,7 @@ installed = hwloc-2.8.0-1-x86_64 installed = iana-etc-20221025-1-any installed = icu-72.1-1-x86_64 installed = imath-3.1.5-3-x86_64 +installed = imlib2-1.9.1-2-x86_64 installed = intellij-idea-ultimate-edition-2022.2.3-1-x86_64 installed = intellij-idea-ultimate-edition-jre-2022.2.3-1-x86_64 installed = iproute2-6.0.0-1-x86_64 @@ -400,6 +401,7 @@ installed = libelf-0.187-2-x86_64 installed = libepoxy-1.5.10-1-x86_64 installed = libevdev-1.13.0-1-x86_64 installed = libevent-2.1.12-2-x86_64 +installed = libexif-0.6.24-1-x86_64 installed = libffi-3.4.3-1-x86_64 installed = libfontenc-1.1.6-1-x86_64 installed = libgcrypt-1.10.1-1-x86_64 @@ -674,6 +676,7 @@ installed = sway-git-debug-r6980.8aa89dc2-1-x86_64 installed = swaybg-git-r123.deed2ed-1-x86_64 installed = swayidle-1.7.1-3-x86_64 installed = swaylock-effects-git-r403.4b54b85-1-x86_64 +installed = sxiv-26-1-x86_64 installed = sysfsutils-2.1.1-1-x86_64 installed = systemd-251.7-1-x86_64 installed = systemd-libs-251.7-1-x86_64 diff --git a/pkg/tdpeuter/pkg/tdpeuter-desktop/.INSTALL b/pkg/tdpeuter/pkg/tdpeuter-desktop/.INSTALL index 13a9a0a..6a96b1d 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-desktop/.INSTALL +++ b/pkg/tdpeuter/pkg/tdpeuter-desktop/.INSTALL @@ -29,13 +29,20 @@ pre_remove() { install_apps() { rm /var/lib/pacman/db.lck - pkgs=" betterbird-bin google-chrome hamsket-bin zenith " - pkgs+=" rstudio-desktop-bin sway-git swaylock-effects-git spotify " - pkgs+=" visual-studio-code-bin " + # Desktop + pkgs=" sway-git swaylock-effects-git " - # Jetbrains + # Socials & entertainment + pkgs+=" betterbird-bin hamsket-bin jellyfin-media-player spotify " + pkgs+=" zoom " + + # Coding pkgs+=" intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre " - pkgs+=" pycharm-professional jetbrains-fleet " + pkgs+=" jetbrains-fleet pycharm-professional rstudio-desktop-bin " + pkgs+=" visual-studio-code-bin " + + # Tools + pkgs+=" google-chrome zenith " # Skip these options="--sudoflags -A --answerclean None --answerdiff None " diff --git a/pkg/tdpeuter/pkg/tdpeuter-desktop/.MTREE b/pkg/tdpeuter/pkg/tdpeuter-desktop/.MTREE index ebd9b33..1728c05 100644 Binary files a/pkg/tdpeuter/pkg/tdpeuter-desktop/.MTREE and b/pkg/tdpeuter/pkg/tdpeuter-desktop/.MTREE differ diff --git a/pkg/tdpeuter/pkg/tdpeuter-desktop/.PKGINFO b/pkg/tdpeuter/pkg/tdpeuter-desktop/.PKGINFO index 0ee9166..683b340 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-desktop/.PKGINFO +++ b/pkg/tdpeuter/pkg/tdpeuter-desktop/.PKGINFO @@ -2,10 +2,10 @@ # using fakeroot version 1.29 pkgname = tdpeuter-desktop pkgbase = tdpeuter -pkgver = 0.1.5-1 +pkgver = 0.1.6-1 pkgdesc = Sysconfig for my systems url = https://git.depeuter.tk/tdpeuter/arch-pkgs -builddate = 1666994048 +builddate = 1667142191 packager = Unknown Packager size = 0 arch = any @@ -28,12 +28,14 @@ depend = firefox depend = qutebrowser depend = nextcloud-client depend = obsidian -depend = awesome-terminal-fonts depend = noto-fonts depend = noto-fonts-cjk depend = noto-fonts-emoji +depend = otf-font-awesome +depend = duf depend = neofetch depend = vifm +depend = wget depend = zathura depend = zathura-pdf-mupdf depend = zellij diff --git a/pkg/tdpeuter/pkg/tdpeuter-dev/.BUILDINFO b/pkg/tdpeuter/pkg/tdpeuter-dev/.BUILDINFO index 961f08e..2874700 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-dev/.BUILDINFO +++ b/pkg/tdpeuter/pkg/tdpeuter-dev/.BUILDINFO @@ -1,11 +1,11 @@ format = 2 pkgname = tdpeuter-dev pkgbase = tdpeuter -pkgver = 0.1.5-1 +pkgver = 0.1.6-1 pkgarch = any -pkgbuild_sha256sum = 4eb1d3f0d65b95f381b49d64b21931587117b6260668f313d93ea2b629da4a3e +pkgbuild_sha256sum = ee8683179f60c20e680fe804ef258257c27af94e35b47554dc3a252379cdd10a packager = Unknown Packager -builddate = 1666994048 +builddate = 1667142191 builddir = /home/tdpeuter/projects/arch-pkgs/pkg/tdpeuter startdir = /home/tdpeuter/projects/arch-pkgs/pkg/tdpeuter buildtool = makepkg @@ -347,6 +347,7 @@ installed = hwloc-2.8.0-1-x86_64 installed = iana-etc-20221025-1-any installed = icu-72.1-1-x86_64 installed = imath-3.1.5-3-x86_64 +installed = imlib2-1.9.1-2-x86_64 installed = intellij-idea-ultimate-edition-2022.2.3-1-x86_64 installed = intellij-idea-ultimate-edition-jre-2022.2.3-1-x86_64 installed = iproute2-6.0.0-1-x86_64 @@ -400,6 +401,7 @@ installed = libelf-0.187-2-x86_64 installed = libepoxy-1.5.10-1-x86_64 installed = libevdev-1.13.0-1-x86_64 installed = libevent-2.1.12-2-x86_64 +installed = libexif-0.6.24-1-x86_64 installed = libffi-3.4.3-1-x86_64 installed = libfontenc-1.1.6-1-x86_64 installed = libgcrypt-1.10.1-1-x86_64 @@ -674,6 +676,7 @@ installed = sway-git-debug-r6980.8aa89dc2-1-x86_64 installed = swaybg-git-r123.deed2ed-1-x86_64 installed = swayidle-1.7.1-3-x86_64 installed = swaylock-effects-git-r403.4b54b85-1-x86_64 +installed = sxiv-26-1-x86_64 installed = sysfsutils-2.1.1-1-x86_64 installed = systemd-251.7-1-x86_64 installed = systemd-libs-251.7-1-x86_64 diff --git a/pkg/tdpeuter/pkg/tdpeuter-dev/.MTREE b/pkg/tdpeuter/pkg/tdpeuter-dev/.MTREE index 95f6ffd..d435131 100644 Binary files a/pkg/tdpeuter/pkg/tdpeuter-dev/.MTREE and b/pkg/tdpeuter/pkg/tdpeuter-dev/.MTREE differ diff --git a/pkg/tdpeuter/pkg/tdpeuter-dev/.PKGINFO b/pkg/tdpeuter/pkg/tdpeuter-dev/.PKGINFO index d726688..2eae11b 100644 --- a/pkg/tdpeuter/pkg/tdpeuter-dev/.PKGINFO +++ b/pkg/tdpeuter/pkg/tdpeuter-dev/.PKGINFO @@ -2,10 +2,10 @@ # using fakeroot version 1.29 pkgname = tdpeuter-dev pkgbase = tdpeuter -pkgver = 0.1.5-1 +pkgver = 0.1.6-1 pkgdesc = Sysconfig for my systems url = https://git.depeuter.tk/tdpeuter/arch-pkgs -builddate = 1666994048 +builddate = 1667142191 packager = Unknown Packager size = 0 arch = any diff --git a/pkg/tdpeuter/tdpeuter-base-0.1.5-1-any.pkg.tar.zst b/pkg/tdpeuter/tdpeuter-base-0.1.5-1-any.pkg.tar.zst index 9626077..afbe351 100644 Binary files a/pkg/tdpeuter/tdpeuter-base-0.1.5-1-any.pkg.tar.zst and b/pkg/tdpeuter/tdpeuter-base-0.1.5-1-any.pkg.tar.zst differ diff --git a/pkg/tdpeuter/tdpeuter-base-0.1.6-1-any.pkg.tar.zst b/pkg/tdpeuter/tdpeuter-base-0.1.6-1-any.pkg.tar.zst new file mode 100644 index 0000000..6bdc8a3 Binary files /dev/null and b/pkg/tdpeuter/tdpeuter-base-0.1.6-1-any.pkg.tar.zst differ diff --git a/pkg/tdpeuter/tdpeuter-desktop-0.1.5-1-any.pkg.tar.zst b/pkg/tdpeuter/tdpeuter-desktop-0.1.5-1-any.pkg.tar.zst index 47595d7..e59fb2b 100644 Binary files a/pkg/tdpeuter/tdpeuter-desktop-0.1.5-1-any.pkg.tar.zst and b/pkg/tdpeuter/tdpeuter-desktop-0.1.5-1-any.pkg.tar.zst differ diff --git a/pkg/tdpeuter/tdpeuter-desktop-0.1.6-1-any.pkg.tar.zst b/pkg/tdpeuter/tdpeuter-desktop-0.1.6-1-any.pkg.tar.zst new file mode 100644 index 0000000..43224a2 Binary files /dev/null and b/pkg/tdpeuter/tdpeuter-desktop-0.1.6-1-any.pkg.tar.zst differ diff --git a/pkg/tdpeuter/tdpeuter-dev-0.1.5-1-any.pkg.tar.zst b/pkg/tdpeuter/tdpeuter-dev-0.1.5-1-any.pkg.tar.zst index 22157f9..e3a87d3 100644 Binary files a/pkg/tdpeuter/tdpeuter-dev-0.1.5-1-any.pkg.tar.zst and b/pkg/tdpeuter/tdpeuter-dev-0.1.5-1-any.pkg.tar.zst differ diff --git a/pkg/tdpeuter/tdpeuter-dev-0.1.6-1-any.pkg.tar.zst b/pkg/tdpeuter/tdpeuter-dev-0.1.6-1-any.pkg.tar.zst new file mode 100644 index 0000000..aeef34d Binary files /dev/null and b/pkg/tdpeuter/tdpeuter-dev-0.1.6-1-any.pkg.tar.zst differ diff --git a/pkg/tdpeuter/tdpeuter.db b/pkg/tdpeuter/tdpeuter.db index d19dcaf..096b843 100644 Binary files a/pkg/tdpeuter/tdpeuter.db and b/pkg/tdpeuter/tdpeuter.db differ diff --git a/pkg/tdpeuter/tdpeuter.db.tar.gz b/pkg/tdpeuter/tdpeuter.db.tar.gz index d19dcaf..096b843 100644 Binary files a/pkg/tdpeuter/tdpeuter.db.tar.gz and b/pkg/tdpeuter/tdpeuter.db.tar.gz differ diff --git a/pkg/tdpeuter/tdpeuter.db.tar.gz.old b/pkg/tdpeuter/tdpeuter.db.tar.gz.old index 365efe2..a7955be 100644 Binary files a/pkg/tdpeuter/tdpeuter.db.tar.gz.old and b/pkg/tdpeuter/tdpeuter.db.tar.gz.old differ diff --git a/pkg/tdpeuter/tdpeuter.files b/pkg/tdpeuter/tdpeuter.files index 26c06f1..0ee63b1 100644 Binary files a/pkg/tdpeuter/tdpeuter.files and b/pkg/tdpeuter/tdpeuter.files differ diff --git a/pkg/tdpeuter/tdpeuter.files.tar.gz b/pkg/tdpeuter/tdpeuter.files.tar.gz index 26c06f1..0ee63b1 100644 Binary files a/pkg/tdpeuter/tdpeuter.files.tar.gz and b/pkg/tdpeuter/tdpeuter.files.tar.gz differ diff --git a/pkg/tdpeuter/tdpeuter.files.tar.gz.old b/pkg/tdpeuter/tdpeuter.files.tar.gz.old index 0d7d99c..b608bdc 100644 Binary files a/pkg/tdpeuter/tdpeuter.files.tar.gz.old and b/pkg/tdpeuter/tdpeuter.files.tar.gz.old differ diff --git a/stow/_scripts/.scripts/cleandependencies.sh b/stow/_scripts/.scripts/cleandependencies.sh new file mode 100755 index 0000000..7fac670 --- /dev/null +++ b/stow/_scripts/.scripts/cleandependencies.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# Remove unused dependencies that are not explicitly installed +# Usage: [sudo] cleandependencies + +# Retrieve a list of all packages that are not explicitly installed and are not needed by anything else. +# Note that optional dependencies also do not get removed. +# function getList () { +# grep "Name\|Required By\|Optional For\|Install Reason" <<< $(pacman -Qi) | +# tr '\n' ';' | sed "s/$/\n/" | +# sed "s/ */ /g" | +# sed "s/Name/\nName/g" | +# sed "s/\(Name\|Required By\|Optional For\|Install Reason\) : //g" | +# grep "Installed as a dependency for another package" | +# grep "^[^;]*;None;None" | +# cut -f 1 -d ';' +# } ; export -f getList + +current_amount=$(pacman -Qdtq | wc -l) +# Keep looping while there are unusded dependencies. +# Stop when the next amount is the same, probably because the action was canceled. +while [[ ${current_amount} -ne 0 && ${current_amount} -ne ${previous_amount:=0} ]] ; do + previous_amount=${current_amount} + pacman -R $(pacman -Qdtq) + current_amount=$(pacman -Qdtq | wc -l) +done + diff --git a/stow/_scripts/.scripts/dnd.sh b/stow/_scripts/.scripts/dnd.sh new file mode 100755 index 0000000..5037511 --- /dev/null +++ b/stow/_scripts/.scripts/dnd.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Script to toggle Do not disturb mode for mako and dunst + +# Permanent memory +saved_state=0 + +# Toggle +if [[ ${saved_state} -eq 0 ]] ; then + ~/.scripts/notify.sh 'Hiding notifications' + sleep 5 + makoctl set-mode do-not-disturb + dunstctl set-paused true +else + makoctl set-mode default + dunstctl set-paused false + ~/.scripts/notify.sh 'Showing notifications' +fi + +# Update status in file +new_state=$(( (${saved_state} + 1) % 2 )) +sed -i "s/^saved_state=.*$/saved_state=${new_state}/" "${0}" + diff --git a/stow/_scripts/.scripts/focus.sh b/stow/_scripts/.scripts/focus.sh new file mode 100755 index 0000000..37f9bcd --- /dev/null +++ b/stow/_scripts/.scripts/focus.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Script to toggle black background to focus on sway + +# Get instances of swaybg, except for the 'standard' one. +list=$( pgrep swaybg | head -n -1 ) + +if [ -z "${list}" ] ; then + swaybg --mode=solid_color --color=#000000 & + # Give the previous command some time to execute + sleep .1 + swaymsg reload +else + # Clean up if already running + kill $( tr ' ' '\n' <<< ${list} ) +fi + diff --git a/stow/_scripts/.scripts/idle.sh b/stow/_scripts/.scripts/idle.sh new file mode 100755 index 0000000..46ff18a --- /dev/null +++ b/stow/_scripts/.scripts/idle.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Configuration of swayidle +# Just run the script + +# Kill previous instances to avoid clashing +pkill swayidle + +swayidle -w \ + timeout 600 \ + 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + timeout 1200 \ + 'systemctl suspend' \ + before-sleep 'swaymsg "output * dpms on"; swaylock' + # Screen needs to be turned back on or you will get a black screen after waking up again. + +# timeout 300 \ +# "~/.scripts/wander.sh" \ +# resume 'brightnessctl -r' \ diff --git a/stow/_scripts/.scripts/notify.sh b/stow/_scripts/.scripts/notify.sh new file mode 100755 index 0000000..faa63de --- /dev/null +++ b/stow/_scripts/.scripts/notify.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# Show system status in notification, or your own message +# Syntaxis: notify [-vb] [-t ] [-p ] [ <message>] + +# Requirements: +# - brightnessctl + +panic () { + >&2 echo "Syntaxis: notify [-vb] [-t <timeout>] [-p <value>] [<title> <message>]" + exit 1 +} + +# Get options +while getopts ":bvt:p:" options; do + case "${options}" in + b) + value=$( brightnessctl | grep -o "[0-9]*%" | tr -d '%' ) + title="Brightness: ${value}%" + category='sysinfo' + ;; + v) + # Get volume (don't use pamixer because that is way slower) + value=$( pactl get-sink-volume @DEFAULT_SINK@ \ + | cut -d '/' -f2 \ + | grep -o '[0-9]*%' \ + | tr -d '%' ) + title="Volume: ${value}%" + category='sysinfo' + + # If audio disabled, set value to zero. + if [ "$( pactl get-sink-mute @DEFAULT_SINK@ )" == "Mute: yes" ] ; then + title="Volume: ${value}% (Disabled)" + value=0 + fi + ;; + t) + timeout="${OPTARG}" + ;; + p) + value="${OPTARG}" + ;; + *) + panic + ;; + esac +done + +shift $((OPTIND - 1)) + +# Check arguments +if [ $# -gt 2 ] ; then + panic +elif [ $# -gt 0 ] ; then + title="${1}" + message="${2:-}" +fi + +# Build command string +arguments="" +if [[ ! -z "${category}" ]] ; then + arguments+=" -c ${category}" +fi +if [[ ! -z "${timeout}" ]] ; then + arguments+=" -t ${timeout}" +fi +if [[ ! -z "${value}" ]] ; then + arguments+=" -h int:value:${value}" +fi + +notify-send "${title}" "${message}" ${arguments} + diff --git a/stow/_scripts/.scripts/wander.sh b/stow/_scripts/.scripts/wander.sh new file mode 100755 index 0000000..4325164 --- /dev/null +++ b/stow/_scripts/.scripts/wander.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Toggle brightness to 'sleep' or 'awake', since brightnessctl does not support +# percentages of current amount. +# Just run the script + +current=$( brightnessctl get ) +# Doesn't have to be accurate so we can use built-in calculator. +brightnessctl -sq set $(( current / 10 * 3 )) + diff --git a/stow/_scripts/.scripts/wlsunset.sh b/stow/_scripts/.scripts/wlsunset.sh new file mode 100755 index 0000000..84a7d69 --- /dev/null +++ b/stow/_scripts/.scripts/wlsunset.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Script to disable for an hour or immediately continue wlsunset. 'Toggle' + +# Check if wlsunset is still running +pid=$(pgrep wlsunset) + +if [[ -z ${pid} ]] ; then + # Start wlsunset right away. + wlsunset -l 50 -L 4 -t 2500 & +else + # Currently stop wlsunset but restart in an hour. + kill ${pid} + ~/.scripts/notify.sh 'Stopping sunset' 'Restarting in an hour' + at now +1 hours -f ~/.scripts/wlsunset.sh +fi diff --git a/stow/waybar/.config/waybar/modules.json b/stow/waybar/.config/waybar/modules.json index 0e7a73d..3bd3ba4 100644 --- a/stow/waybar/.config/waybar/modules.json +++ b/stow/waybar/.config/waybar/modules.json @@ -40,7 +40,7 @@ "clock": { "format": "{:%H:%M}", "format-alt": "{:%d/%m/%Y %H:%M}", - "timezone": "Europe/Brussels", + // "timezone": "Europe/Brussels", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>" },