Hacking On Xmonad - ManageHooks, Prompts and Hoogle

  Рет қаралды 16,666

DistroTube

DistroTube

4 жыл бұрын

I discuss a few important things that you should know about if you thinking about switching to Xmonad. ManageHooks sets window rules. Prompts are dmenu-like prompts that are builtin to Xmonad. And Hoogle is the search engine that you need to use to search the Haskell documentation.
REFERENCED:
► gitlab.com/dwt1/dotfiles/-/bl... - My config
► wiki.haskell.org/Xmonad/Gener... - ManageHook Examples
► hackage.haskell.org/package/x...
► hackage.haskell.org/package/b... - The "Maybe" type
► hoogle.haskell.org/ - Hoogle
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: / distrotube
💳 Paypal: www.paypal.com/cgi-bin/webscr...
🛍️ Amazon: amzn.to/2RotFFi
👕 Teespring: teespring.com/stores/distrotube
SOCIAL PLATFORMS:
🗨️ Mastodon: mastodon.technology/@distrotube
💬 IRC: irc://freenode #distrotube
👫 Reddit: / distrotube
📽️ LBRY: lbry.tv/$/invite/@DistroTube:2
DT ON THE WEB:
🕸️ Website: distrotube.com/
🐿️ Gopherhole: gopher://distro.tube
📁 GitLab: gitlab.com/dwt1
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/
🔊 Audacity: www.audacityteam.org/
💻 VirtualBox: www.virtualbox.org/
Your support is very much appreciated. Thanks, guys!

