Тёмный

Hacking On Xmonad - ManageHooks, Prompts and Hoogle 

DistroTube
Подписаться 252 тыс.
Просмотров 17 тыс.
50% 1

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/dwt... - My config
► wiki.haskell.o... - ManageHook Examples
► hackage.haskel...
► hackage.haskel... - The "Maybe" type
► hoogle.haskell... - Hoogle
WANT TO SUPPORT THE CHANNEL?
💰 Patreon: / distrotube
💳 Paypal: www.paypal.com...
🛍️ Amazon: amzn.to/2RotFFi
👕 Teespring: teespring.com/...
SOCIAL PLATFORMS:
🗨️ Mastodon: mastodon.techn...
💬 IRC: irc://freenode #distrotube
👫 Reddit: / distrotube
📽️ LBRY: lbry.tv/$/invi...
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.audacityte...
💻 VirtualBox: www.virtualbox...
Your support is very much appreciated. Thanks, guys!

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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)
@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.
@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.
@SenthilBabuji
@SenthilBabuji 4 года назад
Finally DT pushed me into Xmonad and I thank him for that. Bspwm, bye bye!
@kianostad5064
@kianostad5064 3 года назад
Hey man, you’re the only linux user who is not programmer that i know and the same time one the most knowledgeable ones. 👏
@driden1987
@driden1987 4 года назад
I’m running gnome on my work laptop. I love Haskell, I probably will install this on the 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.
@johntr7565
@johntr7565 4 года назад
This channel is gold
@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
@SherubThakur
@SherubThakur 4 года назад
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.
@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.
@AnzanHoshinRoshi
@AnzanHoshinRoshi 4 года назад
Thank you, Derek.
@DistroTube
@DistroTube 4 года назад
My pleasure!
@544512
@544512 4 года назад
thank you very much for the job you did. keep doing stuff like that. many greetings form RU fans
@michaeldina1103
@michaeldina1103 4 года назад
Xmonad is pretty cool.
@AceOfSpadez79
@AceOfSpadez79 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.
@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?
@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
@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
@xtnctr
@xtnctr 4 года назад
Best hack ever
@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?
@Joy_jester
@Joy_jester 4 года назад
Hey,what's the theme ? It looks great
@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.
@gireeshmarathi2796
@gireeshmarathi2796 4 года назад
Hey DT can you make a video on xkb. Can't use xmodmap on swaywm and this xkb is so overwhelming
@AliensInc.
@AliensInc. 4 года назад
that's extreme :)
@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.
@thesolutionstore1
@thesolutionstore1 4 года назад
I mispelt google and found hoogle 😂 what is it used for
@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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-zOPCuzVs6bY.html 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
@Yakushii
@Yakushii 4 года назад
Dmenu REPLACEMENT?! What sort of heathen are you?
@DistroTube
@DistroTube 4 года назад
Haskell masterrace! :D
@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
@DJ_Cthulhu
@DJ_Cthulhu 4 года назад
Windows 10 Rules 🤘
Далее
What Are Linux Users Putting In Their Config Files?
31:47
Part 5. Roblox trend☠️
00:13
Просмотров 2,6 млн
Common Questions About Tiling Window Managers
18:56
Просмотров 76 тыс.
Switching to Xmonad - Not Exactly Day One
31:44
Просмотров 44 тыс.
XMonad, You're Simply The Best!
20:57
Просмотров 73 тыс.
Become a bash scripting pro - full course
36:00
Просмотров 61 тыс.
Want A List Of Your Keybindings? Write A Shell Script!
27:11
Manage Your Dotfiles with Home Manager!
32:06
Просмотров 62 тыс.
Xmonad TreeSelect Is A Unique Menu System
10:27
Просмотров 10 тыс.
Become a shell wizard in ~12 mins
12:25
Просмотров 253 тыс.
The Tragedy of systemd
47:18
Просмотров 1,1 млн
Part 5. Roblox trend☠️
00:13
Просмотров 2,6 млн