Hacker News new | ask | show | jobs
by abetlen 2007 days ago
My brand new laptop was stolen while I was in school and I had to finish the year with a used 10-inch netbook I borrowed from a friend. Because of the tiny display and underpowered processor I had to get creative, I installed Arch plus i3 and it worked like a charm. In fact, I noticed my productivity actually went up. Eventually I got a new laptop, I switched off Arch to Ubuntu but I've been using i3 ever since.

If you're an i3 user here are a couple cool things to check out:

- scratchpad [1]: Little known i3 feature. Let's you put individual windows in a scratch workspace and then pull them up quickly over your regular workspaces. Really useful docs and things like that, I keep my time tracker in a scratch workspace.

- rofi [2]: This is a dmenu replacement with a nicer interface that lets you combine lists of commands in a single search window. I have it configured so I can search through my open windows by title or run any program from the same interface.

[1]: https://i3wm.org/docs/userguide.html#_scratchpad

[2]: https://github.com/davatorium/rofi

5 comments

The default dmenu is very, very powerful though back when I first wanted to I could never figure out how to use the damn thing. Then I saw one of Luke Smith's videos using it [0] and all of a sudden it all clicked for me. Plus you can configure it pretty easily too so long as you can read C code [1].

If you wanna have a rofi-like interface (with it showing rows of results) you could use -l [lines] to show dmenu in vertical rows rather than in one row with many entries.

Just a PSA; your use case is very well suited to rofi and if I had that workflow I'd have a hard time translating that to dmenu.

[0]: https://www.youtube.com/watch?v=8E8sUNHdzG8

[1]: https://github.com/devenblake/dotfiles/blob/main/src/dmenu/c...

> If you're an i3 user here are a couple cool things to check out:

> - scratchpad [1]: Little known i3 feature. Let's you put individual windows in a scratch workspace and then pull them up quickly over your regular workspaces. Really useful docs and things like that, I keep my time tracker in a scratch workspace.

Ah, this is nice. I used to use a similar feature with ion before I switched to i3 but I didn't realize that i3 had the same functionality built in.

> rofi [2]: This is a dmenu replacement with a nicer interface that lets you combine lists of commands in a single search window. I have it configured so I can search through my open windows by title or run any program from the same interface.

Note, this is totally doable in dmenu. I have a script that combines output from wmctrl and dmenu_path. This is bound to M-space for me.

If you have a script or binary that outputs a list of newline-separated strings, you can easily combine these, and dmenu will happily return the selected thing.

Here's what that looks like:

    present-options () {
        windows      # Function to list open windows
        dmenu_path   # dmenu script listing binaries
    }
To manage different layouts: https://github.com/klaxalk/i3-layout-manager.

Workflow:

1. Arrange your windows how you like

2. Save the layout

3. Open the windows

4. Load the layout

Repeat 3 and 4.

Nicely done with rofi/dmenu.

I would also add window "mark"s, I have a-z marks set up, like vi marks, so I can tag windows and then jump to them by mark.
Do you have keybindings set up for them?
I do, I think I just took them from the i3 docs. Looks like there's a new way to do it: https://i3wm.org/docs/userguide.html#vim_like_marks
Ah, thanks. I tried to find it but I must have been looking in the wrong place.