Comments (8)
Is there a value that doesn't update at all?
Yes, 0
means it is not updated
Well, I didn't think about that. So do I make this smaller? What do you think is the smallest value for the date that is still logical, but updates unnecessarily? Perhaps it is possible to somehow TRAP the change of the date of the machine, and then just run it?
I honestly would not separate date and time if you are keeping them next to each-other. Even with 5 minutes interval, you could have inaccuracy up to 5 minutes (like for clock, if it updates at 55th second, it will not show correct time until next cycle)
Regarding the date detection by OS, I am sure it is possible, but I do not now how apart from crons
from dwmblocks-async.
This is impossible as dwm
renders the status as nothing but a single string obtained from the root window's title. To implement this, non-trivial effort would be required to patch dwm
.
From this project's side, all it does is form the status string and set it as the root window's title. If you think about it, dwmblocks-async
is nothing but a glorified xsetroot
which obtains the status string by executing blocks asynchronously.
from dwmblocks-async.
Weird idea I have never tried: add a lot of spaces after your date text. Enough so it pushes the date text all the way to the middle (I think you would need to increase MAX_BLOCK_OUTPUT_LENGTH)
from dwmblocks-async.
That would be quite hacky. I guess you could add a few blocks which just output a bunch of whitespace characters.
from dwmblocks-async.
It does sound like a hack. The several blocks would not look ok if you use delimiters
from dwmblocks-async.
Weird idea I have never tried: add a lot of spaces after your date text. Enough so it pushes the date text all the way to the middle (I think you would need to increase MAX_BLOCK_OUTPUT_LENGTH)
I've been using it this way for a while, but the X system crashes from time to time because of the blocks placed on the left edge. This does not happen with the block placed in the middle. I use lot of spaces.
Ugly looks...
#define BLOCKS(X) \
X("/home/Data/Linux/Compile/dwmblocks-async/netspeed.sh", 3, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/freemem.sh", 5, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/cpu.sh", 3, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/date.sh", 86400, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/time.sh", 60, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/brightness.sh", 0, 1) \
X("/home/Data/Linux/Compile/dwmblocks-async/volume.sh", 0, 10) \
X("/home/Data/Linux/Compile/dwmblocks-async/network.sh", 5, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/ip.sh", 5, 0) \
X("/home/Data/Linux/Compile/dwmblocks-async/battery.sh", 60, 0)
from dwmblocks-async.
Ok, that was just a idea. I have no clue about fixing the crash though
Few questions regarding this
I've been using it this way for a while, but the X system crashes from time to time because of the blocks placed on the left edge. This does not happen with the block placed in the middle. I use lot of spaces. Ugly looks...
X("/home/Data/Linux/Compile/dwmblocks-async/date.sh", 86400, 0) \ X("/home/Data/Linux/Compile/dwmblocks-async/empty.sh", 630, 0) \
If the block is empty, why do you need interval?
For the date block, does such a huge interval cause the date remaining the same after midnight? I mean if you start you computer at 6PM, and considering the block updates once a day, would it update at midnight?
from dwmblocks-async.
Ok, that was just a idea. I have no clue about fixing the crash though
Few questions regarding this
If the block is empty, why do you need interval?
Is there a value that doesn't update at all?
For the date block, does such a huge interval cause the date remaining the same after midnight? I mean if you start you computer at 6PM, and considering the block updates once a day, would it update at midnight?
Well, I didn't think about that. So do I make this smaller? What do you think is the smallest value for the date that is still logical, but updates unnecessarily? Perhaps it is possible to somehow TRAP the change of the date of the machine, and then just run it?
from dwmblocks-async.
Related Issues (20)
- Parent Process ID is not equal to PID of statusbar HOT 4
- Set leading delimiter HOT 1
- Weird status output
- can't use BLOCK_BUTTON up to 10 HOT 3
- Is is possible to get a signal for mouse hovering HOT 1
- command not found HOT 4
- [SUGGESTION] execute commands directly rather than through a shell HOT 1
- Status bar not showing up HOT 6
- Don't see anything changed HOT 2
- Some blocks dont update HOT 3
- Feedback needed for new changes in `new-org` branch HOT 2
- Unable to use scroll inputs (button 4/5) HOT 2
- Autostarting with dwm doesn't work HOT 2
- make install problem on Debian 12 HOT 1
- enabling TRAILING_DELIMITER gives error HOT 1
- issue starting dwmblocks after rewrite HOT 8
- Inconsistent logic on time intervals HOT 2
- dwmblocks does not start in Ubuntu 23.10 HOT 4
- Rectangular symbol between first two blocks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwmblocks-async.