kjetilcodes

.i3/config

Feb 6th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.98 KB | None | 0 0
  1. # i3 config file (v4)
  2. #
  3. # Please see https://i3wm.org/docs/userguide.html for a complete reference!
  4. #
  5. # This config file uses keycodes (bindsym) and was written for the QWERTY
  6. # layout.
  7. #
  8. # To get a config file with the same key positions, but for your current
  9. # layout, use the i3-config-wizard
  10. #
  11.  
  12. set $mod mod4
  13.  
  14. # Font for window titles. Will also be used by the bar unless a different font
  15. # is used in the bar {} block below.
  16.  
  17. font pango:DejaVuSansMono Nerd Font 9
  18.  
  19.  
  20. # use these keys for focus, movement, and resize directions when reaching for
  21. # the arrows is not convenient
  22. set $up k
  23. set $down j
  24. set $left h
  25. set $right l
  26.  
  27. # use Mouse+$mod to drag floating windows to their wanted position
  28. floating_modifier $mod
  29.  
  30. # start a terminal
  31. bindsym $mod+Return exec urxvt
  32.  
  33. # kill focused window
  34. bindsym $mod+Shift+q kill
  35.  
  36. # Open Rof, a launcher. It replaces dMenu
  37. bindsym $mod+d exec --no-startup-id "rofi -show drun -font \\"DejaVu 9\\" -run-shell-command '{terminal} -e \\" {cmd}; read -n 1 -s\\"'"
  38.  
  39. # change focus
  40. bindsym $mod+$left focus left
  41. bindsym $mod+$down focus down
  42. bindsym $mod+$up focus up
  43. bindsym $mod+$right focus right
  44.  
  45. # alternatively, you can use the cursor keys:
  46. bindsym $mod+Left focus left
  47. bindsym $mod+Down focus down
  48. bindsym $mod+Up focus up
  49. bindsym $mod+Right focus right
  50.  
  51. # move focused window
  52. bindsym $mod+Shift+$left move left
  53. bindsym $mod+Shift+$down move down
  54. bindsym $mod+Shift+$up move up
  55. bindsym $mod+Shift+$right move right
  56.  
  57. # alternatively, you can use the cursor keys:
  58. bindsym $mod+Shift+Left move left
  59. bindsym $mod+Shift+Down move down
  60. bindsym $mod+Shift+Up move up
  61. bindsym $mod+Shift+Right move right
  62.  
  63. # split in vertical orientation
  64. bindsym $mod+v split v
  65.  
  66. # enter fullscreen mode for the focused container
  67. bindsym $mod+f fullscreen toggle
  68.  
  69. # change container layout (stacked, tabbed, toggle split)
  70. bindsym $mod+s layout stacking
  71. bindsym $mod+w layout tabbed
  72. bindsym $mod+e layout toggle split
  73.  
  74. # toggle tiling / floating
  75. bindsym $mod+Shift+space floating toggle
  76.  
  77. # change focus between tiling / floating windows
  78. bindsym $mod+space focus mode_toggle
  79.  
  80. # focus the parent container
  81. bindsym $mod+a focus parent
  82.  
  83. # focus the child container
  84. #bindsym $mod+d focus child
  85.  
  86. # move the currently focused window to the scratchpad
  87. bindsym $mod+Shift+minus move scratchpad
  88.  
  89. # Show the next scratchpad window or hide the focused scratchpad window.
  90. # If there are multiple scratchpad windows, this command cycles through them.
  91. bindsym $mod+minus scratchpad show
  92.  
  93. set $ws1  "1:1"
  94. set $ws2  "2:2"
  95. set $ws3  "3:3"
  96. set $ws4  "4:4"
  97. set $ws5  "5:5"
  98. set $ws6  "6:6"
  99. set $ws7  "7:7"
  100. set $ws8  "8:8"
  101. set $ws9  "9:9"
  102. set $ws10  "10:10"
  103.  
  104. # switch to workspace
  105. bindsym $mod+1 workspace $ws1
  106. bindsym $mod+2 workspace $ws2
  107. bindsym $mod+3 workspace $ws3
  108. bindsym $mod+4 workspace $ws4
  109. bindsym $mod+5 workspace $ws5
  110. bindsym $mod+6 workspace $ws6
  111. bindsym $mod+7 workspace $ws7
  112. bindsym $mod+8 workspace $ws8
  113. bindsym $mod+9 workspace $ws9
  114. bindsym $mod+0 workspace $ws10
  115.  
  116. # move focused container to workspace
  117. bindsym $mod+Shift+1 move container to workspace $ws1
  118. bindsym $mod+Shift+2 move container to workspace $ws2
  119. bindsym $mod+Shift+3 move container to workspace $ws3
  120. bindsym $mod+Shift+4 move container to workspace $ws4
  121. bindsym $mod+Shift+5 move container to workspace $ws5
  122. bindsym $mod+Shift+6 move container to workspace $ws6
  123. bindsym $mod+Shift+7 move container to workspace $ws7
  124. bindsym $mod+Shift+8 move container to workspace $ws8
  125. bindsym $mod+Shift+9 move container to workspace $ws9
  126. bindsym $mod+Shift+0 move container to workspace $ws10
  127.  
  128. # reload the configuration file
  129. bindsym $mod+Shift+c reload
  130. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  131. bindsym $mod+Shift+r restart
  132. # exit i3 (logs you out of your X session)
  133. 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'"
  134.  
  135. # resize window (you can also use the mouse for that)
  136. mode "resize" {
  137.         # These bindings trigger as soon as you enter the resize mode
  138.  
  139.         # Pressing left will shrink the window’s width.
  140.         # Pressing right will grow the window’s width.
  141.         # Pressing up will shrink the window’s height.
  142.         # Pressing down will grow the window’s height.
  143.         bindsym $left       resize shrink width 10 px or 10 ppt
  144.         bindsym $down       resize grow height 10 px or 10 ppt
  145.         bindsym $up         resize shrink height 10 px or 10 ppt
  146.         bindsym $right      resize grow width 10 px or 10 ppt
  147.  
  148.         # same bindings, but for the arrow keys
  149.         bindsym Left        resize shrink width 10 px or 10 ppt
  150.         bindsym Down        resize grow height 10 px or 10 ppt
  151.         bindsym Up          resize shrink height 10 px or 10 ppt
  152.         bindsym Right       resize grow width 10 px or 10 ppt
  153.  
  154.         # back to normal: Enter or Escape
  155.         bindsym Return mode "default"
  156.         bindsym Escape mode "default"
  157. }
  158.  
  159. bindsym $mod+r mode "resize"
  160.  
  161. # Start i3bar to display a workspace bar (plus the system information i3status
  162. # finds out, if available)
  163. bar {
  164.     id bar-1
  165.     strip_workspace_numbers yes
  166.    
  167. }
  168.  
  169. bar {
  170.     id bar-2
  171.     status_command i3blocks
  172.     position top
  173.     workspace_buttons no
  174. }
  175.  
  176.  
  177. #Wallpaper
  178. exec_always feh --bg-fill /home/kjetil/Pictures/wpb.jpg
  179. exec_always xrdb ~/.Xresources
  180.  
  181. #Display setup
  182.  
  183. #Set screen variables ( Found by writing xrandr in console )
  184. set $main "DP-1"
  185. set $second "DV-I-1"
  186. set $tv "HDMI-3"
  187.  
  188. #Assign each workspace to the screens i want
  189. workspace $ws1 output $second
  190. workspace $ws2 output $main
  191. workspace $ws3 output $main  
  192. workspace $ws4 output $main
  193. workspace $ws5 output $main
  194. workspace $ws6 output $main
  195. workspace $ws7 output $main
  196. workspace $ws8 output $main
  197. workspace $ws9 output $main
  198. workspace $ws10 output $main
  199.  
  200. #Setting the gaps and borders between windows
  201. for_window [class="^.*"] border pixel 2
  202. gaps inner 5
Advertisement
Add Comment
Please, Sign In to add comment