Guest User

Untitled

a guest
Feb 11th, 2020
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.07 KB | None | 0 0
  1. #
  2. # _ _____ __ _
  3. # (_)___ / ___ ___ _ __ / _(_) __ _
  4. # | | |_ \ / __/ _ \| '_ \| |_| |/ _` |
  5. # | |___) | | (_| (_) | | | | _| | (_| |
  6. # |_|____/ \___\___/|_| |_|_| |_|\__, |
  7. # |___/
  8. #
  9. # i3 config file (v4)
  10. #
  11. # Please see https://i3wm.org/docs/userguide.html for a complete reference!
  12.  
  13. set $mod Mod4
  14.  
  15. # Font for window titles. Will also be used by the bar unless a different font
  16. font pango:DejaVu Sans Mono Book 11,FontAwesome 11
  17. #font xft:Noto Sans 11
  18. #font pango:Source Code Variable Regular 12
  19. #
  20. #font pango:Liberation Mono Bold 12
  21. #font pango:Terminus Bold 13
  22. #font pango:Inconsolata Medium 13
  23. #font pango:SNFS Display Regular 12
  24. #font pango:Cantarell Regular 12
  25. #font pango:Courier Prime Regular 14
  26.  
  27. #
  28. ## Coloring Taken from https://github.com/bookercodes/dotfiles/blob/ubuntu/.i3/config
  29. #
  30. set $bg-color #2f343f
  31. set $inactive-bg-color #2f343f
  32. set $text-color #f3f4f5
  33. set $inactive-text-color #676E7D
  34. set $urgent-bg-color #dc3225
  35.  
  36. # Use Mouse+$mod to drag floating windows to their wanted position
  37. floating_modifier $mod
  38.  
  39. # swith to urgent workspace:
  40. bindsym $mod+u [urgent=latest] focus
  41.  
  42. # start a terminal
  43. bindsym $mod+Return exec i3-sensible-terminal
  44.  
  45. # kill focused window
  46. bindsym $mod+Shift+q kill
  47.  
  48. # use rofi instead of dmenu
  49. bindsym $mod+d exec rofi -combi-modi "run#ssh" -show combi -lines 8 -eh 1 -width 30 -padding 30 -bw 2 -font "DejaVu Sans Mono Bold 15"
  50.  
  51. # Printscreen calls scrot and selects the window/container which is in focus
  52. bindsym --release $mod+Print exec scrot -q 100 -u '%Y-%m-%d_%H%M%S_$wx$h_rootwin_scrot.png' -e 'mv $f ~/Shots/'
  53.  
  54. # Printscreen to grab the full screen
  55. bindsym --release Print exec scrot -q '%Y-%m-%d_%H%M%S_$wx$h_infocus_scrot.png' -e 'mv $f ~/Shots/'
  56.  
  57. # change focus
  58. bindsym $mod+j focus left
  59. bindsym $mod+k focus down
  60. bindsym $mod+l focus up
  61. bindsym $mod+odiaeresis focus right
  62.  
  63. # alternatively, you can use the cursor keys:
  64. bindsym $mod+Left focus left
  65. bindsym $mod+Down focus down
  66. bindsym $mod+Up focus up
  67. bindsym $mod+Right focus right
  68.  
  69. # move focused window
  70. bindsym $mod+Shift+j move left
  71. bindsym $mod+Shift+k move down
  72. bindsym $mod+Shift+l move up
  73. bindsym $mod+Shift+odiaeresis move right
  74.  
  75. # alternatively, you can use the cursor keys:
  76. bindsym $mod+Shift+Left move left
  77. bindsym $mod+Shift+Down move down
  78. bindsym $mod+Shift+Up move up
  79. bindsym $mod+Shift+Right move right
  80.  
  81. # split in horizontal orientation
  82. bindsym $mod+h split h
  83.  
  84. # split in vertical orientation
  85. bindsym $mod+v split v
  86.  
  87. # enter fullscreen mode for the focused container
  88. bindsym $mod+f fullscreen toggle
  89.  
  90. # change container layout (stacked, tabbed, toggle split)
  91. bindsym $mod+s layout stacking
  92. bindsym $mod+w layout tabbed
  93. bindsym $mod+e layout toggle split
  94.  
  95. # toggle tiling / floating
  96. bindsym $mod+Shift+space floating toggle
  97.  
  98. # change focus between tiling / floating windows
  99. bindsym $mod+space focus mode_toggle
  100.  
  101. # focus the parent container
  102. bindsym $mod+a focus parent
  103.  
  104. # focus the child container
  105. #bindsym $mod+d focus child
  106.  
  107.  
  108. hide_edge_borders both
  109. # set site of border
  110. for_window [class=".*"] border pixel 1
  111.  
  112. # Hide titlebar
  113. #new_window pixel
  114.  
  115. # Define names for default workspaces for which we configure key bindings later on.
  116. # We use variables to avoid repeating the names in multiple places.
  117. set $ws1 1: 
  118. set $ws2 2: 
  119. set $ws3 3: 
  120. set $ws4 4: 
  121. set $ws5 5: 
  122. set $ws6 6: 
  123. set $ws7 7:
  124. set $ws8 8:
  125. set $ws9 9:
  126. set $ws10 10:
  127.  
  128. # switch to workspace
  129. bindsym $mod+1 workspace $ws1
  130. bindsym $mod+2 workspace $ws2
  131. bindsym $mod+3 workspace $ws3
  132. bindsym $mod+4 workspace $ws4
  133. bindsym $mod+5 workspace $ws5
  134. bindsym $mod+6 workspace $ws6
  135. bindsym $mod+7 workspace $ws7
  136. bindsym $mod+8 workspace $ws8
  137. bindsym $mod+9 workspace $ws9
  138. bindsym $mod+0 workspace $ws10
  139.  
  140. # move focused container to workspace
  141. bindsym $mod+Shift+1 move container to workspace $ws1
  142. bindsym $mod+Shift+2 move container to workspace $ws2
  143. bindsym $mod+Shift+3 move container to workspace $ws3
  144. bindsym $mod+Shift+4 move container to workspace $ws4
  145. bindsym $mod+Shift+5 move container to workspace $ws5
  146. bindsym $mod+Shift+6 move container to workspace $ws6
  147. bindsym $mod+Shift+7 move container to workspace $ws7
  148. bindsym $mod+Shift+8 move container to workspace $ws8
  149. bindsym $mod+Shift+9 move container to workspace $ws9
  150. bindsym $mod+Shift+0 move container to workspace $ws10
  151.  
  152. # reload the configuration file
  153. bindsym $mod+Shift+c reload
  154. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  155. bindsym $mod+Shift+r restart
  156. # exit i3
  157.  
  158. set $i3exit ~/.config/i3/scripts/i3exit
  159. bindsym $mod+Shift+x exec --no-startup-id xautolock -locknow -nowlocker "$i3exit lock"
  160.  
  161. set $mode_system System (l) lock, (e) logout, (r) reboot, (Shift+s) shutdown
  162. mode "$mode_system" {
  163. bindsym l exec --no-startup-id $i3exit lock, mode "default"
  164. bindsym e exec --no-startup-id $i3exit logout, mode "default"
  165. #bindsym s exec --no-startup-id $i3exit suspend, mode "default"
  166. #bindsym h exec --no-startup-id $i3exit hibernate, mode "default"
  167. bindsym r exec --no-startup-id $i3exit reboot, mode "default"
  168. bindsym Shift+s exec --no-startup-id $i3exit shutdown, mode "default"
  169.  
  170. # back to normal: Enter or Escape
  171. bindsym Return mode "default"
  172. bindsym Escape mode "default"
  173. }
  174. bindsym $mod+Pause mode "$mode_system"
  175.  
  176. # resize window (you can also use the mouse for that)
  177. mode "resize" {
  178. # These bindings trigger as soon as you enter the resize mode
  179.  
  180. # Pressing left will shrink the window’s width.
  181. # Pressing right will grow the window’s width.
  182. # Pressing up will shrink the window’s height.
  183. # Pressing down will grow the window’s height.
  184. bindsym j resize shrink width 10 px or 10 ppt
  185. bindsym k resize grow height 10 px or 10 ppt
  186. bindsym l resize shrink height 10 px or 10 ppt
  187. bindsym odiaeresis resize grow width 10 px or 10 ppt
  188.  
  189. # same bindings, but for the arrow keys
  190. bindsym Left resize shrink width 10 px or 10 ppt
  191. bindsym Down resize grow height 10 px or 10 ppt
  192. bindsym Up resize shrink height 10 px or 10 ppt
  193. bindsym Right resize grow width 10 px or 10 ppt
  194.  
  195. # back to normal: Enter or Escape or $mod+r
  196. bindsym Return mode "default"
  197. bindsym Escape mode "default"
  198. bindsym $mod+r mode "default"
  199. }
  200.  
  201. bindsym $mod+r mode "resize"
  202.  
  203. # Start i3bar to display a workspace bar (plus the system information i3status
  204. # finds out, if available)
  205. #
  206. bar {
  207. status_command ~/src/bumblebee-status/bumblebee-status -m mpd spacer indicator spacer battery spacer cpu spacer nic brightness spacer pasink pasource spacer weather spacer time -p indicator.include="Capslock" -p weather.location="Dublin" -p time.format="%a %h %d, %H:%M" -p nic.states="^down" -p nic.format="{ip} {ssid}" -t solarized-dark-awesome
  208. colors {
  209. background $bg-color
  210. separator #757575
  211. # border background text
  212. focused_workspace $bg-color $bg-color $text-color
  213. inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
  214. urgent_workspace $urgent-bg-color $urgent-bg-color $text-color
  215. }
  216. }
  217.  
  218.  
  219. # window colors
  220. # border background text indicator
  221. client.focused $bg-color $bg-color $text-color #00ff00
  222. client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
  223. client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
  224. client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
  225.  
  226.  
  227. # Pulse Audio controls
  228. # using numeric sink id format might interfere when pavucontrol & friends
  229. # modify the default sink. to get the name check with "pactl list sinks"
  230.  
  231. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume alsa_output.pci-0000_00_1f.3.analog-stereo +5% #increase sound volume
  232. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume alsa_output.pci-0000_00_1f.3.analog-stereo -5% #decrease sound volume
  233. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute alsa_output.pci-0000_00_1f.3.analog-stereo toggle # mute sound
  234.  
  235. bindsym XF86MonBrightnessUp exec brightnessctl -d intel_backlight s +10% # increase screen brightness
  236. bindsym XF86MonBrightnessDown exec brightnessctl -d intel_backlight s 10%- # decrease screen brightness
  237.  
  238. # Media player controls
  239. bindsym $mod+t exec mpc toggle
  240. bindsym $mod+q exec mpc stop
  241. bindsym $mod+n exec mpc next
  242. bindsym $mod+p exec mpc prev
  243. bindsym $mod+x exec mpc stop
  244.  
  245. # workspace 5 video applications
  246. for_window [title="VLC media player"] move workspace $ws4
  247. for_window [class="vlc"] move workspace $ws4
  248.  
  249. # workspace 5 reserved for GIMP
  250. for_window [title="GIMP Startup"] move workspace $ws5
  251. for_window [class="Gimp"] move workspace $ws5
  252.  
  253. # workspace 6 for chat applications
  254. for_window [title="ricochet"] move workspace $ws6
  255. for_window [class="Signal"] move workspace $ws6
  256. for_window [title="Skype"] move workspace $ws6
  257.  
  258. ###
  259. # autostart applications:
  260.  
  261. exec_always --no-startup-id xautolock -corners +00- -time 30 -locker "$i3exit lock"
  262.  
  263. exec_always --no-startup-id feh --bg-scale ~/Pictures/wallpapers/tape-bw.png
  264.  
  265. exec_always --no-startup-id mpd ~/.config/mpd/mpd.conf
  266. exec_always --no-startup-id unclutter
  267. exec_always --no-startup-id dunst -conf ~/.config/dunst/dunstrc
  268. exec --no-startup-id i3-msg 'exec /usr/bin/keepassxc'
  269.  
  270. ## Workspace 1:
  271. exec --no-startup-id i3-msg 'workspace $ws1; append_layout ~/.config/i3/workspace-1.json'
  272. exec --no-startup-id i3-msg 'workspace $ws1; exec i3-sensible-terminal'
  273. exec --no-startup-id i3-msg 'workspace $ws1; exec i3-sensible-terminal'
  274. exec --no-startup-id i3-msg 'workspace $ws1; exec i3-sensible-terminal'
  275.  
  276. ## Workspace 2:
  277. exec --no-startup-id i3-msg 'workspace $ws2; exec firefox'
  278.  
  279. ## Workspace 3:
  280. ....
Advertisement
Add Comment
Please, Sign In to add comment