Bar, Panels, Conky, Notifications - Desktop Customization & Workflow

Users browsing this thread: 1 Guest(s)
venam
Administrators
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?
pyratebeard
Long time nixers
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.

I could do with a shot of rum right now.
venam
Administrators
(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.
pyratebeard
Long time nixers
(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 could do with a shot of rum right now.
mort
Members
I've been using Polybar for a while, with a relatively default-looking setup:
[Image: scr-2019-03-05-48299.png]
I'm not extremely happy with that setup for a couple of reasons:
  • The icon font polybar uses by default, Wuncon Siji, is a bitmap font and doesn't work nicely with high DPI.
  • Its widgets aren't really interactive; it would've been useful to have a widget which I can use to adjust volume or brightness with my touch screen.
  • The i3wm integration doesn't work exactly as I would like it to.
I've started a project, called webbar, which is a webkit-based status bar with widgets written in javascript (using Preact). It's not done yet, but it's not that far off:
[Image: scr-2019-03-05-51635.png]
What's missing for me to switch over to it as my main bar is mainly:
  • A widget which connects to i3wm's socket and shows information about workspaces
  • A volume widget and a backlight brightness widget
  • Better multi-monitor support
My laptop is one of those 2-in-1 laptops, so there are times when I don't have a keyboard in front of me if I'm doing web browsing or watching videos or whatever. That makes it useful to be able to change volume and backlight brightness by just dragging a slider on the screen. The most obvious place to put such sliders would be the status bar, because that's always visible anyways.

As for the information I like to keep in my bar:
  • Since I'm on a laptop, often on battery, it's useful to know what my CPU usage is. If it's suspiciously high, I can find whatever firefox tab is using a lot of power and make sure to close it.
  • Again, since I'm on a laptop, it's useful to see what WiFi network I'm connected to; the laptop might connect to some shitty wifi network in the area instead of a decent one.
  • For obvious reasons, it's useful to have the battery level and date/time readily available.
  • Seeing the volume level is useful, mostly to make sure it's muted whenever I'm in a situation where making sound would be undesirable.
My widgets look like this, which I think is fairly neat: https://github.com/mortie/webbar/blob/ma...widgets.js

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.
pyratebeard
Long time nixers
I improved the script I posted above and included the systemd service on github. PRs welcome.

I could do with a shot of rum right now.
venam
Administrators
(05-03-2019, 11:13 AM)pyratebeard Wrote: I improved the script I posted above and included the systemd service on github. PRs welcome.

Fantastic, thanks for sharing this will save time instead of having to rewrite it.
I'll give it a try and report back.
venam
Administrators
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.
pyratebeard
Long time nixers
(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.

I could do with a shot of rum right now.
venam
Administrators
(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.
stratex
Nixers
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.
stratex
Nixers
You can also use a regular terminal window and a cronjob to do your notifications, my own weather example (bash):
Code:
#!/bin/bash
urxvtc -bg "#232323" -fg "#909090" -name notification -geometry 33x7+2230+60 -e /bin/bash -c "echo -en '\e[?25l\033]0;\n' ; curl wttr.in/new-york?Q0 ; sleep 5"

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
urxvtc -name notification -geometry 33x7+2230+60 -e /bin/sh -c "tput civis ; echo '\n' ; curl wttr.in/new-york?Q0 ; sleep 5"
Dworin
Members
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.
stratex
Nixers
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?
Dworin
Members
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.
pfr
Nixers
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)
pfr
Nixers
(05-03-2019, 10:12 AM)mort Wrote: I've been using Polybar for a while, with a relatively default-looking setup:
[Image: scr-2019-03-05-48299.png]

Hey Mortie, I don't suppose you still have the configs for this? Would love to look inside the script to get some ideas.
_____________________________________________________________________________________________
“Maybe you have some bird ideas... Maybe that's the best you can do.” - Terry A. Davis (R.I.P Terry & Percival)