i3 Window Manager

!i3wm

@lemmy.ml
Create post
Most useful bindings

Most useful bindings

Here are a few bindings in my i3 config file that I find super useful (bear in mind that I use a Kensington Expert Mouse and Button8 is a suitably unusual but still easily clicked button on that trackball, so you may want to change it to something more suitable to your preferred pointing device):

# Clicking the title bar with the upper-right button closes the window (regular default binding, just different button)
bindsym --release button8 kill

# Scrolling over any window title bar controls the volume
bindsym button4 exec pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3bar
bindsym button5 exec pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3bar

[...]

bar {

        [...]

        # Clicking the empty space in the bottom bar with the upper-right button opens the launcher
        bindsym button8 exec "rofi -modi drun,run -show drun"

        # Scrolling over the empty space in the bottom bar controls the volume
        bindsym button4 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3bar
        bindsym button5 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3bar
}

I find those bindings useful because unless a window is open fullscreen - which I rarely do personally - then there's always a window title bar at the top and the bar at the bottom.

As a result, when I quickly want to lower the volume - when the missus yells at me in the middle of the night for example 🙂 - I can slam the trackball up or down and quickly scroll the volume down.

Similarly, I can move the pointer all the way down and open the launcher with my unusual trackball button, and move all the way back up and close a window by clicking on the appropriate title bar with the same button, so that I don't really have to hit the keyboard most of the time for opening and closing simple stuff.

Anyhow, I thought I'd share.

Electron app won't close in i3

Electron app won't close in i3

I still use the old - and last - official Linux .deb package for Teams and sure enough, it doesn't behave properly in i3: Teams starts and shows up in the systray but the window is fullscreen and won't close. I have to keep a workspace around just for Teams.

I suspect Electron of course. Electron doesn't integrate well with any Linux desktop environment. Just wondering if someone knows if there's a trick to make it close in i3.

Screen goes black when switching to fullscreen in vlc or mpv

Screen goes black when switching to fullscreen in vlc or mpv

Hello,

I have this issue where, when playing any video on VLC or MPV, screen goes black if I switch to full screen mode. Audio is playing fine, and if I go back to windowed mode, video comes back after a couple of seconds.

I tried with Dragon player (same video file) and it is working fine.

Any idea on what could be the issue ? I have a nvidia card running on proprietary drivers.

Thanks

i3bar show network up and down rates

i3bar show network up and down rates

Hey, im trying to config my i3status bar so that it shows the amound downloaded + uploaded /sec i cant find something on it is this possible? Thanks for your time!

[solved] Auto move focus with new window to another workspace

[solved] Auto move focus with new window to another workspace

So is it possible to configure?

Lets say I click a link on the terminal in Workspace 1 and I have Firefox Open in Workspace 2, I want to auto focus firefox in workspace 2 because I clicked the link.


Answer: focus_on_window_activation focus`

How to disable colored dots on workspace indicators

How to disable colored dots on workspace indicators

How do I remove the dots in my i3bar?
I made a screenshot of the dots here:
dots.png (sorry for linking to my own site, lemmy complains about image being to big for no reason)

i3bar tip: Create a hidden tray bar

i3bar tip: Create a hidden tray bar

I was reading about that weird i3bar quirk where the tray's opacity will always be 00 when i3bar is called with transparency. Which is aesthetically cringe-worthy to look at; almost enough to want to stop using it.

A cool workaround I heard about was to create a separate bar for the tray, and then create a shortcut to display it. You can then make that bar completely opaque, or completely transparent; either way it is consistent. Regardless of aesthetics, this is also really helpful to reduce tray icon clutter.

I couldn't find any resources on how to do it, but after some finagling I got it to work.

First off, number all of your bars with unique ids.

If two separate bars with separate ids are displayed on the same monitor, the bar with the higher number displays the furthest down. In my case, I have a bar for my primary display (bar-1), and a bar for all nonprimary displays (bar-2).

My tray bar is assigned bar-3 on my primary monitor. So it appears below my primary.

note: remember to write (tray_output none) in all of your other bars.

The tray bar is assembled like so:

bar {
	id bar-3
	output primary
	position bottom

	i3bar_command i3bar -t
	binding_mode_indicator no
	mode hide
	modifier none
	workspace_buttons no

	tray_output primary
	tray_padding 1

	colors {
		background #00000000
	}
}

And it can be activated like this: bindsym $mod+t bar mode toggle bar-3

Another cool thing to do is to create a dropdown icon for the bar. Put this in your i3blocks config:

[tray_dropdown]
color=#ffffff
command=i3-msg -q 'bar mode toggle bar-3'
full_text=

Adjust for the bar id.

And voilà!