jzbor / marswm

A modern window manager featuring dynamic tiling (rusty successor to moonwm).
https://jzbor.de/marswm/
MIT License
47 stars 3 forks source link

Questions after testing marswm briefly (i saw a snazzy post on r/unixporn). #6

Closed quantenzitrone closed 1 year ago

quantenzitrone commented 1 year ago

USAGE: marsbar [OPTIONS]

OPTIONS: -c, --config Print current config and exit <-- is this wrong? -h, --help Print help information --print-config Print current config and exit --print-default-config Print default config and exit -V, --version Print version information


- why is the internal workspace number not the same as the number displayed on marsbar?
  - e.g. workspace `0`, default keybinding `Mod4+1`, displayed on marsbar as `1`
- what about the workspace handling of marsbar is "like i3"?
  - i3 has dynamic workspaces, there are practically infinite and arbitrary in number (signed 32bit integer)
  - marswm has predefined workspaces for screens, always visible on marsbar

Also for anyone on NixOS, you can use this derivation for installing:
```nix
{
  lib,
  fetchFromGitHub,
  rustPlatform,
  libX11,
  libXft,
  libXinerama,
  libXrandr,
  pkg-config,
  xorgserver,
  ...
}:
rustPlatform.buildRustPackage rec {
  pname = "marswm";
  version = "0.4.1";
  src = fetchFromGitHub {
    owner = "jzbor";
    repo = pname;
    rev = version;
    hash = "sha256-IQtojvheZEmuQZNycCN01PPAdGdt/BT6h7mr7ZpwXbo=";
  };
  cargoHash = "sha256-CLoBzwx9r+Yy4tfBjPKxsjuTagHyZywepAUlJh2hXvo=";
  buildInputs = [
    libX11
    libXft
    libXinerama
    libXrandr
    pkg-config
    xorgserver
  ];
}

I might add marswm to nixpkgs, once the simple-package-paths rfc gets merged.

jzbor commented 1 year ago
* why is the internal workspace number not the same as the number displayed on marsbar?

Hm I understand why this might be irritating, but I think it is quite normal to expose collections as one-indexed to users while handling it as zero-indexed internally and in APIs.

* what about the workspace handling of marsbar is "like i3"?

  * i3 has dynamic workspaces, there are practically infinite and arbitrary in number (signed 32bit integer)
  * marswm has predefined workspaces for screens, always visible on marsbar

This refers to marswm using workspaces rather than tags like dwm does. I figured not everybody might get the difference, so I added i3 as an example that also uses workspaces. You are right unlike i3 marswm does not dynamically allocate or deallocate workspaces. Although it would probably not be to difficult to change I would much rather change the bar to only display occupied workspaces. One other thing marswm does similar to i3 is allocating dedicated workspaces for each monitor, although again unlike i3 those workspaces have "special" names.

Also for anyone on NixOS, you can use this derivation for installing:

[...]

Thanks for sharing. You can also find a nix overlay in my personal overlay flake. It will not always be the released version, but rather the version I personally find most useful at the time, so not exactly stable.

I might add marswm to nixpkgs, once the simple-package-paths rfc gets merged.

I also already thought about this, although until now I did not really see the significance. Does nixpkgs require a maintainer to approve/register for the package? Anyway feel free to ping me if you plan to create a pull request.

I hope this answers some of your questions :)

0323pin commented 1 year ago

I understand why this might be irritating, but I think it is quite normal to expose collections as one-indexed to users while handling it as zero-indexed internally and in APIs.

I've never used dwm but, this wasn't strange to me in anyway. I've used frankenwm for a long time and it handles workspaces in the same way. Originally, it supports 10 workspaces, which makes it even more confusing, since workspace 10 is bound to Mod4 + 0 but, workspace 1, which is actually 0 + 1 is bound to Mod4+1 😀

@Quantenzitrone Glad you liked my "pink" Rice 😉

quantenzitrone commented 1 year ago

This refers to marswm using workspaces rather than tags like dwm does.

Most wms don't use tags i think, so wouldn't it be better to compare the workspace handling to a different wm? i don't know much about a lot of window managers, but i think most wms do it like marswm e.g. bspwm awesomewm hyprland

Hm I understand why this might be irritating, but I think it is quite normal to expose collections as one-indexed to users while handling it as zero-indexed internally and in APIs.

i (and probably others too) like to index things from 0, so something more flexible would be optimal

jzbor commented 1 year ago

Hello, I have updated the README, I hope this makes it more clear to new adopters. As for 0-indexing feel free to open a concrete issue for it, but I cannot say right now when and in what form I will implement it...