From 60f658abf25e5a2cc6712f47d34119a77c02d199 Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Thu, 2 Jan 2025 11:18:27 +0100 Subject: [PATCH] Update generic stuff. --- day | 27 +++++---------------------- optimus-fix.sh | 5 ----- rand-game | 9 --------- start-dwl | 3 --- start-hyprland | 3 --- task-notify | 8 -------- 6 files changed, 5 insertions(+), 50 deletions(-) delete mode 100755 optimus-fix.sh delete mode 100755 rand-game delete mode 100755 start-dwl delete mode 100755 start-hyprland delete mode 100755 task-notify diff --git a/day b/day index 821d931..2f0cc19 100755 --- a/day +++ b/day @@ -1,6 +1,6 @@ #!/bin/sh -# Based on day script from mischavandenburg +# Based on day script from mischavandenburg # url: https://github.com/mischavandenburg/dotfiles/blob/main/scripts/day today=$(date +"%Y-%m-%d") @@ -11,30 +11,13 @@ file="$SECOND_BRAIN"'/periodic/daily/'"$today.md" cd "$SECOND_BRAIN" || exit 1 new_note() { - touch "$file" + cp "$SECOND_BRAIN/templates/daily.md" "$file" - # Give me a nice format - cat <"$file" -# $today + sed -i "s/TODAY/$today/" "$file" -[[$yesterday]] - [[$tomorrow]] + sed -i "s/YESTERDAY/$yesterday/" "$file" -## Intention - -What do I want to achieve today and tomorrow? - -## Tracking - -- [ ] Cycle -- [ ] Strength training -- [ ] Watch a movie or tv show episode -- [ ] Play/finish a game -- [ ] Post a blog post -- [ ] Check servers -- [ ] Check backups - -## Log -EOF + sed -i "s/TOMORROW/$tomorrow/" "$file" } if [ ! -f "$file" ]; then diff --git a/optimus-fix.sh b/optimus-fix.sh deleted file mode 100755 index 71df74c..0000000 --- a/optimus-fix.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -screen="eDP" - -xrandr --output eDP --set TearFree on diff --git a/rand-game b/rand-game deleted file mode 100755 index 9fe7b45..0000000 --- a/rand-game +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -random=$(jq 'select(.hidden != true) | select(.removed != true) | select(.name | contains("Proton") | not) | select(.name | contains("Steam") | not) | input_filename' -r "$HOME"/.local/share/cartridges/games/*.json | sort -R | head -n 1) -name=$(jq '.name' -r "$random") -exec=$(jq '.executable | if type == "array" then .[] end' -r "$random") - -answer=$(printf "yes\nno" | dmenu -p "Want to play $name?") - -[ "$answer" = "yes" ] && eval "$exec" || exit diff --git a/start-dwl b/start-dwl deleted file mode 100755 index 649456b..0000000 --- a/start-dwl +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec dbus-launch --exit-with-session dwl diff --git a/start-hyprland b/start-hyprland deleted file mode 100755 index 291d8e6..0000000 --- a/start-hyprland +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec dbus-launch --exit-with-session Hyprland diff --git a/task-notify b/task-notify deleted file mode 100755 index 5b3631b..0000000 --- a/task-notify +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -tasks=$(task status:pending -notified due export | jq -r '.[].description') -[ -z "$tasks" ] && exit 0 -while read task; do - notify-send 'A task is due.' "$task" -done <<< "$(echo $tasks)" -task rc.bulk=0 rc.confirmation=off status:pending -notified due modify +notified