diff options
author | awy <awy@awy.one> | 2025-08-24 15:38:06 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2025-08-24 15:38:06 +0300 |
commit | a1e9b2c3094d4371d03a24bc2c5361d65f8abf14 (patch) | |
tree | 3a27a458727792d15cdef6936ffdd5f0e114cd59 /.local/bin | |
parent | 474006cd2c173d02e4511045f07c04e159010d4e (diff) | |
download | hyprdots-a1e9b2c3094d4371d03a24bc2c5361d65f8abf14.tar.gz |
newsraft
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/cron/newsup | 10 | ||||
-rwxr-xr-x | .local/bin/sb-news | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup index 25dae98..a7cc907 100755 --- a/.local/bin/cron/newsup +++ b/.local/bin/cron/newsup @@ -1,18 +1,18 @@ #!/bin/sh -# Set as a cron job to check for new RSS entries for newsboat. -# If newsboat is open, sends it an "R" key to refresh. +# Set as a cron job to check for new RSS entries for newsraft. +# If newsraft is open, sends it an "R" key to refresh. -export XDG_RUNTIME_DIR=/run/user/1000 +export XDG_RUNTIME_DIR=/tmp/hyprland export WAYLAND_DISPLAY=wayland-1 /usr/bin/notify-send " Updating RSS feeds..." -pgrep -f newsboat$ && /usr/bin/wlrctl window focus title:newsboat && /usr/bin/wlrctl keyboard type R && exit +pgrep -f newsraft$ && hyprctl --instance 0 dispatch sendshortcut ,R ,title:newsraft && exit echo "" > /tmp/newsupdate pkill -RTMIN+6 "${STATUSBAR:-waybar}" -/usr/bin/newsboat -x reload +/usr/bin/newsraft -e reload-all rm -f /tmp/newsupdate pkill -RTMIN+6 "${STATUSBAR:-waybar}" /usr/bin/notify-send " RSS feed update complete." diff --git a/.local/bin/sb-news b/.local/bin/sb-news index bb45885..01ec705 100755 --- a/.local/bin/sb-news +++ b/.local/bin/sb-news @@ -1,17 +1,17 @@ #!/bin/sh # Displays number of unread news items and an loading icon if updating. -# When clicked, brings up `newsboat`. +# When clicked, brings up `newsraft`. case $BLOCK_BUTTON in - 1) setsid "$TERMINAL" -T newsboat -e newsboat >/dev/null 2>&1 ;; + 1) setsid "$TERMINAL" -T newsraft -e newsraft >/dev/null 2>&1 ;; 2) setsid -f newsup >/dev/null && exit ;; 3) notify-send " News module" "\- Shows unread news items - Shows if updating with \`newsup\` -- Left click opens newsboat +- Left click opens newsraft - Middle click syncs RSS feeds -<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; +<b>Note:</b> Only one instance of newsraft (including updates) may be running at a time." ;; 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" >/dev/null 2>&1 ;; esac -bat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print " " $1}')$(bat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)" +bat /tmp/newsupdate 2>/dev/null || echo "$(newsraft -e print-unread-items-count | awk '{ if($1>0) print " " $1}')$(bat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsraft/.update 2>/dev/null)" |