[NCLUG] Tuesday February 13, 2017 NCLUG Meeting

Sean Reifschneider jafo00 at gmail.com
Wed Feb 14 09:13:51 MST 2018


I'll add my i3 config here.  I also use hjkl for movement keys.  I have 3
displays.  Mod+Esc flips back and forth between my last two workspaces.  I
have a "mark" and "jump" mode kind of like vi's marks, where I can give
different windows single-character names and jump directly to: my browser
with gmail, my browser with slack, the terminal window that I'm currently
doing most of my work on, my scratch browser, etc...  I also use the
scratchpad to put windows for long running things that I don't use that
often like my editor window where I keep my work journal, password manager,
etc...  Things I want to pop into then get back to work.  I have different
windows bound to Mod+Ctl+<chr> but you can also use mark/jump.  I have a
bunch of apps set up to run floating.

I've been using i3 for 4 or so years, I'm really happy with it.

Sean

===============
set $mod Mod4

# Font for window titles. Will also be used by the bar unless a different
font
# is used in the bar {} block below. ISO 10646 = Unicode
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering
and
# chose a FreeType font, such as:
# font pango:DejaVu Sans Mono 10

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec xterm

# kill focused window
bindsym $mod+Shift+q kill
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade
i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit
shortcut. Do you really want to exit i3? This will end your X session.' -b
'Yes, exit i3' 'i3-msg exit'"
#bindsym $mod+z exec i3lock
bindsym $mod+z exec gnome-screensaver-command --lock

# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop

# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right

# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

# split in horizontal orientation
bindsym $mod+Control+l split h

# split in vertical orientation
bindsym $mod+Control+j split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# focus the parent container
bindsym $mod+a focus parent

# focus the child container
bindsym $mod+Shift+a focus child

# switch to workspace
bindsym $mod+Escape workspace back_and_forth
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10


# move focused container to workspace
bindsym $mod+Shift+Escape move container to workspace back_and_forth
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10

#  move workspace to a particular monitor
bindsym $mod+Control+Escape move workspace to output right
bindsym $mod+Control+1 move workspace to output HDMI-0
bindsym $mod+Control+2 move workspace to output DVI-0
bindsym $mod+Control+3 move workspace to output DisplayPort-0

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym h resize shrink width 10 px or 10 ppt
        bindsym j resize grow height 10 px or 10 ppt
        bindsym k resize shrink height 10 px or 10 ppt
        bindsym l resize grow width 10 px or 10 ppt

        # same bindings, but for the arrow keys
        bindsym Left resize shrink width 10 px or 10 ppt
        bindsym Down resize grow height 10 px or 10 ppt
        bindsym Up resize shrink height 10 px or 10 ppt
        bindsym Right resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information
i3status
# finds out, if available)
bar {
        status_command i3status
}

mode "mark" {
   bindsym a mark a; mode "default"
   bindsym b mark b; mode "default"
   bindsym c mark c; mode "default"
   bindsym d mark d; mode "default"
   bindsym e mark e; mode "default"
   bindsym f mark f; mode "default"
   bindsym g mark g; mode "default"
   bindsym h mark h; mode "default"
   bindsym i mark i; mode "default"
   bindsym j mark j; mode "default"
   bindsym k mark k; mode "default"
   bindsym l mark l; mode "default"
   bindsym m mark m; mode "default"
   bindsym n mark n; mode "default"
   bindsym o mark o; mode "default"
   bindsym p mark p; mode "default"
   bindsym q mark q; mode "default"
   bindsym r mark r; mode "default"
   bindsym s mark s; mode "default"
   bindsym t mark t; mode "default"
   bindsym u mark u; mode "default"
   bindsym v mark v; mode "default"
   bindsym w mark w; mode "default"
   bindsym x mark x; mode "default"
   bindsym y mark y; mode "default"
   bindsym z mark z; mode "default"

   bindsym Return mode "default"
   bindsym Escape mode "default"
}

bindsym $mod+m mode "mark"

mode "jump" {
   bindsym a [con_mark="a"] focus; mode "default"
   bindsym b [con_mark="b"] focus; mode "default"
   bindsym c [con_mark="c"] focus; mode "default"
   bindsym d [con_mark="d"] focus; mode "default"
   bindsym e [con_mark="e"] focus; mode "default"
   bindsym f [con_mark="f"] focus; mode "default"
   bindsym g [con_mark="g"] focus; mode "default"
   bindsym h [con_mark="h"] focus; mode "default"
   bindsym i [con_mark="i"] focus; mode "default"
   bindsym j [con_mark="j"] focus; mode "default"
   bindsym k [con_mark="k"] focus; mode "default"
   bindsym l [con_mark="l"] focus; mode "default"
   bindsym m [con_mark="m"] focus; mode "default"
   bindsym n [con_mark="n"] focus; mode "default"
   bindsym o [con_mark="o"] focus; mode "default"
   bindsym p [con_mark="p"] focus; mode "default"
   bindsym q [con_mark="q"] focus; mode "default"
   bindsym r [con_mark="r"] focus; mode "default"
   bindsym s [con_mark="s"] focus; mode "default"
   bindsym t [con_mark="t"] focus; mode "default"
   bindsym u [con_mark="u"] focus; mode "default"
   bindsym v [con_mark="v"] focus; mode "default"
   bindsym w [con_mark="w"] focus; mode "default"
   bindsym x [con_mark="x"] focus; mode "default"
   bindsym y [con_mark="y"] focus; mode "default"
   bindsym z [con_mark="z"] focus; mode "default"

   bindsym Return mode "default"
   bindsym Escape mode "default"
}

