Permalink
Browse files

Setup i3 to have two configurations

Since I have a desktop and a laptop Debian install running the i3 window
manager, and since they have differing requirements, I have two sets of all my
i3 configuration files. Each machine will symlink the version it requires.
  • Loading branch information...
1 parent 026093e commit 4c2ded1f01b08aa6062b73ad39505a687c40f8b4 @zanshin committed Jul 14, 2016
Showing with 996 additions and 0 deletions.
  1. +308 −0 i3/config.desktop
  2. +308 −0 i3/config.laptop
  3. +107 −0 i3/i3blocks.desktop.conf
  4. +107 −0 i3/i3blocks.laptop.conf
  5. +83 −0 i3/status.desktop.conf
  6. +83 −0 i3/status.laptop.conf
View
@@ -0,0 +1,308 @@
+# vim:filetype=i3
+# i3 config
+
+# Some colors
+set $black #073642
+set $red #dc322f
+set $green #859900
+set $yellow #b58900
+set $blue #268bd2
+set $magenta #d33682
+set $cyan #2aa198
+set $white #eee8d5
+
+set $brblack #002b36
+set $brred #cb4b16
+set $brgreen #586e75
+set $bryellow #657b83
+set $brblue #839496
+set $brmagenta #6c71c4
+set $brcyan #93a1a1
+set $brwhite #fdf6e2
+
+set $base00 #101218
+set $base01 #1f222d
+set $base02 #252936
+set $base03 #7780a1
+set $base04 #C0C5CE
+set $base05 #d1d4e0
+set $base06 #C9CCDB
+set $base07 #ffffff
+set $base08 #ee829f
+set $base09 #f99170
+set $base0A #ffefcc
+set $base0B #a5ffe1
+set $base0C #97e0ff
+set $base0D #97bbf7
+set $base0E #c0b7f9
+set $base0F #fcc09e
+
+# i3 gaps settings
+for_window [class="^.*"] border pixel 0
+set $default_gaps_inner 20
+set $default_gaps_outer 15
+gaps inner $default_gaps_inner
+gaps outer $default_gaps_outer
+
+# Workspaces
+set $ws1 "1:  "
+set $ws2 "2:  "
+set $ws3 "3: "
+set $ws4 "4: "
+set $ws5 "5: "
+set $ws6 "6: "
+set $ws7 "7: "
+set $ws8 "8: "
+set $ws9 "9:  "
+set $ws10 "10:  "
+
+
+# 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).
+#
+
+#
+# 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.
+# 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
+
+font pango:System San Francisco Display 9
+
+# 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.
+
+# 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
+bindsym $mod+d exec rofi -show run -lines 5 -eh 2 -opacity "85" -bw 0 -bg "$black" -bc "$black" -fg "$white" -hlbg "$brblack" -hlfg "#9575cd" -font "System San Francisco Display 14"
+
+# 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+j focus left
+#bindsym $mod+k focus down
+#bindsym $mod+l focus up
+#bindsym $mod+semicolon focus right
+
+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+j move left
+#bindsym $mod+Shift+k move down
+#bindsym $mod+Shift+l move up
+#bindsym $mod+Shift+semicolon move right
+
+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+h split h
+
+bindsym $mod+Control+h split h
+
+# split in vertical orientation
+bindsym $mod+v 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+d focus child
+
+
+# switch to workspace
+bindsym $mod+1 workspace $ws1
+bindsym $mod+2 workspace $ws2
+bindsym $mod+3 workspace $ws3
+bindsym $mod+4 workspace $ws4
+bindsym $mod+5 workspace $ws5
+bindsym $mod+6 workspace $ws6
+bindsym $mod+7 workspace $ws7
+bindsym $mod+8 workspace $ws8
+bindsym $mod+9 workspace $ws9
+bindsym $mod+0 workspace $ws10
+
+# move focused container to workspace
+bindsym $mod+Shift+1 move container to workspace $ws1
+bindsym $mod+Shift+2 move container to workspace $ws2
+bindsym $mod+Shift+3 move container to workspace $ws3
+bindsym $mod+Shift+4 move container to workspace $ws4
+bindsym $mod+Shift+5 move container to workspace $ws5
+bindsym $mod+Shift+6 move container to workspace $ws6
+bindsym $mod+Shift+7 move container to workspace $ws7
+bindsym $mod+Shift+8 move container to workspace $ws8
+bindsym $mod+Shift+9 move container to workspace $ws9
+bindsym $mod+Shift+0 move container to workspace $ws10
+
+assign [class="Rocket.Chat"] $ws10
+
+# 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)
+# https://www.reddit.com/r/unixporn/comments/49zncq/questions_regarding_i3/
+set $session " (B)eenden  (S)perren  (H)erunterfahren  (N)eustarten"
+mode $session {
+ bindsym b exec $psst i3-msg exit; mode "default"
+ bindsym s exec $psst ~/.scripts/lockscreen; mode "default"
+ bindsym h exec $psst systemctl poweroff; mode "default"
+ bindsym n exec $psst systemctl reboot; mode "default"
+
+ bindsym q mode "default"
+ bindsym Escape mode "default"
+}
+bindsym $mod+Shift+e mode $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'"
+
+# 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 j resize shrink width 10 px or 10 ppt
+ bindsym k resize grow height 10 px or 10 ppt
+ bindsym l resize shrink height 10 px or 10 ppt
+ bindsym semicolon 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"
+
+
+# Window color assignments
+# border background text indicator
+#client.focused $blue $blue $white $red
+#client.focused_inactive $cyan $black $white $red
+#client.unfocused $cyan $black $white $red
+#client.urgent $cyan $red $white $red
+
+ client.focused $base01 $base01 $base07 $base0F
+ client.focused_inactive $base02 $base02 $base03 $base0F
+ client.unfocused $base02 $base02 $base03 $base0F
+ client.urgent $base02 $base08 $base00 $base0F
+
+
+# Start i3bar to display a workspace bar (plus the system information i3status
+# finds out, if available)
+bar {
+ font pango: System San Francisco Display, FontAwesome 9
+ status_command i3blocks -c /home/mhn/.i3/i3blocks.conf
+# status_command i3status --config /home/mhn/.i3/status.conf
+ position top
+ colors {
+ separator $base03
+ background $base01
+ statusline $base05
+# border background text
+ focused_workspace $base01 $base01 $base07
+ active_workspace $base01 $base02 $base03
+ inactive_workspace $base01 $base01 $base03
+ urgent_workspace $base01 $base01 $base08
+ }
+}
+
+# Things to execute on start up
+# start the nm-applet on startup
+exec --no-startup-id nm-applet
+exec --no-startup-id dropbox start
+exec /opt/rocketchat/rocketchat
+
+# Set screen resolution (use arandr to get command flags)
+# exec_always xrandr --output DP3 --off --output eDP1 --mode 2560x1600 --pos 0x0 --rotate normal --output DP1 --off --output DP2 --off --output HDMI3 --off --output HDMI2 --off --output HDMI1 --off --output VGA1 --off
+exec_always xrandr --output DP3 --off --output eDP1 --mode 1920x1200 --pos 0x0 --rotate normal --output DP1 --off --output DP2 --off --output HDMI3 --off --output HDMI2 --off --output HDMI1 --off --output VGA1 --off
+
+# use feh to set wallpaper
+# exec_always --no-startup-id feh --bg-scale /home/mhn/Pictures/Skylight_Reflect_L_27.jpg
+#exec_always --no-startup-id feh --bg-fill /home/mhn/Pictures/shroom.png
+exec_always --no-startup-id feh --bg-fill /home/mhn/Pictures/keyboard-1920x1200.jpg
+
+
+# Set the keyboard up to recognize the tilde (~) key
+# exec --no-startup-id sudo bash -c "echo 0 > /sys/module/hid_apple/parameters/iso_layout"
+
+# Lock the screen using i3lock
+bindsym $mod+shift+x exec i3lock -i /home/mhn/Pictures/shroom.png -c 000000
+
+# Volume & Media bindings
+bindsym XF86AudioLowerVolume exec --no-startup-id pulseaudio-ctl down
+bindsym XF86AudioRaiseVolume exec --no-startup-id pulseaudio-ctl up
+bindsym XF86AudioMute exec --no-startup-id pulseaudio-ctl mute
+
+bindsym XF86AudioPlay exec playerctl play-pause
+bindsym XF86AudioPause exec playerctl pause
+bindsym XF86AudioNext exec playerctl next
+bindsym XF86AudioPrev exec playerctl previous
+
+# Screen backlighting
+# bindsym XF86MonBrightnessUp exec sudo screen-backlight up
+# bindsym XF86MonBrightnessDown exec sudo screen-backlight down
+
Oops, something went wrong.

0 comments on commit 4c2ded1

Please sign in to comment.