Advertisement
Guest User

i3 config

a guest
Mar 25th, 2018
484
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.75 KB | None | 0 0
  1. # i3 config file (v4)
  2. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  3. # place this file in ~/.config/i3/config
  4.  
  5. # RESOURCES:
  6. # i3code cast tutorial:
  7. # https://www.youtube.com/watch?v=j1I63wGcvU4&list=PL5ze0DjYv5DbCv9vNEzFmP6sU7ZmkGzcf
  8.  
  9. # REQUIREMENTS:
  10. # playerctl - Install deb from https://github.com/acrisci/playerctl/releases (sudo dpkg -i package-name)
  11. # font awesome - https://github.com/FortAwesome/Font-Awesome/releases (unzip and cp fonts in ~/.fonts)
  12.  
  13. # OPTIONAL:
  14. # infinity - http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html
  15. # feh - background images
  16. # compton - transparence and transition between windows
  17. # rofi
  18.  
  19. # VARIABLES:
  20. # Mod key
  21. set $mod Mod4
  22.  
  23. # directional alternative keys (Sorry vi I don't like "jkl;")
  24. set $key_up i
  25. set $key_down k
  26. set $key_left j
  27. set $key_right l
  28.  
  29. # monitors
  30. set $display_laptop "LVDS-1"
  31. set $display_external "DP-2"
  32.  
  33. # colors
  34.  
  35. set $bg-color #2f343f
  36. set $inactive-bg-color #2f343f
  37. set $text-color #f3f4f5
  38. set $inactive-text-color #676E7D
  39. set $urgent-bg-color #E53935
  40.  
  41. # workspace name variables
  42. set $ws_browsing "1 "
  43. set $ws_terminals "2 "
  44. set $ws_editors "3 editors"
  45. # "
  46. set $ws_messaging "4 messages"
  47. # "
  48. set $ws_media "5 media"
  49. # "
  50. set $ws_tools "6 "
  51.  
  52. # Font for window titles. Will also be used by the bar unless a different font
  53. # is used in the bar {} block below.
  54. font pango:Liberation 12px
  55.  
  56. # Use Mouse+$mod to drag floating windows to their wanted position
  57. floating_modifier $mod
  58.  
  59. # start a terminal
  60. bindsym $mod+Return exec i3-sensible-terminal
  61.  
  62. # kill focused window
  63. bindsym $mod+Shift+q kill
  64.  
  65. # start rofi (a program launcher)
  66. bindsym $mod+d exec rofi -show run -lines 4 -eh 2 -width 100 -padding 200 -opacity "85" -bw 0 -bc "$bg-color" -bg "$bg-color" -fg "$text-color" -hlbg "$bg-color" -hlfg "#9575cd" -font "Terminos 18"
  67.  
  68. # change focus
  69. bindsym $mod+u focus [urgent=latest]
  70.  
  71. bindsym $mod+$key_left focus left
  72. bindsym $mod+$key_down focus down
  73. bindsym $mod+$key_up focus up
  74. bindsym $mod+$key_right focus right
  75.  
  76. # alternatively, you can use the cursor keys:
  77. bindsym $mod+Left focus left
  78. bindsym $mod+Down focus down
  79. bindsym $mod+Up focus up
  80. bindsym $mod+Right focus right
  81.  
  82. # move focused window
  83. bindsym $mod+Shift+$key_left move left
  84. bindsym $mod+Shift+$key_down move down
  85. bindsym $mod+Shift+$key_up move up
  86. bindsym $mod+Shift+$key_right move right
  87.  
  88. # alternatively, you can use the cursor keys:
  89. bindsym $mod+Shift+Left move left
  90. bindsym $mod+Shift+Down move down
  91. bindsym $mod+Shift+Up move up
  92. bindsym $mod+Shift+Right move right
  93.  
  94. # split in horizontal orientation
  95. bindsym $mod+h split h
  96.  
  97. # split in vertical orientation
  98. bindsym $mod+v split v
  99.  
  100. # enter fullscreen mode for the focused container
  101. bindsym $mod+f fullscreen toggle
  102.  
  103. # change container layout (stacked, tabbed, toggle split)
  104. bindsym $mod+s layout stacking
  105. bindsym $mod+w layout tabbed
  106. bindsym $mod+e layout toggle split
  107.  
  108. # toggle tiling / floating
  109. bindsym $mod+Shift+space floating toggle
  110.  
  111. # change focus between tiling / floating windows
  112. bindsym $mod+space focus mode_toggle
  113.  
  114. # focus the parent container
  115. bindsym $mod+a focus parent
  116.  
  117. # switch to workspace
  118. bindsym $mod+1 workspace $ws_browsing
  119. bindsym $mod+2 workspace $ws_terminals
  120. bindsym $mod+3 workspace $ws_editors
  121. bindsym $mod+4 workspace $ws_messaging
  122. bindsym $mod+5 workspace $ws_media
  123. bindsym $mod+6 workspace $ws_tools
  124. bindsym $mod+7 workspace 7
  125. bindsym $mod+8 workspace 8
  126. bindsym $mod+9 workspace 9
  127. bindsym $mod+0 workspace 10
  128.  
  129. # move focused container to workspace
  130. bindsym $mod+Shift+1 move container to workspace $ws_browsing
  131. bindsym $mod+Shift+2 move container to workspace $ws_terminals
  132. bindsym $mod+Shift+3 move container to workspace $ws_editors
  133. bindsym $mod+Shift+4 move container to workspace $ws_messaging
  134. bindsym $mod+Shift+5 move container to workspace $ws_media
  135. bindsym $mod+Shift+6 move container to workspace $ws_tools
  136. bindsym $mod+Shift+7 move container to workspace 7
  137. bindsym $mod+Shift+8 move container to workspace 8
  138. bindsym $mod+Shift+9 move container to workspace 9
  139. bindsym $mod+Shift+0 move container to workspace 10
  140.  
  141. # move current workspace to different screen
  142. bindsym $mod+Mod1+$key_left move workspace to output left
  143. bindsym $mod+Mod1+$key_right move workspace to output right
  144. bindsym $mod+Mod1+Left move workspace to output left
  145. bindsym $mod+Mod1+Right move workspace to output right
  146.  
  147. # reload the configuration file
  148. bindsym $mod+Shift+c reload
  149. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  150. bindsym $mod+Shift+r restart
  151. # exit i3 (logs you out of your X session)
  152. 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'"
  153.  
  154. # resize window (you can also use the mouse for that)
  155. mode "resize" {
  156. # These bindings trigger as soon as you enter the resize mode
  157.  
  158. # Pressing left will shrink the window’s width.
  159. # Pressing right will grow the window’s width.
  160. # Pressing up will shrink the window’s height.
  161. # Pressing down will grow the window’s height.
  162. bindsym $key_left resize shrink width 10 px or 10 ppt
  163. bindsym $key_down resize grow height 10 px or 10 ppt
  164. bindsym $key_up resize shrink height 10 px or 10 ppt
  165. bindsym $key_right resize grow width 10 px or 10 ppt
  166.  
  167. # same bindings, but for the arrow keys
  168. bindsym Left resize shrink width 10 px or 10 ppt
  169. bindsym Down resize grow height 10 px or 10 ppt
  170. bindsym Up resize shrink height 10 px or 10 ppt
  171. bindsym Right resize grow width 10 px or 10 ppt
  172.  
  173. # back to normal: Enter or Escape
  174. bindsym Return mode "default"
  175. bindsym Escape mode "default"
  176. }
  177.  
  178. bindsym $mod+r mode "resize"
  179.  
  180. # Start i3bar to display a workspace bar (plus the system information i3status
  181. # finds out, if available)
  182. bar {
  183. status_command i3status
  184. tray_output $display_laptop
  185. }
  186.  
  187. # Pulse Audio controls
  188. bindsym XF86AudioRaiseVolume exec "volume_control.sh +"
  189. bindsym XF86AudioLowerVolume exec "volume_control.sh -"
  190. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
  191.  
  192. # Media player controls
  193. bindsym XF86AudioPlay exec playerctl play-pause
  194. bindsym XF86AudioStop exec playerctl pause
  195. bindsym XF86AudioNext exec playerctl next
  196. bindsym XF86AudioPrev exec playerctl previous
  197.  
  198. # Other XF86 Keys
  199. # (dell keyboard)
  200. bindsym XF86Tools exec spotify
  201. bindsym XF86Back exec keepassx
  202. bindsym XF86Forward exec emacs
  203. bindsym XF86HomePage exec dolphin
  204. bindsym XF86Explorer exec firefox
  205. bindsym XF86Mail exec thunderbird
  206. bindsym XF86Calculator exec kcalc
  207. bindsym Cancel exec i3lock -d
  208. bindsym XF86Reload reload
  209. bindsym Print exec spectacle
  210.  
  211. # ThinkPad x230 fn keys
  212. bindsym XF86Launch1 exec i3lock -d # orizontal unmarked button
  213. bindsym XF86AudioMicMute exec emacs ~/.config/i3/config
  214. bindsym XF86ScreenSaver exec i3lock -d
  215. bindsym XF86WebCam exec google-chrome https://hangouts.google.com
  216. # bindsym XF86Display exec # TODO: bind to script that will activate/disactivate second screen
  217. # bindsym XF86Sleep # DO NOT USE.. used to suspend pc
  218. # bindsym XF86WLAN exec # DO NOT USE.. used by the system to toggle wifi
  219.  
  220. # assign window classes to workspaces
  221. assign [class="Firefox"] $ws_browsing
  222. assign [class="Emacs24"] $ws_editors
  223. assign [class="Thunderbird"] $ws_browsing
  224. # assign [class="Spotify"] $ws_media
  225. for_window [class="Spotify"] move to workspace $ws_media
  226.  
  227. # list of app to load at startup
  228. exec firefox
  229. exec emacs
  230. exec nm-applet
  231. exec feh --bg-scale ~/images/wallpapers/Nessy.png
  232. exec compton -f
  233. exec dropbox start
  234. # exec thunderbird
  235. # exec spotify
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement