Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

i3 WindowManager on Sparky

Started by grandadruss, December 15, 2014, 01:58:58 AM

Previous topic - Next topic

grandadruss

Have been playing with i3 for a couple of weeks, got to like it, so decided to post my configs in case anyone else felt like trying i3. Installing it on Sparky Openbox was less than 2300K download, logout then select i3 to log back in.
Say yes to setting up ~/.i3/config on first login.
First startup is a bit bare and non-intuitive - at least, it was for me, but it was fun to learn my way around, and hopefully using my config etc will make it easier for others to get started.

I suggest logging back out (Win+Shift+e) then logging into your usual desktop to backup the default ~/.i3/config and put there my config and i3status.conf files, plus openstart.sh into ~/bin/
Those files pretty much explain what they do in their comments, and shouldn't need too much editing to work on another system. Your conky setup will be different, of course.

The above is how I copied my i3 setup from the Sparky installation where I got it working over into my main Sparky installation.

Hope somebody has some fun with this.  :)

# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Following sets Windows key standard activation(mod) key

set $w Mod4

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# 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, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn't scale on retina/hidpi displays.

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

# kill focused window
bindsym $w+Shift+q kill

# start dmenu (a program launcher)
bindsym $w+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 $w+m exec --no-startup-id i3-dmenu-desktop

# keys to start apps on specific workspace
# not working, try just starting
bindsym $w+Control+s exec --no-startup-id gksu synaptic
bindsym $w+Control+p exec --no-startup-id pcmanfm
bindsym $w+Control+m exec --no-startup-id gksu mousepad
bindsym $w+Control+r exec --no-startup-id gksu lxterminal
bindsym $w+Control+c exec --no-startup-id lxterminal -e sudo mc

# change focus
bindsym $w+j focus left
bindsym $w+k focus down
bindsym $w+l focus up
bindsym $w+semicolon focus right

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

# move focused window
bindsym $w+Shift+j move left
bindsym $w+Shift+k move down
bindsym $w+Shift+l move up
bindsym $w+Shift+semicolon move right

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

# split in horizontal orientation
bindsym $w+h split h

# split in vertical orientation
bindsym $w+v split v

# enter fullscreen we for the focused container
bindsym $w+f fullscreen

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

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

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

# focus the parent container
bindsym $w+p focus parent

# focus the child container
bindsym $w+c focus child

# workspace 1:Main
# workspace 2:Files
# workspace 3:Terms
# workspace 4:Syn

# switch to workspace
bindsym $w+1 workspace 1:Main
bindsym $w+2 workspace 2:Files
bindsym $w+3 workspace 3:Terms
bindsym $w+4 workspace 4:Syn
bindsym $w+5 workspace 5
bindsym $w+6 workspace 6
bindsym $w+7 workspace 7
bindsym $w+8 workspace 8
bindsym $w+9 workspace 9
bindsym $w+0 workspace 10

# move focused container to workspace
bindsym $w+Shift+1 move container to workspace 1:Main
bindsym $w+Shift+2 move container to workspace 2:Files
bindsym $w+Shift+3 move container to workspace 3:Terms
bindsym $w+Shift+4 move container to workspace 4:Syn
bindsym $w+Shift+5 move container to workspace 5
bindsym $w+Shift+6 move container to workspace 6
bindsym $w+Shift+7 move container to workspace 7
bindsym $w+Shift+8 move container to workspace 8
bindsym $w+Shift+9 move container to workspace 9
bindsym $w+Shift+0 move container to workspace 10

# reload the configuration file
bindsym $w+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $w+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $w+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'"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
    colors {
        background #000000
        statusline #7FFFD4
        separator #666666

# colorclass       border background text
        focused_workspace  #4c7899 #285577 #ffffff
        active_workspace   #333333 #5f676a #ffffff
        inactive_workspace #333333 #222222 #888888
        urgent_workspace   #2f343a #900000 #ffffff
    }     
status_command i3status --config /home/russell/.i3/i3status.conf
position bottom
mode dock
font pango:DejaVu Sans Mono 8

}

# Use Right Mouse+$w to drag floating windows to their wanted position
floating_modifier $w
floating_minimum_size 200 x 150
floating_maximum_size 1050 x 780

# Sets Iceweasel window to floating
for_window [class="Iceweasel"] floating enable

# Puts Network Manager icon on bar
exec --no-startup-id nm-applet

# Opens & names workspaces and opens applications in them
exec --no-startup-id ~/bin/openstart.sh


# i3status configuration file.
# see "man i3status" for documentation.

# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!

general {
        colors = true
color_good      = "#00FF00"
color_degraded  = "#FF7F00"
color_bad       = "#FF0000"
        interval = 5
}

# order += "ipv6"
order += "disk /"
order += "disk /media/russell/Ddrive/"
order += "run_watch DHCP"
# order += "run_watch VPN"
order += "wireless wlan0"
# order += "ethernet eth0"
order += "battery 0"
# order += "load"
order += "cpu_usage"
order += "cpu_temperature 0"
order += "tztime local"

wireless wlan0 {
        format_up = "W: (%quality at %bitrate) %ip"
        format_down = "W: down"
}

ethernet eth0 {
        # if you use %speed, i3status requires root privileges
        format_up = "E: %ip (%speed)"
        format_down = "E: down"
}

battery 0 {
        # format = "%status %percentage %remaining"
format = "%status %percentage %remaining"
path = "/sys/class/power_supply/BAT%d/uevent"
last_full_capacity = true
low_threshold = 50
threshold_type = percentage
}

run_watch DHCP {
        pidfile = "/var/run/dhclient*.pid"
}

run_watch VPN {
        pidfile = "/var/run/vpnc/pid"
}

tztime local {
        format = "%d-%m-%Y %H:%M:%S"
}

load {
        format = "%1min"
}

cpu_usage {
        #format = "%usage"
        format = "CPU:%usage "
}

disk "/" {
        format = "Root %avail"
}

disk "/media/russell/Ddrive/" {
        format = "Ddrive %avail"
}

cpu_temperature 0 {
        format = "T: %degrees °C"
        # path = "/sys/class/thermal/thermal_zone0/temp"

}


# script to open workspace/load app.


i3-msg 'workspace 1:Main'
conky -c ~/Conky/.conkyrc_i3 &
sleep 2
i3-msg 'workspace 2:Files; exec pcmanfm'
sleep 1
i3-msg 'workspace 3:Terms; exec lxterminal; exec lxterminal'
sleep 1
i3-msg 'workspace 1:Main; exec iceweasel'


GeneC

Hi grandadruss.. :)

Sounds interesting...  I'd be interested to see any screenshots, if you'd post them..
GeneC

grandadruss



Screenshot of workspace 1, ip's blanked. The bar at the bottom is on all workspaces, otherwise each workspace is fully taken up with whatever applications you have open on them. Empty workspaces disappear when you leave them.
Not really a system for people who like wallpapers and icons. :)

GeneC


Thanks for sharing. :)  Always interesting to see something new to me...
GeneC

grandadruss

Still playing. Installed Sparky CLI -went great- , followed instructions to get wifi connected, added lightdm, i3-wm, synaptic, pcmanfm, networkmanager, mousepad, lxterminal and qupzilla. Re-booted into i3. Almost can't believe it all went so well. Around 600mb total download, using 2.0GiB on disk. Am sure I will find things missing as I go.  :)

pavroo

That's cool.
Started from Sparky 3.6 there is ncurses client for wicd called 'wicd-curses' as well.
Nothing is easy as it looks. Danielle Steel

View the most recent posts on the forum