Bar, Panels, Conky, Notifications - Desktop Customization & Workflow
Users browsing this thread: 2 Guest(s)
|
|||
Hello nixers,
In this thread we'll share how we check on our system state. Things that matter to us and that we want to keep in front of our eyes. Some are minimalist and avoid bars and panels, only relying on their terminals. That's fine we want to know about it too, are you using /sys/ on linux to check the battery state, or cpu state, are you using /proc/? Are you relying on a specific bar or panel, which one, is it customized, do you have specific modules you personally wrote? Do you have a launcher dock where you've also added notifications? What notification system complements all this? Previous related topic: https://nixers.net/showthread.php?tid=117 Personally, I use a combination of command line tools and dunst for notifications. I find myself doing `watch` command showing me the battery status whenever I'm not plugged in and I pin the terminal window to be over others and on all desktop. As for the time and date it's shown in tmux usually. And I manually check memory with top or htop. However, as I'm taking my laptop out more I find that it would be useful to have, at least, the battery status in plain sight with a warning sign whenever it gets too low. So nixers, what bars, panels, conky, and system notifications are you using and why? |
|||
|
|||
In the past I have used an extremely detailed conky to view system stats, then when I moved to awesomewm I used the default bar to view cpu, network, and memory information.
Now I don't have a bar at all. The only notification I have configured is for the battery, it displays at 50%, 30%, then less than 10%. This is achieved with a script checking the percentage from acpi output and notifications are done with dunst. For anything else I would use the terminal. |
|||
|
|||
(05-03-2019, 06:23 AM)pyratebeard Wrote: Now I don't have a bar at all. The only notification I have configured is for the battery, it displays at 50%, 30%, then less than 10%.This is actually a genius idea that I've never thought about. It doesn't really matter the exact battery percentage but only if it's starting to drop significantly. EDIT: The script is probably simple but sharing is caring. |
|||
|
|||
(05-03-2019, 06:41 AM)venam Wrote: EDIT: The script is probably simple but sharing is caring. check-battery.sh There is probably a much nicer way of doing this, any suggestions are welcome. |
|||
|
|||
I've been using Polybar for a while, with a relatively default-looking setup:
I'm not extremely happy with that setup for a couple of reasons:
What's missing for me to switch over to it as my main bar is mainly:
As for the information I like to keep in my bar:
For notifications, I use dunst, but I don't have any cool scripts which notify me. I should probably make one which checks my battery level and notifies me when it gets low. |
|||
|
|||
I improved the script I posted above and included the systemd service on github. PRs welcome.
|
|||
|
|||
|
|||
I noticed a race condition in your script. The timer runs every one minute and check for an exact value.
However, that assumes the battery percentage will stay at least 1min to coincide exactly with the 1min timer of the daemon. Also, it's showing notifications even when the state is charging. I'm not sure if my explanation of the issue is good enough. I'll try to come up with a good PR. |
|||
|
|||
(06-03-2019, 02:03 PM)venam Wrote: Also, it's showing notifications even when the state is charging. I hadn't noticed that, cheers. I'll try and look at a fix. (06-03-2019, 02:03 PM)venam Wrote: Also, it's showing notifications even when the state is charging. Strange, it doesn't for me. I may have missed something when I quickly re-wrote it. **EDIT: I know what happened... originally I was using the output of `acpi` to check if the batt was discharging, and then get the percentage. I changed it to use the capacity file under /proc/ as I thought it would be cleaner. Didn't think to check the discharging bit again! I'll fix that. |
|||
|
|||
(06-03-2019, 03:43 PM)pyratebeard Wrote: I hadn't noticed that, cheers. I'll try and look at a fix.I've updated the script and did a pull request. It now suspends when the battery capacity is less than 10% and you haven't connected the charger within 10s. It keeps track of the state within a file, like that race conditions are avoided and the notification always shows even when it didn't exactly fit in the range. |
|||
|
|||
I haven't used any kind of bar/panel for about two years now, the only things that I regularly use (that you usually would place on your panel) are date and time, but I call it from the terminal. Now I'm in the process of switching to dwm from bspwm, and I thought about hacking some small UNIX-like panel just for a change, I think lemonbar should be a good candidate (basically draws your shell scripts to a window/panel), but I now have a problem, I can't come up with the script which would update different functions at a different interval, I don't want to "curl -s ipinfo.io/ip" every 0.2sec in the main loop. I don't know how to fix this, or if this is doable in shell scripting at all, couldn't find any examples online.
|
|||
|
|||
You can also use a regular terminal window and a cronjob to do your notifications, my own weather example (bash):
Code: #!/bin/bash you need to make it floating and not focusable by your WM: Code: bspc rule -a URxvt:notification focus=off manage=off state=floating This one should be POSIX complaint variant: Code: #!/bin/sh |
|||
|
|||
I have some info for my bar that I only need to update once an hour. I just have a cronjob dump it in some temp file and have the bar read it from there. I update my bar every second because I have my clock set up with seconds.
|
|||
|
|||
I would like to update window title at least each 0.25sec, to not perceive that much of a delay. But updating the entire panel each 0.25sec seems wasteful. I guess it would be OK if it was just a single cat from a file, but there will be many other things like CPU,RAM,Temp,kernel version,free space, network speed. Doing the entire panel as cronjob dumps to a file doesn't feel right to me.
Is anyone here using lemonbar to share their setups? |
|||
|
|||
Of course I don't use cronjob for everything. Clock and mpd info go through system calls and libmpd respectively. If I were doing the CPU/temp/etc things (in which I have no interest), I'd probably also just get those through system libraries as well (assuming I'd want them every update).
The temp file is only for the title of a radio program that I can't get other than scraping it from a website (no metadata in the stream ...). It only changes once an hour (max), so I need to store it somewhere. I've hacked my bar together in C though, so things may be slightly different. |
|||
|
|||
I've just switched WM from spectrwm to frankenwm (which doesn't have an inbuilt bar). I have had the same issues, but eventually got my spectrwm bar set up nicely. Cron job to pull wttr.in ever half hour (weather can change quickly and multiple times a day where I live) and everything else on a 2sec loop. I'm not too fussed about immediate updates. However the only thing that kinda bugged me was my volume level in the bar. It would be nice for the volume level to be updated immediately when pressing the vol keys.
I see you posted over in this thread where different solutions to this were offered, however I never succeeded with it unfortunately. Since moving to frankenwm I'm, now using unibar which I suppose is similar to lemonbar but it's written in rust. This is a simple script I'm using at the moment. Fonts and colours etc are set in a simple ~/.config/unibar/uni.conf file.
_____________________________________________________________________________________________
“Maybe you have some bird ideas... Maybe that's the best you can do.” - Terry A. Davis (R.I.P Terry & Percival) |
|||
|
|||
_____________________________________________________________________________________________
“Maybe you have some bird ideas... Maybe that's the best you can do.” - Terry A. Davis (R.I.P Terry & Percival) |
|||