chomik
10/27/2016 - 10:05 AM

My current i3wm config

My current i3wm config

#!/bin/sh
xrandr --output HDMI1 --off --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 1680x282 --rotate normal --output VGA1 --mode 1680x1050 --pos 0x0 --rotate normal
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --off --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output VGA1 --off
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --off --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 1920x312 --rotate normal --output VGA1 --mode 1920x1080 --pos 3286x0 --rotate normal
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --off --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 1920x312 --rotate normal --output VGA1 --mode 1920x1080 --pos 0x0 --rotate normal
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --off --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 248x1080 --rotate normal --output VGA1 --mode 1920x1080 --pos 0x0 --rotate normal
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --mode 1920x1080 --pos 1080x0 --rotate normal --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 1080x1080 --rotate normal --output VGA1 --mode 1920x1080 --pos 0x0 --rotate left
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 554x1080 --rotate normal --output VGA1 --mode 1920x1080 --pos 1920x0 --rotate normal
nitrogen --restore
#!/bin/sh
xrandr --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate left --output VIRTUAL1 --off --output DP1 --off --output eDP1 --primary --mode 1366x768 --pos 330x1920 --rotate normal --output VGA1 --mode 1920x1080 --pos 1080x0 --rotate left
nitrogen --restore
#!/bin/bash

declare -i ID
ID=`xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
if [ $STATE -eq 1 ]
then
    xinput disable $ID
    echo "Touchpad disabled."
else
    xinput enable $ID
    echo "Touchpad enabled."
fi
# 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 = "#8dd80a"
        color_degraded = "#f49911"
        color_bad = "#f43711"
        output_format = i3bar
        interval = 5
}

#order += "disk /"
#order += "run_watch DHCP"
#order += "run_watch VPN"
order += "wireless _first_"
order += "ethernet _first_"
order += "battery 0"
order += "load"
order += "cpu_usage"
order += "volume master"
order += "tztime local"

wireless _first_ {
        format_up = "W: %quality at %essid"
        # format_up = "W: (%quality at %essid) %ip"
        format_down = "W: down"
}

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

battery 0 {
        format = "%status %percentage %remaining"
}

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

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

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

load {
        format = "⛟  %1min"
}

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

cpu_usage {
        format = "⚝ %usage"
}

volume master {
        format = "♪ %volume"
        format_muted = "♪  (%volume)"
        device = "pulse"
}
# 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!

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.
font pango:monospace 8

# 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.

# Enable back_and_forth
workspace_auto_back_and_forth yes
bindsym $mod+z workspace back_and_forth

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

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

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

# 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 workspace through outputs
bindsym $mod+Control+h move workspace to output left
bindsym $mod+Control+j move workspace to output down
bindsym $mod+Control+k move workspace to output up
bindsym $mod+Control+l move workspace to output right

# alternatively, you can use the cursor keys:
bindsym $mod+Control+Left move workspace to output left
bindsym $mod+Control+Down move workspace to output down
bindsym $mod+Control+Up move workspace to output up
bindsym $mod+Control+Right move workspace to output 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+b split h

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

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

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

# toggle sticky mode
bindsym $mod+t sticky toggle

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

# toggle borders
bindsym $mod+x border toggle

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

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

# focus the child container
#bindsym $mod+d focus child

# rename workspace
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name for this workspace: '

# switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
bindsym $mod+F1 workspace number 11
bindsym $mod+F2 workspace number 12
bindsym $mod+F3 workspace number 13
bindsym $mod+F4 workspace number 14
bindsym $mod+F5 workspace number 15
bindsym $mod+F6 workspace number 16
bindsym $mod+F7 workspace number 17
bindsym $mod+F8 workspace number 18
bindsym $mod+F9 workspace number 19

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
bindsym $mod+Shift+F1 move container to workspace number 11
bindsym $mod+Shift+F2 move container to workspace number 12
bindsym $mod+Shift+F3 move container to workspace number 13
bindsym $mod+Shift+F4 move container to workspace number 14
bindsym $mod+Shift+F5 move container to workspace number 15
bindsym $mod+Shift+F6 move container to workspace number 16
bindsym $mod+Shift+F7 move container to workspace number 17
bindsym $mod+Shift+F8 move container to workspace number 18
bindsym $mod+Shift+F9 move container to workspace number 19

# 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'"

# lock
bindsym $mod+c exec "slock"
bindsym $mod+Control+c exec "sudo pm-suspend && slock"

# window switcher
bindsym $mod+space exec "rofi -show window"

# switch to urgent window
bindsym $mod+g [urgent=latest] focus

# reload output layout
bindsym $mod+Control+F1 exec ~/.screenlayout/work-laptop-only.sh
bindsym $mod+Control+F2 exec ~/.screenlayout/work-3-displays-default.sh
bindsym $mod+Mod1+F2 exec ~/.screenlayout/work-3-displays-default-alternative.sh
bindsym $mod+Mod1+Shift+F2 exec ~/.screenlayout/work-3-displays-default-alternative-two.sh
bindsym $mod+Control+F3 exec ~/.screenlayout/work-ext-above-int.sh
bindsym $mod+Control+F4 exec ~/.screenlayout/work-ext-on-the-left.sh
bindsym $mod+Control+F5 exec ~/.screenlayout/work-ext-on-the-right.sh
bindsym $mod+Control+F6 exec ~/.screenlayout/work-tv.sh
bindsym $mod+Control+F7 exec ~/.screenlayout/work-presentation.sh

# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # mute sound

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight +10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -10 # decrease screen brightness

# Touchpad controls
bindsym XF86TouchpadToggle exec ~/.local/bin/toggletouchpad.sh # toggle touchpad

# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

# 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
  position top
  id bar-top
  tray_output primary
  colors {
    separator #888888
    background #1c1b1a
    statusline #888888
    focused_workspace #F21F69 #B2003E #FFFFFF
    active_workspace #333333 #333333 #FFFFFF
    inactive_workspace #333333 #111111 #888888
    urgent_workspace #C20000 #C20000 #FFFFFF
  }
}

# make pomello always floating
for_window [class="Pomello"] floating enable

# color theme:
client.focused #B2003E #B2003E #FFFFFF #FFFFFF
client.focused_inactive #890418 #890418 #888888 #FFFFFF
client.unfocused #333333 #333333 #888888 #FFFFFF
client.urgent #C20000 #C20000 #FFFFFF #FFFFFF

for_window [class=".*"] title_format "[%title]"

# autostart:
exec nm-applet
exec nitrogen --restore
#exec lxpolkit
#exec xfce4-power-manager
exec setxkbmap -option ctrl:nocaps
exec sleep 5;pasystray
exec compton -CfG
exec gnome-do
exec yakuake