Пікірлер: 57
@jotix2570
@jotix2570 4 жыл бұрын
Hi DT. Great work, just one little note, is not necesary xdotool for doShift anymore, only the worspace name. Example: .... className =? "Lutris" --> doShift "9" .... does the work.
@DistroTube
@DistroTube 4 жыл бұрын
Yea, I didn't explain that well in the video. xdotool is required for my config (and anyone who happens to use it) due to the "clickable" workspaces I use in my xmobar. So workspace 9 for me is technically "workspace name".
@jotix2570
@jotix2570 4 жыл бұрын
@@DistroTube ok, I see thank you for the aclaration. Love your work. Greetings from Argentina
@Al-gc9ul
@Al-gc9ul 4 жыл бұрын
​@@DistroTube That sounds a little bit hack-ish though, and perhaps an indication that XMobar is not the bar for your setup. Would you consider a different bar setup? You are already using the XMonad DesktopConfig so any decent bar should integrate pretty much automatically. I know from past videos that you have a preference to stick with the bar that comes with the WM but technically, XMonad doesn't come with a bar. I tend to prefer Polybar myself because it integrates with most of my WMs and it allows me to use semi-consistent styling across multiple WMs easily, but if you prefer to stay in Haskell, TaffyBar seems like a good alternative and imo not less a part of XMonad then XMobar (hackage.haskell.org/package/taffybar-0.4.6/docs/System-Taffybar-WorkspaceSwitcher.html). Nice video btw! I'm also evaluating XMonad as my next WM and your videos, as always, have been extremely helpful!
@chonkov
@chonkov 4 жыл бұрын
You should probably use in that case doShift (myWorkspaces !! 0), where 0 is the workspace index (0-based)
@johntr7565
@johntr7565 4 жыл бұрын
This channel is gold
@griof
@griof 4 жыл бұрын
In case you wonder. When you find something like Maybe Int, you need to either write Nothing or Just integer. The reason is that Haskell doesn't have a Null / None value because the type system is very fancy and force you to tag values with the word Just when there exists the chance on none existing values
@griof
@griof 4 жыл бұрын
@@fossegrim287 oversimplification is a generous term hahaha. Sum types might be a little of a headache if your main language doesn't use/support them in regular bases.
@kianostad5064
@kianostad5064 2 жыл бұрын
Hey man, you’re the only linux user who is not programmer that i know and the same time one the most knowledgeable ones. 👏
@544512
@544512 4 жыл бұрын
thank you very much for the job you did. keep doing stuff like that. many greetings form RU fans
@driden1987
@driden1987 4 жыл бұрын
I’m running gnome on my work laptop. I love Haskell, I probably will install this on the weekend.
@AnzanHoshinRoshi
@AnzanHoshinRoshi 4 жыл бұрын
Thank you, Derek.
@DistroTube
@DistroTube 4 жыл бұрын
My pleasure!
@kriketedwards6347
@kriketedwards6347 4 жыл бұрын
I'm living in xmonad for the first time (been using tiling WM's since ion 3)... about a week and a half in. I love it! Having a lot of fun with haskell. Especially when I'm stuck on something for a while and finally recompile without getting an xmessage!
@DistroTube
@DistroTube 4 жыл бұрын
That is awesome!
@kriketedwards6347
@kriketedwards6347 4 жыл бұрын
Once you get the hang of the syntax, haskell is actually pretty straightforward. I just look at the the source for the module I'm trying to use and you see everything you can do with it.
@SenthilBabuji
@SenthilBabuji 4 жыл бұрын
Finally DT pushed me into Xmonad and I thank him for that. Bspwm, bye bye!
@auroradraco9974
@auroradraco9974 4 жыл бұрын
Have been using i3 for a while now becuase its easily configurable but it seems that haskell has such good documentation that this might actually be worth a try. I may tinker with it this weekend
@NapoleonWils0n
@NapoleonWils0n 4 жыл бұрын
the xmonad prompt shows you commands like view to switch workspace, and next and previous layouts and switching screens rather than trying to replicate dmenu or rofi as application launcher ( fyi rofi can start ssh sessions) what interests me is using the prompt instead of keyboard shortcuts to switch layouts, toggle struts etc eg: create a custom list of xmonad actions from your config like the different layouts, and the options you have mapped to keys then when you run the xmonad prompt you could type full to switch to full screen layout or grid, toggle struts there is a section on the xmonad prompt page that lets you create a prompt with a custom command list, that might work hackage.haskell.org/package/xmonad-contrib-0.13/docs/XMonad-Prompt-XMonad.html going to have a play around with the xmonad prompt and see what possible import XMonad.Prompt.XMonad i keep dmenu menu bound to super + p then set the xmonad prompt to shift + super + p , ("S-M-p", xmonadPrompt def)
@DistroTube
@DistroTube 4 жыл бұрын
I also found Xmonad.Prompt.Pass for a pass menu. It's three prompts actually...one for copying your passwords to your clipboard, one for generating new passwords, and one for removing passwords.
@agostonvolcz
@agostonvolcz 4 жыл бұрын
Hi DT. In a former video, you mentioned that you have Xmobar on all monitors, and I wanted to do just that on my system (laptop with external monitor), but it only shows on the "output" set as primary, and when I run xrandr, it shows that I have "Screen 0" with both displays in it.So how did you set your Xorg to treat each output as a screen?
@josephferren6372
@josephferren6372 4 жыл бұрын
For Openbox, do you think Ulauncher or dmenu would be better? Also what panels work well with Openbox? Could Google it but not many people have used so many wm's so I thought I'd ask your opinion.
@gireeshmarathi2796
@gireeshmarathi2796 4 жыл бұрын
Hey DT can you make a video on xkb. Can't use xmodmap on swaywm and this xkb is so overwhelming
@SherubThakur
@SherubThakur 3 жыл бұрын
I never thought that I would someday hear someone say "Haskell documentation is fantastic" ever in my life! I just play around with Haskell sometimes (not a full-time Haskell dev) and I think it has really crap documentation. I love this language though, but it sure as hell is not for documentation. I think XMonad might just be an exception.
@aoeuplphe7166
@aoeuplphe7166 4 жыл бұрын
Why use renamed to rename the layouts? I've seen this in a few people's configs and I can't figure out what actually changes in day to day use from renaming the layouts.
@michaeldina1103
@michaeldina1103 4 жыл бұрын
Xmonad is pretty cool.
@Joy_jester
@Joy_jester 4 жыл бұрын
Hey,what's the theme ? It looks great
@AliensInc.
@AliensInc. 4 жыл бұрын
that's extreme :)
@xtnctr
@xtnctr 4 жыл бұрын
Best hack ever
@lainproliant
@lainproliant 4 жыл бұрын
XMonad is beautiful. I've been using it for 12 years. I've tried i3, qtile, and a few others, but I always end up coming back to XMonad.
@alexandremarangonicosta
@alexandremarangonicosta 4 жыл бұрын
Used i3 for 7 years. Tried DWM and xmonad because of you. Never going back again....Question: can you use arrow keys inside alacritty with vim?
@Arkayaplays
@Arkayaplays 4 жыл бұрын
I am 84th viewer and 9th like and i hate certainly fact of that so less like to view ratio pls do like the video guys
@thesolutionstore1
@thesolutionstore1 4 жыл бұрын
I mispelt google and found hoogle 😂 what is it used for
@vedantmatanhelia1016
@vedantmatanhelia1016 2 жыл бұрын
Hi DT. You have a great config. I have something I would like to add tho: the clickable option that you have can be achived using XMonad.Util.ClickableWorkspaces
@NapoleonWils0n
@NapoleonWils0n 4 жыл бұрын
hi dt - rofi can have icons next to applications in the launcher, it looks the bomb when i type the name of application it auto switches the workspace with it on, and i have ssh working as well i think rofi has an advantage over dmenu because it just shows you the actually applications instead of all the binarys on your system several times with demu i have launched afire when i meant to launch firefox and wondered why cpu was thru the roof will do a video later about rofi and showing icons in the menu, unless you get there first rofi has a new config syntax which is on the arch wiki wiki.archlinux.org/index.php/Rofi ~/.config/rofi/rofi.rasi configuration { modi: "window,drun,ssh,combi"; theme: "solarized"; font: "Inconsolata 14"; show-icons: true; combi-modi: "window,drun,ssh"; } xmonad.hs , ("M-p", spawn "rofi -show combi -modi combi")
@ertwro
@ertwro 4 жыл бұрын
I tried Xmonad and unregistered Haskell modules is an absolute hellish nightmare.
@lokegustafsson247
@lokegustafsson247 4 жыл бұрын
J.P. Silva i use stack to compile xmonad. It solves all dependency issues
@ertwro
@ertwro 4 жыл бұрын
@@lokegustafsson247 I was just using the AUR in Arch to install pandoc and shellcheck that were my other haskell programs. But a Recent update just destroyed them and I tracked back the problem to some modules that no longer exist from Xmonad in my computer and now I always get a warning that some haskell modules can't be unregistered or registered.
@lokegustafsson247
@lokegustafsson247 4 жыл бұрын
J.P. Silva haskell package management is sadly horrible, which is why stack exists. brianbuccola.com/how-to-install-xmonad-and-xmobar-via-stack/ You should install pandoc and shellcheck similarly, compiled in their own sandbox. I actually dont even have ghc globally installed. To save some disk space you might want to look at the haskell arch wiki page, under stack configuration.
@ertwro
@ertwro 4 жыл бұрын
@@lokegustafsson247 I have stack. The first thing I did was read the wiki. The updates with pacman still show the "Unable to unregister modules" while updating sometimes it even refuses to update. Using Haskell Is almost as bad as using Windows, to be honest.
@lokegustafsson247
@lokegustafsson247 4 жыл бұрын
J.P. Silva You say you have stack, but encounter problems when updating with pacman. My point is that haskell breaks when linking dynamically and reusing dependencies, and so you should build in stack sandboxes. You should not have any haskell packages installed with pacman and pacman should not update any of your haskell stuff. From what you write you appear to not be building in a stack sandbox.
@jeetadityachatterjee6995
@jeetadityachatterjee6995 4 жыл бұрын
No don't make me do it! I don't want to go down another rabbit hole! I already have Emacs and tmux to configure ahhhhhhhhhh
@RP-kr2mg
@RP-kr2mg 4 жыл бұрын
Do you really implement upon these vids or are joking lol. Stay happy in Plasma, Eclipse and Visual Studio :)
@auroradraco9974
@auroradraco9974 4 жыл бұрын
Lol, no reason to use tmux if you use a tiling wm though
@mrkhoi3
@mrkhoi3 4 жыл бұрын
@@auroradraco9974 I use it for the copy-mode and the plugins like tmux-fingers, tmux-jump, etc. For example, you could config tmux and tmux-fingers to allow you to select and open links in web browser, open file path with compilation errors at certain lines and columns in your favorite code editor. It also get tedious to manage the way too many windows. For example, if you are dealing with 2 server clusters with around 10 nodes each, you probably want to manage 2 tmux sessions instead of 20 windows. Yes I know it is still manageable, I do know and use i3 focus parent and tabbed containers, but I find it taxing on my brain to carefully not messing up the windows config and found it painful every time I forget to correctly focus parent/ child container before moving/switching focus...
@jeetadityachatterjee6995
@jeetadityachatterjee6995 4 жыл бұрын
@@RP-kr2mg I implement on things that interest me and xmonad is very interesting. Plus i I used vscode and it was meh and I am a gnome man
@jeetadityachatterjee6995
@jeetadityachatterjee6995 4 жыл бұрын
@@auroradraco9974 I don't
@NapoleonWils0n
@NapoleonWils0n 4 жыл бұрын
Hi DT, i have got Firefox Picture in Picture working as a floating window in xmonad kzbin.info/www/bejne/sICzdKiwi9hpmLs here's the code for myManageHook , className =? "Firefox" resource =? "Toolkit" --> doFloat -- firefox pip i have dwm style tagging setup so i can tag the pip video across mulitple workspaces, v cool also set mpv to float in the center of the screen which means i can go full screen without toggling struts import Data.Ratio ((%)) -- for video import XMonad.Hooks.ManageHelpers (isFullscreen, isDialog, doFullFloat, doCenterFloat, doRectFloat) myManageHook className =? "mpv" --> doRectFloat (W.RationalRect (1 % 4) (1 % 4) (1 % 2) (1 % 2)) feel free to steal the code i have stolen enough of yours github.com/NapoleonWils0n/freebsd-dotfiles/blob/master/.xmonad/xmonad.hs obs studio gives me a black screen with xcomposite even though i have import XMonad.Hooks.EwmhDesktops and xmonad $ ewmh desktopConfig in my config is there anything else needed to get obs working keep up the good work
@usrname1105
@usrname1105 4 жыл бұрын
FiRsT
@DistroTube
@DistroTube 4 жыл бұрын
CoNfIrMeD
@Arkayaplays
@Arkayaplays 4 жыл бұрын
@@DistroTube you write it like Con , fir and MeD hmm nice way to say three words in one
@Yakushii
@Yakushii 4 жыл бұрын
Dmenu REPLACEMENT?! What sort of heathen are you?
@DistroTube
@DistroTube 4 жыл бұрын
Haskell masterrace! :D
@DJ_Cthulhu
@DJ_Cthulhu 4 жыл бұрын
Windows 10 Rules 🤘
Hacking on Xmonad - GridSelect, ToggleStruts, ToggleBorders
12:14
Discovered Some Cool Stuff In Spectrwm and Qtile
18:22
DistroTube
Рет қаралды 35 М.
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 18 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 36 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 111 МЛН
Recently Left i3 For Dwm? If so, keep moving...to Xmonad!
17:00
DistroTube
Рет қаралды 101 М.
98% Cloud Cost Saved By Writing Our Own Database
21:45
ThePrimeTime
Рет қаралды 316 М.
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 138 М.
18 Commands That Will Change The Way You Use Linux Forever
29:50
Akamai Developer
Рет қаралды 1,2 МЛН
What Are Linux Users Putting In Their Config Files?
31:47
DistroTube
Рет қаралды 91 М.
Getting Started With Xmonad
42:47
DistroTube
Рет қаралды 338 М.
Trying to do Simple Tasks on Linux lol - Daily Driver Challenge Pt.3
29:44
Linus Tech Tips
Рет қаралды 2,7 МЛН
Turn Your Window Manager Into A Desktop Environment
16:47
DistroTube
Рет қаралды 137 М.
Explaining Everything In My XMonad Config
34:22
DistroTube
Рет қаралды 35 М.
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,6 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 8 МЛН