sineemore / stw Goto Github PK
View Code? Open in Web Editor NEWsimple text widget for X
License: MIT License
simple text widget for X
License: MIT License
If returned text changes between empty and non-empty erroneous behaviour is observed.
echo "1" > /tmp/1
stw -p 1 cat /tmp/1
Expected text: "1" is displayed.
echo "" > /tmp/1
Dissapearance of text/window would be expected, but previous text is still displayed.
echo "1" > /tmp/1
Program crashes with:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 53 (X_CreatePixmap)
Value in failed request: 0x0
Serial number of failed request: 54
Current serial number in output stream: 67
Problem seems to be related to window_width
in draw
function.
Once window_width = borderpx * 2;
is changed to window_width = 1;
text starts to update correctly, and there are no crashes.
However, window with width of (apparently) 1px is drawn all the time, even with empty text.
from the man page, i assume the maintainer is using Void linux, but this project does not have versions nor tags,
i am looking to package this for void; otherwise i suggest the maintainer does it as they seem to be using Void Linux.
When using stw to cat
actively changed file, I noticed that stw sometimes stops refreshing text window.
When this happens stw starts using up big part of CPU and stw window is frozen on some previous state of the file.
Run
stw -p 1 cat /tmp/1
Then run two commands:
find /usr | tail > /tmp/1
find / | tail > /tmp/1
Quite consistantly the error will occur, if not - repeat commands multiple times, rapidly.
It seems at least one of commands needs to take a lot of time (like find / | tail
; I noticed this with one of commands being pdflatex) in order for this problem to happen.
To test this issue, I've put some printf commands around part of stw.c
commented as "handle signals" and noticed that SIGCHLD, and SIGALRM branches stop being reached when the error occurs, while entire program seems to loop as fast as possible.
How to compile on FreeBSD please?
It can't find the Xft headers which I do have installed.
eg. -p 0.3
The description of px, py in config.h is unclear:
px, py values position window top left corner in the center of the screen
The usage message doesn't describe the difference between -x, -X, and -y, -Y.
What are the units of value? Pixels, percentage?
I've tried combinations of 0%, -50% for -x, -y, -X, and -Y, but the window is never positioned in the upper left corner of the screen?
The command being run is pstree -U
.
First of all, I congratulate you on your project. It works great except with marquee
text.
I have below script which scrolls rss
news feeds from right to left in terminal. But unfortunately it fails.
while true;do n="$(curl -s https://news.yahoo.com/rss/|sed 's/</\n/g'|grep "title>"|sed -e '/^\// d' -e 's/title>/---------- /g' -e '1,3d'|tr '\n' ' ')";for i in $(eval echo {0..${#n}});do echo -ne "\e[s\e[0;0H${n:$i:$COLUMNS}\e[u";sleep .15;printf \\033c;done;done
I couldn't wrap my head around it.
Hello.
When I type command "stw -p 1 -x 100 -y 100 -f '#C7C7C7' -b black -F monospace:size=30 sh -c 'echo "TEXT"'" here's text and it's OK.
But if I try to use -A to get alpha "stw -p 1 -x 800 -y 500 -f '#C7C7C7' -b 'black' -A 0 -F monospace:size=30 sh -c 'echo "ALPHA (?!) TEXT"'" there's no alpha.
Also I tried to not use background and use alpha, but it still black rectangle at background "stw -p 1 -x 800 -y 500 -f '#C7C7C7' -A 0 -F monospace:size=30 sh -c 'echo "WITHOUT BG SET"'"
How can I get transparent background? Thanks.
How do I make the stw window box transparent? I'm using picom.
Thanks for creating this program; it's great.
I can't figure out a way to just display text from stdin which scrolls down on a new line, like the similar program root-tail
or just using tail -f
in a terminal. Is there a way of doing this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.