bindsym $mod+n mode "jump"

bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
bindsym $mod+Control+minus mode "scratchpad"
mode "scratchpad" {
   bindsym p [title="^Enpass"] scratchpad show; mode "default"
   bindsym t [title="^realgo-time"] scratchpad show; mode "default"
   bindsym Return mode "default"
   bindsym Escape mode "default"
}
bindsym $mod+Control+p [title="^Enpass"] scratchpad show; mode "default"
bindsym $mod+Control+t [title="^realgo-time"] scratchpad show; mode
"default"

#  use "xprop" to find the classes
for_window [class="Enpass"] floating enable
for_window [class="Atom"] floating enable
for_window [class="XV"] floating enable
for_window [class="Wireshark"] floating enable
for_window [class="Evince"] floating enable
for_window [class="Gitk"] floating enable
for_window [class="Bitcoin-qt"] floating enable
for_window [class="Vncviewer"] floating enable
for_window [class="VirtualBox"] floating enable
for_window [class="Remmina"] floating enable
for_window [class="Hgview"] floating enable
for_window [class="com-sun-javaws-Main"] floating enable
for_window [class="Ethereum Wallet"] floating enable

#workspace 1 output HDMI-0
#workspace 2 output DisplayPort-0
#workspace 3 output DVI-0
#exec xrandr \
#    --output HDMI-0 --auto --rotate left --left-of DisplayPort-0 \
#    --output DisplayPort-0 --auto --left-of DVI-0 \
#    --output DVI-0 --auto --rotate left
workspace 1 output HDMI1
workspace 2 output DP1
workspace 3 output HDMI2
exec xrandr \
    --output HDMI1 --auto --rotate left --left-of DP1 \
    --output DP1 --auto --primary \
    --output HDMI2 --auto --rotate left --right-of DP1

#exec xinput set-button-map "Logitech Rechargeable Touchpad T650" 1 3 2
exec xfce4-power-manager

On Tue, Feb 13, 2018 at 11:27 PM Bob Proulx <bob at proulx.com> wrote:

> James DeWitt wrote:
> > What: Tuesday February 13, 2017 NCLUG Meeting
> > When: Tuesday February 13, 2017, 6pm
> > Where: Fort Collins Creator Hub,
> >   1304 Duff Dr Unit 15, Fort Collins, CO; map:
> > Topic:  Short Topics!
> >
> > Please come and tell us about a project, tech topic, or problem that
> > interests you in around 10 minutes. Quick demos are a plus!
>
> I spoke in a stream of consciousness on the use and customization of
> the i3 window manager.  A good number of people in the group are using
> i3 these days.  Check it out.  I will include the customization I use
> at the end.  The i3 defaults are unusual and I think changing the
> movement keys to traditional movement is what most users do.
>
> Also some discussion of using it with screen and with emacs for
> general productivity keeping the fingers on the home row and not
> moving them to reach for the mouse.  Along the way we looked at some
> of the original keyboards that influenced movement key choices today.
>
> There was, as always, a good amount of discussion among the group.  We
> got to hear the deafening roar of a 1U server with all fans spinning.
> Aaron brought a giveaway-to-a-good home which I think Alex claimed.
> Followed by dinner at Coopersmith's.
>
> Bob
>
> My i3 window manager config modifications to remap the keys are as
> follows.  The rest of the config was unmodified.
>
> # change to the traditional movement keys
> set $left h
> set $down j
> set $up k
> set $right l
>
> bindsym $mod+$left focus left
> bindsym $mod+$down focus down
> bindsym $mod+$up focus up
> bindsym $mod+$right focus right
>
> # split in horizontal orientation
> bindsym $mod+b split h
>
> # use the cursor keys to move through the workspaces
> bindsym $mod+Left workspace prev
> bindsym $mod+Right workspace next
>
> # useful for use with 2nd monitors and projectors
> bindsym $mod+x move workspace to output right
> _______________________________________________
> NCLUG mailing list       NCLUG at lists.nclug.org
>
> To unsubscribe, subscribe, or modify
> your settings, go to:
> http://lists.nclug.org/mailman/listinfo/nclug


More information about the NCLUG mailing list