Dwm Is a GREAT Window Manager (After It's Patched!)
HTML-код
- Опубликовано: 23 дек 2024
- I've spent the last two days living in "dwm" again, mainly working a build for DTOS. I've patched it to include some important functionality that I think is critical--especially adding support for keychords!
REFERENCED:
► suckless.org/
► gitlab.com/dto...
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: / distrotube
💳 Paypal: www.youtube.co...
🛍️ Amazon: amzn.to/2RotFFi
👕 Teespring: teespring.com/...
DONATE CRYPTO:
💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ
DT ON THE WEB:
🕸️ Website: distrotube.com/
📁 GitLab: gitlab.com/dwt1
🗨️ Mastodon: fosstodon.org/...
👫 Reddit: / distrotube
📽️ LBRY/Odysee: odysee.com/@Di...
FREE AND OPEN SOURCE SOFTWARE THAT I USE:
🌐 Brave Browser - brave.com/dis872
📽️ Open Broadcaster Software: obsproject.com/
🎬 Kdenlive: kdenlive.org
🎨 GIMP: www.gimp.org/
💻 VirtualBox: www.virtualbox...
🗒️ Doom Emacs: github.com/hli...
Your support is very much appreciated. Thanks, guys!
Hey DT, I'm the author of the keychord patch, I'm glad you like it. I să that you install the older version of the patch which uses a lot of malloc, realloc, and memcpy, which would make the window manager very slow sometimes and might lead to crashes. This is my bad since I labeled the date wrong on the new patch. please use the dwm-keychord-6.2.diff. This change the implementation to a stack allocated array that makes it way faster and avoids crashes. Thank you for showing my patch to others!
Tried I3, bspwm, qtile and even ratpoison: keep coming back to dwm for it's simplicity.
what about awesome ?
@@Little-bird-told-me What about HAWSome?
@@Little-bird-told-me Awesome is 🔥
awesome takes much time to configure
I used to patch dwm a lot and write my own code for dwm (im a c programmer so it was easy). But in the end I went back to using plain dwm without any modifications. I realized that dwm defaults are better if you just get used to it.
Yes. And many times when you would patch it, you can do it very simple ways: like just putting various dmenus to regular hotkeys in dwm is even better than key coords.
Like WIN+S opens the "start" menu or WIN+C opens "control panel menu" where you just write in your command dmenu style... I do not do anything such, but looks so simple and better...
8:50
I just noticed: I have pretty much the same 4 first "tags" in BSPWM and I didn't do that consciously. In fact, I just used desktops in the way that made sense to me at the moment! For some reason it just comes naturally to have work in 1 and web in 2 and docs later. I put them in 3 not 4.
DWM has about 1k lines of code and is really light on features while xmonad has a bit over 2.2k and has everything including the kitchen sink. Really makes you wonder 🤔
Well I have tried to understand DWM's source code and it's already hard to do. And I think that's the point of DWM, to code it yourself. Now would I want that doubled? Eh...
I think this is more about imperative programming vs functional programming than WM itself
But XMonad is written in glorious Haskell and Dwm is written in a peasant language (C). :D
Then the ducks saw Haskell
"Aaaa! Haskell!"
And ran away and DT lost his cover.
@@theodorealenas3171 dwm's source code is poorly commented, has horribly named variables, but it's pretty damn clean
What a coincidence, just switched to dwm yesterday. It's very lightweight and clean
dwm is my personal fav and i keep coming back to it..
It's a comfy window manager.
@@DistroTube Definitely agreed its very comfy, hard to switch to anything else after using it for me. Only reason i am still not using it is because well i jumped into wayland after my old pc died and didnt feel like cloning my dwm config from the git repo. Then after that ended i switched to the cinnamon desktop environment somehow. And now that's where I am
@@DistroTube I agree
I really can't get over the use of the word 'chord' here. 'Chord' normally refers to keys that are held together - at the same time. If you break up a chord it becomes an arpeggio, though I haven't heard that term used with typing. A quick check of QMK reveals that common usage of the term 'chord' does seem to follow the musical definition. Arpeggiation is allowed in QMK for chords, but what seems to be implemented here is a chord sequence, not an arpeggio.
I think it's more like a chord progression that it's referring to. So with a piano (this isn't a real one I'm just using an example) you could hold C and E together for a measure, then hold C and F, then E and G, and so on. So yeah while the actual action isn't a chord, it still is kinda similar.
dwm-flexipatch github repo contains all the patches and organized, someone said that if you apply multiple patches for dwm by yourself, sometimes it won't work as expected. I haven't tried the repo though. (I'm using i3, interested in dwm)
try it its really good
@@amoeba8888 the only thing I don’t like is how much crap it pulls in it would be better if it would pull in whatever you select rather then everything
I use dwm with really quite minimal changes. I added a 1 pixel gap, but only between windows, not between the screen edges. I also changed it so that when you move a window to another monitor or virtual desktop focus follows the window, you're taken to the other desktop, etc. There's also a horizontal layout option, but that's pretty much it.
Wow that is awesome, no pun intended! Also, love the background wallpaper!
Great work. I love dwm and suckless. I like the fact that you haven't overdone the patching. I am an ALT sort of guy lol. thanks.
I was just going to switch to dwm after learning some C. This will help me out a ton. Thanks.
there's one more purpose for gaps: allowing interacting with the root window even if other windows are open. This is useful if you have a right click menu for your desktop for example.
You can use sxhkd in any window manager to use keychords.
Enough. I have enough of this "dtos" thing. Is time for me to become a Patreon of yours. This is wonderful!!!
Proprietary fonts aren't exactly the end of the world but it's worth noting that JoyPixels is proprietary
I use nerd fonts. I thought it was the standard.
sys tray is important to me. I patch it in first usually. I do not need it to launch stuff from it. I need it as indicator for chat apps so I can see if someone messaged me while I was AFK
I made the comma key lock the "mode".
Super m p pauses the music
Super m n plays the next piece
Super m , p n p n p p p
Super i increases the window size
Super d decreases the window size
Super , i i i i d d
This means the key chord basically never ends, so I use the dot key to stop it.
It's convenient! Sorry but I skipped some parts of this video so I don't know if you have this feature. Maybe you do and I missed it.
Btw I'm not using DWM I made my own hotkey daemon.
I'm sure you'll like chords, I prefer them to key combos. Good luck!
That sounds appealing to me. I have not seen it in the video as a possibility. Is there a patch for dwm doing that?
@@oalfodr I don't know. If I get into DWM eventually I'd like to make it.
Dwm is quirky but I like it. I've tried several others but I always come back to dwm, feels like home to me.
I love DWM, I'm just wondering what to use if we get pushed to Wayland in a couple of years
I prefer Qtile and have started using it exclusively on my system. I especially like tge Arcolinux implementation of Qtile as it offers a sane starting point from where I modified my cuffent configs. I never thought I'd be comfortable in a tiling window manager but made tge switch after a large update to Cinnamon broke my display configuration. I really like how all the basic config files are all in one place with Qtile. I can easily copy them in from a backup if I break my basic setup. I've got a sight condition so being able to have my bar, key bindings, colour scheme, wallpaper and display resolution restored just by copying a few files onto my system is a real time saver. Does anyone else here have any experience of disabilities and tiling window managers?
the pattern i like to follow is super key for system, alt key for app UI and control key for everything else in an app.
I think the reason rotate stack isnt in there by default is because they have the command to swap master. And that alternates between the different windows in the stack. So you really are just accomplishing the same thing, just watching the windows move in a different way on the screen.
Thank you so much DT, I'm just learning a few programming languages and I'm trying to rice awesome, so this will give me a great headstart!
I love dwm the way it is, the only patch I apply is a systray patch that is useful for my use, despite my comment I love the videos I always watch to stay on top of other features
hey DT dont know if you knew this but the keychain patch is better suited for what you are using the courds for as courds are more for 2 button commands after the first 2 button command for example super+t then super+k for kitty where as with chains it would be super+t then k :)
Actually dwm doesn't require too many patches to be usable. I used to have like 9 patches but now I only have 3.
My dwm build has over 40 patches. Lots of obscure functionality it's harder to get in other window managers, even extensible ones, because you don't generally edit the main source files of the program in them.
imo, in terms of bate minimal window managers, my limit is at bspwm for tiling, and berrywm for floating
Those 2 have everything you would need without having to tinker too much with regards to source code
You have full control over positioning and/scripts
They also use sxhkd which makes it modifiable
every application is great after it has been patched by someone. The problem is that not everyone is able to patch an application! (I apologize for my English..)
dwm is the best WM I've used. It does one thing and does it well. I keep it as simple as possible so I don't fix it a lot. Only 'autostart' patch. Together with dmenu, it is a very robust and efficient work environment.
How do you increase and decrease sound volume/brightness in dwm?
This, at this point, is the makings of a distribution!
How to get the random arts in terminal at start-up ?
That's my 'shell-color-scripts' program. You can find it on my GitLab. I also have it packaged in the AUR and in the dtos-core-repo.
@@DistroTubeOh DT! Appreciate and respect your work! Just started and running dtos on a separate partition!
1. Do all WM run on top of xorg??
2. What is the difference between Wayland and xorg??
1. No, there's wayland WMs (Sway, river, etc..)
2. They're both display servers. Xorg is the incumbent and has more programs, Wayland is newer, has a better codebase, better security and less screen tearing/flickering. Xorg is easier to write WMs for, because under wayland window managers have to be compositors too
the laptop im using as a media server is using xfce which has always seemed a lil over kill for something that essentially sits alone on a shelf unless im updating it or putting videos and music on it,
dwm looks good but im unsure of whether itd be worth setting it up, any advice on this?
Could this config file be rewritten as a .org file and function properly?
Hey DT! I love DTOS, but after the update I performed a week ago, I have little trouble with dmenu on my PC. When I press keybinding to run dmenu, I hear a sound, but the run prompt does not launch. I tried to run your dm-run script from the terminal and received only this message:
usage: dmenu [-bfiPrv] [-l lines] [-p prompt] [-fn font] [-m monitor]
[-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]
How can I fix it? DTOS is also installed on my laptop, and dmenu works perfectly. But on PC it's broken and it annoys me a lot.
The xmonad keybinding should play sound and launch dmenu at the same time. My dmenu is actually a script 'dm-run' (should be in .local/bin). If it's not there, check /etc/dtos/.local/bin. Copy it over to HOME/.local/bin. And make sure all scripts in that directory are executable.
@@DistroTube I have a suspicion that dmenu-distrotube broke after the update, but I don't know where exactly to look for this break. So far, my research has led me to believe that dmenu is not working correctly, because when I run the .local/bin/dm-run file in the terminal, I get this message (which I mentioned above):
usage: dmenu [-bfiPrv] [-l lines] [-p prompt] [-fn font] [-m monitor]
[-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]
To me, it doesn't look like an error, but rather a notification about incorrect operation or incorrect syntax. But I'm ruling it out because I haven't changed anything in your scripts since I first installed DTOS.
I tried to solve this problem by reinstalling the dmenu-distrotube, dmscripts and dmscripts-distrotube packages. I also reinstalled DTOS from gitlab several times but it didn't help.
How about a video on brightness and volume keybindings with dwm and action on pressing the power button
Check out XF86keysym.h header file to see the key to bind in your config. Have amixer to change volume and light to change brightness. There are guides online, everywhere.
@@just__khang thanks you, I will certainly check that out.
been using ubuntu for a while. started with arch over the weekend, definitely gunna change out my default dwm with this, super neat
I am of the opinion that you should never have to recompile software as an end user, especially for configuration changes.
I'm inclined to agree, although I'd not expect to find the same over there at Suckless.
for that you can use the xresource patch
And suckless has an opinion that they are making the software for people who are willing to do that. Pretty simple.
@@herbertwestiron Well they’re free to have that opinion. But I’d rather use that time to compile my own projects.
@@AshtonSnapp Fair enough. If that's what you wanna do.
Literally the only patch I really need for dwm is the statusallmons patch. I could care less for key chords and really all I need is dmenu or rofi.
Yeah rofi and some bash script is the way for me right now
KEY CORDS: DT you can use sxhkd with awesome-client for AwesomeWM, to get Awesome to get the keybinding you want
in the sxhkdrc
# desc
super + j
echo "require('hotkeys').focus_next_window()" | awesome-client
then added a hotkeys.lua to the awesome config folder, with
local awful = require("awful")
return {
-- super + j
focus_next_window = function()
awful.client.focus.byidx(1)
end,
....
}
and then you can add all the commands in the table that is return here.
Why do You abbandoned mononoki?
How you deal with the window stack is different to how I do. I guess that is why that functionality is not defined by default. So you can change behaviour to what you want without having stuff you don't want in your window manager.
I recommend using git to patch dwm also make a commit after each patch. It will really help you go back if you don't like the patch.
Hay DT have you heard of penrose wm its a build it yourself wm written and configured in rust
Do I understand correctly? You have to patch a header file and recompile to adjust certain key commands? ROFL
I haven't used DWM but I morphed another suckless utility into my own thing, and I had to recompile constantly. You know what? If it takes half second you can't even feel it. You can set it up to recompile automatically when you modify the header file. It's just as fast as anything!
Was also alienated a bit at first - but now the 5th year in it - and exactly that architecture proves just superior, for certain people. Myself included. Btw: A full recompile / reinstall run takes a second or so.
dwm doesn't have a traditional config file, what you edit is part of the source code, and then recompile it. That keeps the memory footprint low, and allows you to do do more advanced customizations than a none code config allows. On really old machines DWM is the only thing I run. It literally runs with like 10-20MB of RAM over just a TTY, so that's the overhead of Xorg included. If you use a really light distro like Void or gentoo you can get under 100MB at idle, which is amazing for a full HD graphical environment in 2022.
@@armynyus9123 This is really just denial. An architecture that would move these configuration into a separate file, which is the default mode for literally any software package on Linux, would be so much better. For example, you could simply use a GUI, and still not lose the ability to directly edit.
I personally am more of an XML guy, but I imagine if the config was a JSON file with a schema attached, you could even have syntax highlighting and auto-completion to make it easier for newbies.
Overall, config in headers that need compilation is junk, without an actual benefit. It wouldn't be any slower to read a config file and put that into the structures that you are creating here manually.
It also completely breaks the ability to distribute a compiled (i.e. final/released) package file, which is what most users want.
@@graealex"simply using a GUI" would make the source code like 20x bigger and it would make it much harder to edit.
One of my favorite things about dwm is that it's possible to understand almost every part of it's code, and extend it.
Suckless dev: Here's dwm. It's a window manager.
User: How do I...
Suckless dev: It's a window manager.
User: But I also want it to...
Suckless dev: Did I stutter?
But seriously, I love dwm and the fact that it mostly just does the one thing it's meant to do. Sure, they made it extensible but I love the simple, do one thing and do it well, approach it takes. I general, I disable all keyboard shortcuts that aren't for manager windows and use sxhkd for hotkeys.
For restarting dwm I start dwm in a loop and have a hotkey to kill it. When I kill it, it automatically restarts. I don't think it works with a log in manager but I log in from a tty.
I have a systray in my dwm, because I'm awesome.
my only "problem" with dwm is that it needs to be patched up for me to properly use it. But always wanted to live in it for a while.
YEAH Dereck that's an excellent dwm configuration, yet please could you please show me how to apply dark mode for any app I install in my system? 🤗🙏
Can u show how to make steam auto start on an ubuntu desktop?
I am happy dwm does not have key chords by default. It should be minimal - the way I like it.
Btw.... what about binding normal keys to various dmenu scripts?
I mean you can have one dmenu variant for what your "key coord" would start with (win+c for example) and in that dmenu you can have commands that are specific to that case. All this basically works with "stock" dwm and only changing regular hotkeys to run various dmenu.
Yes... you cannot achieve , you can achieve which IMHO is even better when it comes to possibilities.
😭 I use gnome btw...
Yes its really great, its basicly the father of most tiling window managers
I think this is what you are looking for in awesomewm, put this code in global keys, replace z with whatever key you want:
awful.key( {modkey}, "z", function()
local grabber
grabber =
awful.keygrabber.run(
function(_, key, event)
if event == "release" then return end
if key == "a" then awful.spawn.with_shell("notify-send 'this is a'")
elseif key == "b" then awful.spawn.with_shell("notify-send 'this is b'")
elseif key == "c" then awful.spawn.with_shell("notify-send 'this is c'")
elseif key == "d" then awful.spawn.with_shell("dmenu_run")
elseif key == "e" then awful.spawn.with_shell("notify-send 'this is e'")
end
awful.keygrabber.stop(grabber)
end
)
end,
{description = "test keygrabber", group = "awesome"}
),
I found this on reddit, i test it out and it works, i don't know if it will work with every key chord that you use though.
Thanks, I'll try it out when I get a chance. :D
That will come in handy, thanks
Linux Mint 21 won't use the controversial memory management feature currently affecting users of Ubuntu's latest LTS release.
Although Linux Mint 21 will still be based on Ubuntu 22.04 LTS it eschews systemd-oom, despite on going efforts by Ubuntu developers to "tame" the bolshy behaviour of the daemon.
To recap, systemd-oom is a user-space "killer" that force-quits apps with high memory usage if/when overall system memory is getting low. The feature is designed to intervene early to prevent the infamous system lockups that occur on Linux when memory is maxed out.
However, some Ubuntu users have found the daemon is killing critical applications despite their overall system responsiveness not being affected by memory related pressures.
What Mint plans is use in place of system-ood to mitigate low-memory situations isn't stated, but the Linux kernel has its own memory-management features so users will, hopefully, be protected (and given Mint is frequently used on lower-end systems with constrained memory, it's perhaps more vital here).
A Linux Mint 21 beta is due to be released next week, followed by a stable release a few weeks after.
Other changes in Linux Mint 21 will include .webp image support in the Nemo file manager and image viewer, home directory encryption available in the installer, and keeping os-prober enabled by default to ensure dual-boots work as intended.
As reported a few months back, Linux Mint 21 makes a major change to its bluetooth stack by replacing its home-grown Blueberry tool with the latest version of Blueman.
I dont like to use super as mod key, Its unconfortable. I use altgr as my mod key since its not use in any program as a keybinding like the alt key in firefox.
I often use altgr for typing different characters
I have been using the same keyboard for years, it is an old PS/2 keyboard with a long cable and it does not have a super key... but I have never been much of a key combo person so I never really cared. now that I'm looking at tiling window managers, I see that key combos are used a whole lot and I might get into it. but I guess it is a good thing that they are all reconfigurable, considering as long as I'm using this keyboard I will not be able to map anything to the super key.. (but also recently i stopped ignoring people when they start espousing the wonders of having a good mechanical keyboard, i have considered finding a good, affordable, one and trying it out.. 😋)
A music snob would say that what you refer to as "key chords" should really be called "key arpeggios"
Rotate stacks isnt that required You can use zoom and a patch to move a stacks like i3
Has awesome key chords?
For those who doesn't use keychords it is far convenient to config key bindings through xbindkey
Plain dwm is peak comfiness
God bless you.
remember suckless is about sucking less so if the project says is a window manager is a window manager and thats it, nowhere in the name says keychord manager
Dwm 💥
you made a mistake. your not supposed to edit config.def.h that’s an example file on how you could set it. the actual file you should edit is config.h
Good video.
nice looking config
Have infinite key-bindings, can't remember all of then.
I slammed together a hotkey helper and it broke because I tried to make it a little better. This has happened many times. Now I practically don't have it. For one, skill issue, on the other, why do I have to make on my own something so fundamental!
I use xmodmap to map my caps lock to hyper, so instead of like super+p+a will be hyper+a. Linux has so many workarounds. Not a big fan of capsLock :)
Take a look at stumpwm
I don't need reload, i don't use a dm
I use sxhkd.
👍
👌
おはようございます
Can you please start a networking playlist with Linux in oder to grab the underlying knowledge about networking in Linux
Robinson Linda Clark Amy Harris Elizabeth
Hey DT. Love your Channel. I've always had the question ever since I've been messing around Linux since red hat 6. Why is most programs or apps got weird names I guess you could say or spelling. Keep up the good work.
It makes it much easier to Google for stuff when the name is weird and unique. When you name a piece of software with a word that's already in the dictionary then the discoverability of that software is lower off the bat because you have to compete with all the search results relating to the original meaning of the word.
You are doing a sin, making Linux for the ppl. Like planting a seed. An idea. The result will be awesome. You Can't measure the impact in the future. 73
second!
Confirmed! This guy is NOT first!
@@DistroTube and the first guy didn't even write "first" :(