commit 16eb5a55c4030209a22b2f5e64bc5fd19448c20b
parent 998f8d3ab2d99580bf2c9782446cab2a610d1c69
Author: awy <awy@awy.one>
Date: Thu, 12 Jun 2025 16:48:50 +0300
wayland alternative to handle running newsboat instance
Diffstat:
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.config/sway/config b/.config/sway/config
@@ -89,7 +89,7 @@ bindsym $mod+Shift+r exec $term -e htop
bindsym $mod+d exec $menu
bindsym $mod+Shift+d exec tessen
bindsym $mod+Return exec $term
-bindsym $mod+Shift+n exec 'sh -c "$term -e newsboat; pkill -RTMIN+6 i3blocks"'
+bindsym $mod+Shift+n exec 'sh -c "$term -T newsboat -e newsboat; pkill -RTMIN+6 i3blocks"'
bindsym $mod+m exec $term -e rmpc
bindsym $mod+Shift+m exec 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; kill -44 $(pidof i3blocks)'
bindsym $mod+f1 exec singboxwrap menu
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
@@ -50,8 +50,10 @@ zle-line-init() {
echo -ne '\033[0 q'
}
zle -N zle-line-init
-echo -ne '\033[0 q' # Use beam shape cursor on startup.
-preexec() { echo -ne '\033[0 q' ;} # Use beam shape cursor for each new prompt.
+
+function preexec {
+ print -Pn "\e]0;${(q)1}\e\\"
+}
# Use lf to switch directories and bind it to ctrl-o
function y() {
diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup
@@ -3,9 +3,12 @@
# Set as a cron job to check for new RSS entries for newsboat.
# If newsboat is open, sends it an "R" key to refresh.
+export XDG_RUNTIME_DIR=/run/user/1000
+export WAYLAND_DISPLAY=wayland-1
+
/usr/bin/notify-send "📰 Updating RSS feeds..."
-pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit
+pgrep -f newsboat$ && /usr/bin/wlrctl window focus title:newsboat && /usr/bin/wlrctl keyboard type R && exit
echo 🔃 > /tmp/newsupdate
pkill -RTMIN+6 "${STATUSBAR:-i3blocks}"
diff --git a/dependencies.txt b/dependencies.txt
@@ -11,6 +11,7 @@ i3blocks
cmake
wayland-protocols
autotiling
+wlrctl
# sound
pipewire