Using all your cores to run status bar, sounds a good idea!
@julioramirez54974 жыл бұрын
while :; do xsetroot -name "whatever" sleep 0.0001s done
@rednight24765 жыл бұрын
Mine is written in C and checks various and various intervals. I am using the status2d patch which lets you do simple drawing in the bar to draw the batteries at different levels and to make the volume look better.
@mahmoudagha40605 жыл бұрын
Can I fork your code?
@rednight24765 жыл бұрын
@@mahmoudagha4060 I am running BSD on a thinkpad which is dramatically different then linux to get the system stats. There is a simple status bar on the suckless page which mine is based on. The status2d patch allows basic drawing with t a simple markup language. I plan on and am slowly making mine fully modularised so it could be used as a base for someone else but right now it's very dependant on BSD syscalls.
@Jupiter__001_5 жыл бұрын
@@rednight2476 How does the FreeBSD kernel compare to the Linux kernel? I have heard the source is a good bit cleaner than Linux, but in terms of functionality (especially meaning graphics card drivers for gaming in my case) how do they compare?
@rednight24765 жыл бұрын
@@Jupiter__001_ I use NetBSD - The BSDs are more than just the kernel they are complete system. The documentation and code throughout the system is cleaner than Linux+GNU. Video drivers are weaker than Linux as there is no Proprietary drivers for it and the opensource ones are little bit behind. With the BSDs you can easily browse the source tree, find the tool you are looking for and get readable code. e.g. I modeled my battery level in my statusbar directly off the system supplied command line tool.
@Jupiter__001_5 жыл бұрын
@@rednight2476 I see. I suppose that rules out my use case. I am surprised that there is no proprietary video driver support, given that the PS4 for example runs a modified version of FreeBSD. Thank you for the information about the BSDs being full OSes. I had already heard they were much more cleanly written than GNU-Linux, and that the documentation was more readable (there are many man pages in GNU-Linux that leave a lot to be desired...); I just wanted to hear it first-hand. I also used system tools to create a battery monitor in my status bar, but I had to use tools bundled with the status bar instead of any inbuilt tool (although the bundled tool scanned a particular system directory to discover what it needed to know).
@GrumpyCrash4 жыл бұрын
Next video: DWM IS BLOAT .. after i've added 42 patches, 23 scripts including a 15s-refreshing-wallpaper-changing-tool
@ohdude66434 жыл бұрын
My weather app is the f@kin' window. I open it, and I look.
@coompiler90293 жыл бұрын
bUt wHaT aBoUt nExT fRiDaY's wEaThEr?
@nubilate3 жыл бұрын
@@coompiler9029 you don’t
@TechiRef5 жыл бұрын
I've been using Suckless' slstatus myself ever since I switched over to dwm, and for stuff not really covered in the base program (i.e. GPU stats), I've just made small scripts to do that stuff. It just feels a little cleaner overall to me, as well as being easier to format and modify IMO. Good scripts though!
@ReneHoffmann1945 жыл бұрын
3:47 Maybe instead of the `pstree grep` you could run sleep in the background, get its PID via $! and pipe that to a $file, also add a `wait $!` after the sleep command so that the loop does not continue, now your script could get the PID out of your $file and you could kill it easily!
@frisosmit89205 жыл бұрын
Or you can put the while loop and the update in a seperate script and call the update script whenever you wanna update. No need for killing sleep processes
@marcussmithwick63265 жыл бұрын
DWM is bloated Luke, you must learn xlib and create your own window manager
@Klblaz5 жыл бұрын
To be fair X is kinda bloated, but there is no real alternative.
@TURBOKNUL6665 жыл бұрын
@@Klblaz I am using the sway wayland compositor as a daily driver and thus far it has been a really smooth experience for me. You might want to try it out.
@marcussmithwick63265 жыл бұрын
@@Klblaz X is a mess
@JurajOravecSGOrava5 жыл бұрын
It can happen, He moved to place with bad internet...
@deovindice3465 жыл бұрын
@MJS Are you guys cavemen? Do you really never do other stuff? It isn't 80s anymore.
@martinhertz49575 жыл бұрын
This video helped me in an unexpected way; well, killing sleep after amixer is brillant too, but the thing i'm referring too here, is that i've now learned about and changed to, having all my shell-scripts in '~/.local/bin' instead of as previously in '~/.bin'. Some research let me to find that ' ~/.local/bin' originates from python's PEP370 in 2008 and later by systemd in an extension to xdg-basedir spec, and where '~/.local' dir first was defined under use of' ~/.local/share' in original xdg-basedir spec. Thank you for your nice videos and greetings from Denmark :)
@martinprochazka37145 жыл бұрын
echo -n to remove trailing newline so you don't need to replace it later. edit: This solution is not POSIX compliant.
@martinprochazka37145 жыл бұрын
@MJS You're right, I wanted to reply "who the hell cares?" but then I relized that Luke does so what I'll do is edit the original comment with a warning about the non-compliance with posix.
@thomasfowler29645 жыл бұрын
Regarding the echo/NL lag issue: I think echo flushes its buffer when it sees a new line, so by translating them to spaces you make one kernel call instead of many.
@BigYoshi8263 жыл бұрын
6:39 That's the cutest thing I've ever seen on the command line
@mathiasodlund3 жыл бұрын
Nice video, what camera application are you using?
4 жыл бұрын
Hi, I like your approach. The only exception is that you need to kill sleep. I simply have two scripts: the first one runs the whole loop and calls the second one that assembled the status bar text and does the xsetroot. Doing it this way allows me to call the second script whenever I need to update manually. Thanks a lot for all your videos.
@ThreelionsSFIV4 жыл бұрын
Hello, I use the same idea, I was curios way he is using the kill approach, it's not necessary. Also lot of people puts just sleep 60 (to wait the update), but this is different from the system time. Too fix it: sleep $((60 - $(/bin/date +%S | sed 's/^0\([0-9]\)/\1/'))) or more bash way: sleep $((60 - 10#$(/bin/date +%S)))
@samuelbarnett62252 жыл бұрын
This is way over my head but I've learned what I don't know and I'll need to focus on learning.
@pcfreak19925 жыл бұрын
How did you get the ASCII-art-like output from "curl wttr.in"? When I ran that command, I get lots of HTML-markup with the output. Do have any special settings in your .curlrc?
@pcfreak19925 жыл бұрын
Nvm, I had some User-Agent string in my curlrc for some reason.. When I comment that out, it works the same like for you ;-)
@adityadesaha76674 жыл бұрын
I guess a better idea would be to have two different scripts: one script a.sh which calls xsetroot _once_ and exits, and the other script b.sh which runs a.sh every minute. And when updating volume etc just execute a.sh to update the bar. That will make the whole process a bit faster
@JDStone204 жыл бұрын
I finally got dwmstatus to launch at dwm startup! I just put 'dwmstatus 2>&1 >/dev/null &' into .xprofile in my home directory and changed the permissions of .xprofile to 755 with chmod
@AnonEMoose-mr8jm5 жыл бұрын
What if you used a pub/sub type thing instead of constantly updating the status bar? It would be pretty cool to have a service running that updates a text file with the stats you need. The service could see if something actually changed and then call xsetroot to update the status bar. It would be more complex but wouldn't it be lighter than unconditionally drawing to the root window? Idk maybe I'm talking out of my ass but it would be cool to try.
@timh.68724 жыл бұрын
Honestly, it feels like this should be a per-session daemon that gets poked with a signal whenever it needs to update, instead of a script in a while loop. In fact, have the daemon open a bunch of sockets at a known location based on what should be displayed, and then have cron jobs write to the sockets at regular intervals for some things, and have stuff like volume levels immediately write to the socket. The daemon selects all the sockets and whenever there's something to read, re-renders the status string and sends it to dwm.
@wisnoskij2 жыл бұрын
do you do anything to align with the minute change or will your clock just be 59 seconds off at times?
@chadthunder69155 жыл бұрын
What I do is define a bunch of functions in my dwmbar script similar to modules in i3blocks. I call "dwmbar init" on startup to evaluate all of them and output to a file in /tmp, then I can call dwmbar with the function's name as an argument to evaluate that function and sed -i that line in the tmp file. So I can refresh the RSS block by calling "dwmbar rss" without my script calling all the other time consuming functions. Then I use sed magic to transform the tmp file into one line separated by |'s and call xsetroot on it.
@voiceoftreason17605 жыл бұрын
Will you try out cwm or OpenBSD?
@ulissemini54925 жыл бұрын
omg luke your chad ricing is getting insane
@AerosfilisOfficial3 жыл бұрын
What font did you have for the emojis?
@joaopedrobattistellanadas51135 жыл бұрын
May I ask, what is this `se` you are running to open files?
@joaopedrobattistellanadas51135 жыл бұрын
@Arezu Thanks! I will check it out!
@0babul05 жыл бұрын
@Arezu Thanks man, that program is sweet. So much faster than even having bookmarks in ranger.
@Mibaa5 жыл бұрын
@Arezu fzf is bloat, use fzy instead
@senninscorpion5 жыл бұрын
Yep, Arezu is right, it uses ` fzf ` , here is what I have on my LARBS ... ` se() { find ~/.local/bin/* ~/.config* -type f | fzf | xargs -r $EDITOR ;} ` P.S. Luke's version uses ` du -a ` and removes the size column through ` awk ` instead of ` find `, but using two commands is too much bloat :D
@Nelex1115 жыл бұрын
Even the idea of rewriting all your status bar configurations from scratch each time you change your wm gives me frustration. It would be great to make independent repository of sh scripts which would provide status modules and every status bar configuration would be just printing output of these scripts. Also it would be great to build a master script, which would concatenate these outputs into a single line. And you basically just print it in whatever status bar you ever have
@joaopedrobattistellanadas51135 жыл бұрын
I was just doing the exact same thing in my own system and got the youtube notification for your video....
@avocado48775 жыл бұрын
STOP BLOATING DWM!
@KookoCraft2 жыл бұрын
lol?
@noapoleon_2 жыл бұрын
ah yes... stop "bloating" dwm with a basic time feature...
@opposites-369 Жыл бұрын
STOP BLOATING COMMENT
@jegsmeganu2 жыл бұрын
does these scripts can run on Arch? When I run these scripts, i received some errors, I think this scripts mostly run on Unix's like BSD's, I stand to be corrected. Thanks
@herrpez5 жыл бұрын
I would personally just break out the display function from the script to be its own thing. The logic being that you don't have to kill anything, you can just run the display function script when you need an instant refresh. Meanwhile the sleep script will still be ticking down and when it reaches zero it calls that same display script. I hope that makes sense.
@eac-ox2ly2 жыл бұрын
That does sound like a better solution indeed
@gery495 жыл бұрын
This is probably blasphemy, but can you make bar elements execute stuff when clicked? I like that I can use the scrollwheel to change tracks, adjust volume and swhitch workspaces in i3.
@vojtechstepancik30145 жыл бұрын
When I was setting up dwm, this was exactly what I did (have a while loop and a redraw function). But since there were some segments that weren't necessary to update every 10 seconds, which was my timeout, I switched to the following system, inspired in part by i3blocks: Have variables for separately storing each segments text, and the redraw function only formats them and sets the root window title. Then write an updater function for every segment, that can set the backing variable to whatever it should be. Then trap RTMIN+n signals, so that a signal updates a specific segment and redraws the bar with cached values for the rest. One thing to look out for is the sleep in the while loop, I couldn't just use sleep, because then the script wouldn't catch the signals before the sleep would finish, so I need to fork the sleep into background with & and wait for its completion with wait $!, then the signals propagate properly. If anyone is interested in code, it's on my GitHub: VojtechStep/configs, .config/scripts/dwm_status.sh
@duffman60883 жыл бұрын
this one is better than the new color emoji bar
@tc403905 жыл бұрын
Not sure if you are aware of/want this not but by using the following syntax: %-d instead of %d when outputing the current day number with the date command the the first syntax actually removes the zero in the day number if it's less than 10. So in this case the date format would have been "June 7" instead of "June 07".
@dioswilson31532 жыл бұрын
How do you set your hotkeys? I see you are not using default config.h
@armynyus91233 жыл бұрын
Finally got the normal xfce4 panel working in dwm, so that I could get rid of a few big patches, like statuscolor and systray, which also collided.... Also I had the feeling that statuscolor had an impact on CPU, at least after manually resolving the collision. I'm happy now, had the xfce stuff anyway on the machine and my status script got also far too messy.
@AAAnsie5 жыл бұрын
Luke, what do you use for backup?
@blackrastafarian5 жыл бұрын
Have you tried wmutils? It might worth a shot if you want to make a modular WM.
@tiaoraitbg23475 жыл бұрын
i personally use slstatus, easy to use and written in c
@hanspetervollhorst15 жыл бұрын
I like these neat little symbols but on my system it replaces them all with a space-like character. Do you have an idea on how to fix that?
@robertdobbs53464 жыл бұрын
Thank you VERY VERY much !! for the larbs video now my i3 is AWESOME you are great
@rileyejackson90255 жыл бұрын
I don't understand the blocking weather update loop and kill signal. Can't you just add `&` after your loop to update the weather in the background?
@otalpster43925 жыл бұрын
At 1:28 you ran se. What does it do? Is it a custom shell script?
@cebruthius3 жыл бұрын
Yes. Search and edit. It's in his terminal fuzzy finder video
@D0F4M1N32 жыл бұрын
HI! Do you know how to make following container in i3wm like your camera in your dwm?
@Robertass20004 жыл бұрын
do you know how to keep keybinding working even keyboard is in totally different language layout. I mean kill client is set to super+q but since q is not available when keyoaboard is set to other language keybinding does not work. I tried to use key code for q 0x0071 but no luck.
@giantimi5 жыл бұрын
I bet there is some way to use threading logic to get the desired behavior you'd like. Linux OSes can deal with asynchronous events (well obviously they can)
@AnzanHoshinRoshi5 жыл бұрын
Thank you, Luke.
@nilspin5 жыл бұрын
Is dwm easier to configure than i3bar?
@ezengondolkozom37005 жыл бұрын
no
@ade53243 жыл бұрын
nope
@ivbit5 жыл бұрын
This terminal thing is intimidating!
@mkd11135 жыл бұрын
Luke: sees a perfectly fine, functional, and minimal window manager like dwm. "Well, I guess it's time to unleash my inner autism and bloat it up with weather and mail in my status bar"
@gutoguto08732 жыл бұрын
Not bloat if you have a use for it.
@kilianl28645 жыл бұрын
Hey, i really like your work and videos, but how can i set dwm to recognize the brightness button ? This really bothering me and stopping me from using it.
@safalpiya37594 жыл бұрын
Hey, have you figured it out yet?
@devhypercoder67723 жыл бұрын
I know it's far too late and I don't have a laptop but, I would recommend, use sxhkd and then increase the brightness. Edit: I use sxhkd for my volume script and a few other things
@1Schueni5 жыл бұрын
When I try to put emojis in the dwm status bar, they are extremly tiny :/
@Samschwartz964 жыл бұрын
I believe Luke is using an installed icon fonts from FontAwesome, or something similar. Just depends on how they render.
@ncruzalayza5 жыл бұрын
Nice surrogate activity you've got there.
@cloudvanfrihan46685 жыл бұрын
What is the best web browser for minimumal WM like I3, Xmonad, DWM, etc..?
@timhilt11855 жыл бұрын
Cloud Van Frihan suckless' surf
@batlin4 жыл бұрын
Rather than killing dwm_bar, I'd make it just a while loop that calls another script ("dwm_bar_update" maybe) that actually does the work of setting the status bar contents. Then in your script that changes the volume, it can call dwm_bar_update to refresh the display. Meanwhile dwm_bar can keep running in the background and you don't need to run pstree or kill anything.
@stoyo552 ай бұрын
what is the program where he writes se and it shows all files names
@ViboraUnleashed5 жыл бұрын
I seems to have like 2 different PIDs of the sleep process, so that refbar thing doesn't work on my end. Editing dwmbar and set it to just sleep for 5s quite did the trick for me
@kruzzy165 жыл бұрын
also, check these out github.com/joestandring/dwm-bar github.com/torrinfail/dwmblocks
@sayanghosh69963 жыл бұрын
the battery wont work if you have more than 10 batteries. then again who does?
@BergenVestHK5 жыл бұрын
Hey Luke! Have you considered writing a book about tips and tricks for configuring and customizing Linux? I'd buy it!
@docfaizal2 жыл бұрын
Hey how to zoom in and zoomout in st terminal of ur LARBS build
5 жыл бұрын
Wouldn't it be more elegant to trap some signal in your dwmbar script and have it update the status bar when the signal is received to achieve the event-driven update? EDIT: Or at very least you could kill the sleep from within the aforementioned trap, that way the information on the implementation of your update loop does not leak into other scripts.
@breavyn43995 жыл бұрын
I feel really stupid for not thinking of refreshing my bar when pressing the volume change keys. I ended up writing a script (python) that listens for events from alsa or pulseaudio, and updates when necessary.
@Eryn3214 жыл бұрын
GENIUS!!!
@MrRenanwill4 жыл бұрын
I guess that I will use just the hours beeing updated every hour to be minimalist as never.
@kostasapostolopoulos_yt5 жыл бұрын
Why not "sleep 60" ?
@diegobranco5 жыл бұрын
For checking mail in Maildir directories, you can take a look at github.com/diego-treitos/novomail It is very versatile, although you would need to know a bit of Jinja2 to get the output you want.
@ГригорийХовер5 жыл бұрын
Опа попался лысый
@vokar38395 жыл бұрын
Да, скоро приедем к нему в Fort White на новоселье
@outeast73445 жыл бұрын
Мое почтение
@druskus54495 жыл бұрын
Could you do a video in how to store secret keys and credentials?
@Land0fAsh5 жыл бұрын
My battery module disappeared. Anyone know how to get it back?
@senkogaming47843 жыл бұрын
4:22 I know, it's like 2 years later, but "pgrep sleep"
@samubarb4 жыл бұрын
Script links are no more available :(
@shiv8060 Жыл бұрын
You're github page needs to be refreshed.... just got an error saying the page can't be found.
@keel-billedtoucan46435 жыл бұрын
You might want to add network internet speed monitor
@vilenaferreira52855 жыл бұрын
Can i3blocks be made to run in dwm?
@antuacharjee91455 жыл бұрын
No. You can use polybar
@prithug5 жыл бұрын
Well infact it can be, you can checkout the latest master branch of i3blocks on github and compile it. The dev has added a feature where i3blocks can print to the terminal without the json format that i3 expects. There can be improvements to it though as the terminal output also contains escape sequences that causes the terminal to "redraw" the status line. If you can get rid of the terminal escapes, you can essentially then set the dwm status. I haven't tried it yet though. check: github.com/vivien/i3blocks/issues/134
@samuelruprecht80605 жыл бұрын
echo -n is your friend :p
@LukeSmithxyz5 жыл бұрын
It's not portable.
@samuelruprecht80605 жыл бұрын
ok you got me there! Is this the actual reason you stopped using systemd?
@Eryn3214 жыл бұрын
where did the files go guys?
@FEE1DEAD5 жыл бұрын
Killing sleep is super bad style. Of course it links the internal implemenation of one script to another, and also it creates a race condition which may lead to the update not working (ok super rare, but its there)
@RichardJean-k7y3 күн бұрын
Wilfredo Extension
@manitthatrimontrichai84465 жыл бұрын
What's shortcut command for increase,decrease font in st?? I forget.
@squiretrelawny57695 жыл бұрын
Dl st from Luke's git and look inside config.h in src. Search 'zoom'
@TheYoungtrust5 жыл бұрын
Douse anyone know how to make a language selector at status bar like in gnome in dwm or where I can read about it?
@brands21315 жыл бұрын
emojis in dwm is bloat! just use text
@brands21315 жыл бұрын
[78°-93°F|53%] | VOL: 95% | NET | UNREAD: 8 | BAT: 80% | 2019 Jun 07 (Fri) 7:47AM ^unbloated version
@HannibalLecter-w3r5 жыл бұрын
@MJS showing month name as a text is bloat too because you can use numbers which use 2 symbols instead of 3
@Eryn3214 жыл бұрын
I got it!
@spot14014 жыл бұрын
Always funny when people double-u-tee-tee-arrr-dot-i-ennn Hamburg the curl when every german just reads it as "Wetter in /Hamburg" ("weather in Hamburg"), the way I supposed it was intended.... ;)
@GityaLIVEdnb5 жыл бұрын
your watch's attitude on your wrist is making my autism itch
@ashwathama40454 жыл бұрын
Anyone Here Know How i can force a window without a class or instance to be set on floating in dwm would really help Thanks
@ThreelionsSFIV4 жыл бұрын
You can set it using title and set isfloating true in your config.h
@piotrtalarczyk89875 жыл бұрын
Killing sleep 🤓 - thx
@alirezarabie10454 жыл бұрын
Luke please add your dwmstatus script to voidrice repo 🥺
@Alex-ix4qr5 жыл бұрын
curl wttr.in?format=4. You probably already know this, but the format argument will save you from parsing all that data by returning a single line.
@nicolasvillafan5 жыл бұрын
A series of videos that will be really good to see in my opinion is a deep dive into Linux Core utilities and off course the uitl-linux also. I mean who on youtube have take the time to brake down the most basics of Linux tools? right?... And by deep dive a mean look at the list of util-linux: pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html its a lot of stuff.. that is weeks of powerful meaningful core Linux content plus off course the are lots of things that can get really interesting like awk!.
@KDGNOR5 жыл бұрын
download link? for script
@emanuele65 жыл бұрын
Description (?)
@KDGNOR5 жыл бұрын
was not there when i post this. thanks for update me :D
@emanuele65 жыл бұрын
You are welcome.
@aqg7vy5 жыл бұрын
vim colorscheme? Looks like less depressing alduin
@knightrider5853 жыл бұрын
`echo -n` echoes without newlines.
@LukeSmithxyz3 жыл бұрын
Echo flags are not posix compilant.
@Aikidox495 жыл бұрын
Does anyone know how to install flashplayer on Void?
@EvilDeathNightmare5 жыл бұрын
Just use windows idiot
@KennedyElvis-e4l27 күн бұрын
Bartell Motorway
@dasenase5 жыл бұрын
How is this not bloat?
@rm-rf46125 жыл бұрын
big bloat use slstatus
@repomansez5 жыл бұрын
so a
@kinisis4205 жыл бұрын
Customizing bloat in dwm
@thefrontendfiend5 жыл бұрын
Tork
@paolobassi5445 жыл бұрын
I see from his github a new repository (17 days old actually): github.com/LukeSmithxyz/dwmblocks has he changed his statusbar?