Axarva / dotfiles-2.0

XMonad™️. Widgets go brr.
MIT License
1.74k stars 157 forks source link

Change xmonad installation #105

Open Kellegram opened 2 years ago

Kellegram commented 2 years ago

It is better to grab xmonad-git and xmonad-contrib-git from AUR instead of using the non-git versions or the pacman version.

I recommend grabbing: xmonad-git xmonad-contrib-git xmonad-recompile-pacman-hook-git from the AUR. the pacman hook will prevent a black screen on boot which can happen sometimes. The only way to fix it is to go to a TTY and recompile xmonad. That issue is common enough to be of concern. There is also a non-pacman hook, dunno if it's better. The git version of xmonad and contrib have fixes significantly faster than the main repo ones. They fix an issue with flameshot for example, one of them anyway.

Kellegram commented 2 years ago

I understand being hesitant to use the git version though coz breaking changes may arrive, but your xmonad setup is super minimal so unlikely. I had one breaking change in mine and I have a 600 line config, the change was described in their breaking changes doc anyway.

Edit: also ewmh will 100% work if you use this, so you can get rid of many lines, anything that manually added fullscreen support. All I have now is:

xmonad  $ docks $ ewmhFullscreen $ ewmh def 
      { your hooks and stuff here
[...]
Kellegram commented 2 years ago

Another discovery when using everything bleeding edge: I get less issues in games when running fullscreen. Before I had trouble with games turning black permanently if I left the game window and stuff.

d2rgaming-9000 commented 2 years ago

@Kellegram I think this is possibly related to my issue which I raised a few days ago. I'll test this out and see if it does anything.

Kellegram commented 2 years ago

FYI, I am in the process of writing a script for my xmonad arch installation. This one installs Xmonad and xmonad-contrib using stack, which detaches it from the package manager completely: https://gitlab.com/kellegram/kellmonad/-/blob/master/install_xmonad_with_stack.sh
This avoids majority of issues that appear with xmonad on arch (courtesy of the Arch maintainers hating haskell) and ensures you get latest version, since the ones in pacman repos are severely outdated and using -git is not as stable as it could be precisely due to the haskell dep issues.

d2rgaming-9000 commented 2 years ago

~~@Kellegram Greetings, reporting my test. Did pacman -Syu xmonad....git's version, and I get error: target not found: xmonad-git.... Could you link the repo.

~~

d2rgaming-9000 commented 2 years ago

@Kellegram I've successfully installed the git's version of the three packages, of xmonad, and I still see a black screen when I type startx...

And if I do xmonad --recompile I get an error. Summary, ``` error: can't find file: xmonad.hs

Please check the file for errors.

xmonad: xmessage executeFile: does not exist (No such file or directory). ```

Kellegram commented 2 years ago

@d2rgaming-9000 the git versions are NOT in pacman repos. They are in the AUR. For those you need an AUR helper like paru. AUR is a user repository.

Kellegram commented 2 years ago

Well, you need to have xmonad.hs in $HOME/.xmonad/. Either way, it's not relevant for this issue, the black screen after update is completely different story.

d2rgaming-9000 commented 2 years ago

@Kellegram The command I passed is, xmonad --recompile ~/.xmonad/xmonad.hs.

I looked under .xmonad Dir. For some reason I cannot find xmonad.hs. whereis xmonad.hs returns nothing..

Kellegram commented 2 years ago

Sorry but you will need to find support outside of this issue as you are struggling to get xmonad running in general. It's off-topic.

Kellegram commented 2 years ago

Please, this is not the place to get help support on an unrelated issue. The only black screen problem I am describing is a known problem that happens with existing installations when any haskell dependency gets updated. The hook simply runs recompile right after pacman is done updating them, if you could delete your messages so we can clean up this Issue page it would be great. If you have a different problem then make a separate issue.

Axarva commented 2 years ago

@Kellegram I know this is quite late, but what version of xmonad makes ewmh work as expected and helps me remove the hacky function I wrote that's a bit unsafe? Because I'm still using my own configs on my machine and they don't work yet... I'll need a little bit of your support on this one :)

Kellegram commented 2 years ago

@Axarva What I do now is install haskell stuff via stack. Arch repos suck for anything haskell, always behind in version and very unstable. Here is my hand-written script to install xmonad and xmonad-contrib with stack. I also written sed commands to work around a completely random and inconsistent bug where it fails to install because something in config changes to what it shouldn't. The only issue is the path might not be constant but that's easy to fix I think, will do so later. The script works tho and that way haskell stuff is detached from the native package management.

As for ewmh support etc. I spent months researching and testing and am pretty confident that (at least at the time of last update) I have the most modern xmonad config out there. Most of the ones online do it wrong or are severely outdated. I moved to gitlab for now, so here is the current config, I haven't used linux for a while due to work and stuff.

Axarva commented 2 years ago

Turns out the functions you used in your config are only available for xmonad-contrib-0.17.0, while the version available on most distros is 0.16. We could make everything installed by stack, but I'm not quite sure how to test it out.

Kellegram commented 2 years ago

Turns out the functions you used in your config are only available for xmonad-contrib-0.17.0, while the version available on most distros is 0.16. We could make everything installed by stack, but I'm not quite sure how to test it out.

Yes that's what I am saying, it's better to just use stack, the packaging is not good. My script installs everything.

You could test it in a VM, have a base arch install in a TTY and get the basics. If you run my script you will have xmonad and contrib binaries installed, make sure to pay attention to any instructions/comments.