How to build a window manager in Rust

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 76

  • @yigitylmaz3585
    @yigitylmaz3585 Рік тому +81

    100% sure you did the neofetch just to show that you use arch btw

  • @PageKey
    @PageKey Рік тому +4

    This is an awesome deep dive. Love it!

  • @sebastiaanstoffels7565
    @sebastiaanstoffels7565 Рік тому +27

    What a great video, and great project to flex your Rust skills when you are at the appropriate point of learning! Now....when is the version coming that does this in Wayland? ;) - awesome work man.

  • @neuzen
    @neuzen Рік тому +4

    Same for Wayland please.

  • @ac130kz
    @ac130kz Рік тому +13

    Xlib/XCB window managers are pretty easy to make, it's kinda an already solved problem. A Wayland dynamic window manager though based on Sway with a dynamic config in Lua or something would be nice

    • @nyxalexandra-io
      @nyxalexandra-io Рік тому

      or using Smithay! I'm working on one rn :)

    • @ac130kz
      @ac130kz Рік тому

      @@nyxalexandra-io I'm worried that smithay is different from wlroots

    • @mikefdorst
      @mikefdorst Рік тому

      @@ac130kz Smithay is, in fact, different from wlroots. I don't know why that would worry you though.

    • @ac130kz
      @ac130kz Рік тому

      @@mikefdorst wlroots adds its own extensions, so that's a big downside for other projects, which don't follow the same path

  • @iatomic_1
    @iatomic_1 6 місяців тому +1

    How did u test while developing ?

  • @flightman2870
    @flightman2870 Рік тому

    Subbed even before watching 10 seconds, cos the content rocks

  • @alf5197
    @alf5197 Рік тому +9

    Nice rundown and summary! Something is off with your audio though at certain parts it's slightly shifted right or left. Maybe downmix the audio.

    • @monroeprograms
      @monroeprograms  Рік тому

      Thanks for the suggestion, I'll try to do that in Audacity for the future (and keep my head still haha)

  • @kan8602
    @kan8602 Рік тому +2

    Very informative video, ty and keep them coming!
    Have you heard about a crate called penrose? If so, why didn't you use it?
    I'm using it to build my wm and thx to your video I understand more what's happening under the hood

  • @Sunnywastakentoo
    @Sunnywastakentoo Рік тому +1

    Very interesting video, definitely considering giving it a shot myself. What DE are you using? I don’t think I’ve seen it before.

    • @iamyourdaddy4866
      @iamyourdaddy4866 Рік тому

      I think its vim/nvim with nerdtree

    • @jomo_sh
      @jomo_sh Рік тому

      ​@@iamyourdaddy4866 DE, not editor, DE = desktop environment

    • @ultraaatf
      @ultraaatf Рік тому

      looks like i3 but not sure

  • @DKLHensen
    @DKLHensen Рік тому

    Liked + Subscribed. I like this no nonsense video, keep it up!

  • @grialion
    @grialion Рік тому +5

    Nice video, I wonder if it's easier in Wayland.

    • @monroeprograms
      @monroeprograms  Рік тому +1

      I'm not sure, I haven't played around enough with Wayland to know. It's something I'm interested in though

    • @leynad157
      @leynad157 Рік тому +1

      @@monroeprograms seriously interesting if you brought with some example in wayland!

    • @nonetrix3066
      @nonetrix3066 Рік тому +1

      I think Wayland leaves you to implement a lot more yourself so it's likely harder but more fleable

    • @nurmohammed9642
      @nurmohammed9642 Рік тому

      +1

    • @notoriouslycuriouswombat
      @notoriouslycuriouswombat Рік тому +1

      definitely not easier in wayland

  • @evandrofilipe1526
    @evandrofilipe1526 Рік тому +2

    Isn't wayland the hot new thing these days though. Cool that you managed to make a window manager though, I wouldn't know much about that

    • @yesh420
      @yesh420 4 місяці тому

      hmm, maybe hyprland? wayland is pretty basic, idk if it was hot 1 year ago lol

    • @RossWasTaken
      @RossWasTaken 4 місяці тому

      @@yesh420 seconding hyprland, it's what got me into linux at least

    • @yesh420
      @yesh420 4 місяці тому

      @@RossWasTaken do you use it daily? i used to for like 2 weeks, but it was too much of a hassle. it was fun configuring, i even made my own thing that opens up when u press the widnows key (it shows all apps) and it was very nice looking and a lot of smaller stuff also, even the bottom bar with apps. i now stick with kde plasma, and am considering switching from arch to nixos, tiling window managers are fun but too much work for me tbh

    • @samuelhulme8347
      @samuelhulme8347 3 місяці тому

      @@yesh420Hyperland is just a window manager. Wayland is a modern protocol for making window managers.

    • @yesh420
      @yesh420 3 місяці тому

      @@samuelhulme8347 thank you, ive come to realise that wayland isnt really a wm lol :)

  • @x-skgameplay-x
    @x-skgameplay-x Місяць тому

    Finding the window manager tutorial was a great help. Do you mind sharing your Discord with me? I need your guidance on a few questions. Thank you!

  • @LauAlwin
    @LauAlwin Рік тому

    Which linux distro I could use it based on? Like Debain or RHEL or Arch?

    • @monroeprograms
      @monroeprograms  Рік тому +2

      You can use it on any distro, just make sure you have the X.org packages installed

  • @马向高
    @马向高 Рік тому

    How to add window border and title theme if I'm not building a tiling window manager?

    • @monroeprograms
      @monroeprograms  Рік тому +1

      To create a window with a title bar you'll need to reparent the client window into a new window created by the window manager.
      docs.rs/xcb/0.10.1/xcb/xproto/fn.reparent_window.html
      Leave some space at the top for the title bar and move the client down like 30px or however tall you want your title bar. Then use cairo or another graphics library to draw the window decorations like the title of the window or max/minimize/close buttons. To add a border to the client you add a border to the parent window you created with the normal configure_window+change_window_attributes
      github.com/monroeclinton/mwm/blob/2c3e4ad5790bd5f04fff6fa920b53111e932d07c/src/client/create.rs#L69

  • @Billiam112
    @Billiam112 Рік тому

    You're awesome man! 🤘

  • @vanodon2257
    @vanodon2257 Рік тому

    I wish i was smart enough to fork wayland and have a toggle to optionally disabel gui isolation. Would make porting my Window manager so much easier 😑

  • @egymagyarember997
    @egymagyarember997 Рік тому

    what text editor is that?

  • @wyfyj
    @wyfyj Рік тому

    Great video

  • @ivanserhieiev7728
    @ivanserhieiev7728 11 місяців тому

    what is thhe text editor in 1.36

    • @chris0617
      @chris0617 11 місяців тому

      Neovim + plugins

  • @scfdtutorials-ro2ru
    @scfdtutorials-ro2ru Рік тому

    Did you use ai for your voice clone to text to speech?

  • @Stasakusok
    @Stasakusok Рік тому

    good work

  • @davidwolianskyj809
    @davidwolianskyj809 Рік тому

    Why don't you rewrite X11 in Rust?

    • @regenjacob
      @regenjacob Рік тому +2

      x11 is a very old and complicated project good that even predates linux so no sadly won't happen

  • @notyoutube8128
    @notyoutube8128 Рік тому

    So this is how system 76 makes cosmic desktop?

  • @T1Oracle
    @T1Oracle Рік тому

    Wayland?

  • @_jdfx
    @_jdfx Рік тому

    wow, impressive!

  • @drifter5626
    @drifter5626 Рік тому

    well deserved sub

  • @codexed-i
    @codexed-i Рік тому

    He is teaching to create a window manager while using itself (the window manager) lol

  • @emvdl
    @emvdl Рік тому

    Cool 👍

  • @DELOREAN389
    @DELOREAN389 Рік тому

    Thanks rust for abadon all cpu winout sse2 ;)

  • @123159antonio
    @123159antonio Рік тому +1

    sub number 1000 \o/

  • @jokacantcode
    @jokacantcode Рік тому

    Awesome :)

  • @ivymuncher
    @ivymuncher Рік тому

    what.

  • @0ops1024
    @0ops1024 Рік тому

    lj rust

  • @zerodev_exe
    @zerodev_exe Рік тому

    +1 sub +1 star :)

  • @khay1385
    @khay1385 Рік тому

    Do you have a email or discord where others can ask you more questions?

  • @neonbyte1337
    @neonbyte1337 Рік тому

    I don't understand ppl who're recreating everything in rust.. just why