i3 Window Manager

235 readers
1 users here now

About

Community for the i3 window manager and its popular fork i3-gaps.

Resources

founded 3 years ago
MODERATORS
1
 
 

My preference is Diodon - especially with the Add images to clipboard history option enabled. And if you enable the Application Indicator plugin, it lhappily stays as an icon in your system tray.

The perfect clipboard for i3.

2
4
submitted 4 days ago* (last edited 4 days ago) by [email protected] to c/[email protected]
 
 

If you need to run commands as root regularly with Rofi, you may find this useful.

So let's say you want to run usb-creator-gtk to create a bootable USB stick. You have write access to the USB stick's block device but it's not enough: you need to become root.

You can of course open a terminal and run sudo usb-creator-gtk. But it's kind of tedious if you need to do that more than once.

If you want to permanently run that command as root, do this:

  • sudo visudo to edit the /etc/sudoers file.
  • Add the line yourusername ALL = NOPASSWD: /usr/bin/usb-creator-gtk
  • Confirm that you can now run the command as root without being asked your password: sudo usb-creator-gtk should pop the USB Creator window rightaway.
  • Create a desktop entry in your home directory that will override the system-wide one: cp /usr/share/applications/usb-creator-gtk.desktop ~/.local/share/applications/

That way, when Rofi looks for available applications in drun mode, it will find your local usb-creator-gtk.desktop file before the system-wide file of the same name and will use the local one and ignore the system-wide one.

If you'd like Rofi to list both, rename the one in your local directory to a different name from the system-wide one.

  • Edit ~/.local/share/applications/usb-creator-gtk.desktop:
    • Modify Exec=usb-creator-gtk to Exec=sudo usb-creator-gtk.
    • Modify Name=Startup Disk Creator to Name=Startup Disk Creator (sudo), so you know Rofi picks your local desktop file over the system-wide one, or you can tell the sudo version apart from the normal version if you want to keep both listed.

And that's it!

Start Rofi, type "startup" and the autocompletion should list "Startup Disk Creator (sudo)" - and of course, selecting it should pop the window rightaway.

3
 
 

I use Remmina all the time to access remote computers through RDP and VNC. But it's annoying in i3 to open the main window, select a profile, then close the main window to leave just the remote session window.

Remmina does have a command line option to dock into the system tray using appindicator (the -i option, i.e. "start as a tray icon") and right-clicking the icon does provide a quick access to saved profiles.

However, there's a problem with it: when the last window closes, Remmina exits instead of staying docked in the systray- Unfortunately, the Remmina folks won't fix it - and in fact plan of killing the systray icon altogether.

There's always the possibility of making a small shell script that restarts Remmina each time it closes. The problem with that approach is, it a Remmina process doesn't terminate cleanly and stays in the background for some reason (it happens, especially if i3 is closed unexpectedly) then you have to open a terminal and kill the rogue remmina process, which is kind of a pain. Not to mention, if / when Remmina stops providing a systray icon, it'll stop working.

So instead, since I use Rofi as a launcher in i3 - like most everybody I believe - and Rofi supports custom scripts, I made a small script to parse saved Remmina profiles and add them to Rofi as a special mode, to provide quick access to them.

As a bonus, when you're not using Remmina, it's not running and eating up memory for nothing.

You can find it here, along with instructions to install it:

https://github.com/Giraut/rofi_remmina_profiles_menu

Kind of trivial, but I figured I'd share it in case someone else finds it useful.

4
 
 

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.

5
 
 

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.

6
 
 

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

7
 
 

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!

8
 
 

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`

9
 
 

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)

10
2
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

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ร !

11
12
13
14
 
 

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust.

It's now my favorite. Highly customizable, with a lot of blocks by default. Theming and icons included. ๐Ÿ˜Ž