summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaptup5
-rwxr-xr-xdtrans (renamed from late)0
-rwxr-xr-xfz3
-rwxr-xr-xfz-feed12
-rwxr-xr-xmansplain2
-rwxr-xr-xnewsup3
-rwxr-xr-xnotesplain2
-rwxr-xr-xvolume8
-rwxr-xr-xwrocwttr10
9 files changed, 37 insertions, 8 deletions
diff --git a/aptup b/aptup
deleted file mode 100755
index 6d1398e..0000000
--- a/aptup
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-/usr/bin/notify-send "Updating packages..."
-apt -y update && apt -y upgrade
-/usr/bin/notify-send "Packages updated."
diff --git a/late b/dtrans
index 5f4ced1..5f4ced1 100755
--- a/late
+++ b/dtrans
diff --git a/fz b/fz
new file mode 100755
index 0000000..ea35024
--- /dev/null
+++ b/fz
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+fz-feed | dmenu -p "fz" -i -l 15 | xargs -r zathura
diff --git a/fz-feed b/fz-feed
new file mode 100755
index 0000000..988d1ba
--- /dev/null
+++ b/fz-feed
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cache="$HOME/.cache/fz"
+
+if [ "$1" = "-r" ] || [ ! -e "$cache" ]; then
+ find "$HOME" -mindepth 1 \( -name ".*" -o -path "$HOME/cell" -o -path "$HOME/phone/*" \) -prune -o -print | \
+ sed '/\.pdf$/!d' | sort > "$cache"
+
+ notify-send "fz cache updated."
+fi
+
+cat "$cache"
diff --git a/mansplain b/mansplain
index 625528e..6c7973b 100755
--- a/mansplain
+++ b/mansplain
@@ -1,4 +1,4 @@
#!/bin/sh
-arg="$( man -k . | dmenu -l 30 | awk '{print $1}')"
+arg="$( man -k . | dmenu -l 15 | awk '{print $1}')"
[ -n "$arg" ] && man -Tpdf "$arg" | zathura -
diff --git a/newsup b/newsup
index 93ecbb3..42e90fd 100755
--- a/newsup
+++ b/newsup
@@ -1,5 +1,8 @@
#!/bin/sh
+export DISPLAY=:0.0
+export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
+
/usr/bin/notify-send "Updating RSS feeds..."
pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit
diff --git a/notesplain b/notesplain
index 3249258..8136cec 100755
--- a/notesplain
+++ b/notesplain
@@ -1,7 +1,7 @@
#!/bin/sh
dir="$OBSIDIAN_HOME"
-file="$(ls -1 "$dir" | sed 's/\.md$//' | dmenu -l 30 -p 'Select note:')"
+file="$(ls -1 "$dir" | sed 's/\.md$//' | dmenu -l 15 -p 'Select note:')"
if [ -n "$file" ]; then
tmpfile="$(mktemp /tmp/"$file"_XXXXXXXX.pdf)"
diff --git a/volume b/volume
index b40ecf1..3da8d8f 100755
--- a/volume
+++ b/volume
@@ -1,3 +1,9 @@
#!/bin/sh
+# TODO: see if pulseaudio is running
-pactl set-sink-volume @DEFAULT_SINK@ "$1"
+case "$1" in
+ up) pactl set-sink-volume @DEFAULT_SINK@ "+5%" ;;
+ down) pactl set-sink-volume @DEFAULT_SINK@ "-5%" ;;
+ mute) pactl set-sink-mute @DEFAULT_SINK@ toggle ;;
+ *) pactl set-sink-volume @DEFAULT_SINK@ "$1" ;;
+esac
diff --git a/wrocwttr b/wrocwttr
new file mode 100755
index 0000000..b1bb3af
--- /dev/null
+++ b/wrocwttr
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export DISPLAY=:0.0
+export HOME=/home/filipek
+
+temp=$(curl wttr.in/Wrocław?format=1 | awk '{print $2}')
+file="$HOME/.cache/weather/wroc.txt"
+
+echo "$temp" > "$file"
+notify-send "Temperature updated."