RF Eclectica Wiki

Try to learn something about everything, and everything about something - Thomas Huxley

User Tools

Site Tools


public:computers:i3_window_manager

02 : Computers

I3 Window Manager

Various Things related to I3

Background & Conky

Some tiled windows

Floating scratchpad terminal with ranger file manager

Floating scratchpad terminal with Alpine email client

I3 Config and tweaks

Autotile

Make new windows be created in alternating horizontal / vertical arrangement, depending on aspect ratio of the current window.

https://github.com/nwg-piotr/autotiling

I3 Config File

config

i3status bar

i3status.conf

Conky

.conkyrc

Gather ruptime information about local LAN Linux boxes from the rwhod service and format it with a small script ~/ruptime called from conkyrc

${font DejaVu Sans Mono:size=10}${execi 30 ~/ruptime}

ruptime local script

Real ruptime returns:

gm4slv@antix1:~ $ ruptime 
antix1        up    1+04:34,     0 users,  load 0.63, 0.48, 0.47
aprs          up  116+04:03,     0 users,  load 0.00, 0.01, 0.00
laptop        up    9+16:04,     0 users,  load 1.27, 1.09, 1.04
nas1          up  185+23:19,     0 users,  load 0.33, 0.48, 0.47
shack         up      16:19,     0 users,  load 0.16, 0.22, 0.21

My small script formats it for conky

gm4slv@antix1:~ $ ./ruptime 
antix1    up   1+04:34
aprs      up 116+04:03
laptop    up   9+16:04
nas1      up 185+23:19
shack     up     16:19

add neofetch output as image to root window

background.sh

Keys cheatsheet

$mod+p = promote window

$mod+Return = terminal

$mod+Shift+q = kill window

$mod+d = dmenu

$mod+h = focus left
$mod+j = focus down
$mod+k = focus up
$mod+l = focus right


$mod+Shift+h = move left
$mod+Shift+j = move down
$mod+Shift+k = move up
$mod+Shift+l = move right


$mod+f = fullsreen toggle


=== When using Autotile these are for the next window to be created ====

$mod+s = stacking
$mod+w = tabbed
$mod+e = toggle h or v

=== Toggle a window between tiled and floating ===

$mod+Shift+space = floating toggle

=== Switch focus between a floating window and the tiled window(s)

$mod+space focus mode_toggle


$mod+a = focus parent

Additional Software

urxvt

Configured vi ~/.Xdefaults

For Ranger icons use DejavuSansMono NFM:size=11:style=Book

A bug makes font rendering odd, with too much space between characters (kerning is wrong)

A fix is to put Xft.rgba: none into ~/.Xdefaults

Another fix is to put URxvt.letterSpace=-1 into ~/.Xdefaults

Here's the ~/.Xdefaults I use:

Some un-used lines are commented out, but might be useful in testing….

Xft.rgba: none
#Xft.hintstyle: hintfull
#URxvt.letterSpace:-1
 
Xcursor.size:10
#URxvt.skipBuiltinGlyphs: true
URxvt.scrollBar: false
URxvt.boldFont: 
#URxvt.font: xft:DejaVuSansMono:style=Book:size=11
#URxvt.font: xft:Monospace:size=11, xft:DejaVuSansMono NFM:style=Book
URxvt.font: xft:DejaVuSansMono NFM:size=11:style=Book

Ranger

  • Image Previews: /etc/ranger/config/rc.conf :
    set preview_images true
    set preview_images_method w3m
  • Draw borders round segments of display /etc/ranger/config/rc.conf :
    set draw_borders both
  • Icons following instructions here: https://github.com/alexanderjeurissen/ranger_devicons
    • /etc/ranger/config/rc.conf :
      default_linemode devicons
    • unzipped into : ~/.fonts
    • font cache re-built with
      fc-cache -fv
  • Use Lxterminal - handles icons and image previews (st is poor for image previews)
  • commands for exracting and creating compressed archives (zip, tar, tar.gz etc) from here https://wiki.archlinux.org/title/ranger#Archives
    • added both python snippets to /etc/ranger/config/commands.py
    • added keybindings to /etc/ranger/config/rc.conf
       
      map ,n console compress 
      map ,m compress temp.zip
      map ,e console extract_here 
    • extract a zip/tar/tar.gz by the keystroke ,e
    • create an automatically named temp.zip archive by selecting the files (Space) and then ,m
    • create a named archive of your choice ,n your_archive_name.[tar|zip|tar.gz]
<insert> : touch (new file)

gg   : move to top
G    : move to bottom

<F1> : help
<F2> : rename
<F3> : view (less)
<F4> : edit (vim) 
<F5> : copy
<F6> : cut
<F7> : mkdir
<F8> : delete
<F10>: quit


<space> : select
uv : un-select

yy : yank (copy)
dd : cut

ud : un-cut
uy : un-cut(yank)

pp : paste


gh : GoHome
zh : show hidden dotfiles

Archive operation commands
,n : new named archive 
,m : new "temp.zip"
,e : extract_here

John Pumford-Green 09/10/22 12:38

Further Information

public/computers/i3_window_manager.txt · Last modified: 08/04/24 14:39 BST by john