Advertisement
Guest User

config

a guest
Jul 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.51 KB | None | 0 0
  1. # vim: filetype=i3
  2. # #---Basic Definitions---# #
  3. # Needed for i3-gaps
  4. for_window [class="^.*"] border pixel 1
  5. gaps inner 15
  6. gaps outer 15
  7. set $mod Mod4
  8. set $term --no-startup-id st
  9. set $stoprec --no-startup-id killrecording
  10. set $shutdown sudo shutdown -h now
  11. set $reboot sudo reboot
  12. set $netrefresh --no-startup-id sudo systemctl restart NetworkManager
  13. set $hibernate sudo systemctl suspend
  14.  
  15. # #---Starting External Scripts---# #
  16. # Setting the background:
  17. #exec_always --no-startup-id wal -i ~/.config/wall.png
  18. exec_always --no-startup-id feh --bg-scale ~/.config/wall.png
  19. # Starts dunst for notifications:
  20. exec --no-startup-id dunst
  21. # Music player daemon:
  22. exec --no-startup-id mpd
  23. # Torrent daemon:
  24. #exec --no-startup-id transmission-daemon
  25. # Composite manager:
  26. exec --no-startup-id compton --xrender-sync-fence
  27. # Launch Polybar where appropriate:
  28. #exec_always --no-startup-id ~/.scripts/polybar_launch
  29. # Runs the key remapping scripts
  30. exec --no-startup-id ~/.scripts/remaps
  31. # Unclutter makes the mouse invisible after a brief period
  32. exec --no-startup-id unclutter
  33. # Network Manager applet
  34. exec --no-startup-id nm-applet
  35. # Run the script to update the mpd i3block on change.
  36. exec --no-startup-id "pgrep -x i3mpdupdate || i3mpdupdate"
  37. # Remove recording icon if not properly closed on last shutdown.
  38. exec --no-startup-id rm -f ~/.larbs/.recording
  39.  
  40. # Set Xresources colors:
  41. set_from_resource $darkblack color0 #000000
  42. set_from_resource $black color8 #000000
  43. set_from_resource $darkred color1 #000000
  44. set_from_resource $red color9 #000000
  45. set_from_resource $darkgreen color2 #000000
  46. set_from_resource $green color10 #000000
  47. set_from_resource $darkyellow color3 #000000
  48. set_from_resource $yellow color11 #000000
  49. set_from_resource $darkblue color4 #000000
  50. set_from_resource $blue color12 #000000
  51. set_from_resource $darkmagenta color5 #000000
  52. set_from_resource $magenta color13 #000000
  53. set_from_resource $darkcyan color6 #000000
  54. set_from_resource $cyan color14 #000000
  55. set_from_resource $darkwhite color7 #000000
  56. set_from_resource $white color15 #000000
  57. set $transparent #00000000
  58.  
  59. # BORDER BACKGROUND TEXT INDICATOR CHILD_BORDER
  60. client.focused $red $red $magenta $darkmagenta $darkblue
  61. client.unfocused $transparent $blue $white $darkblue $darkblack
  62. client.focused_inactive $transparent $blue $white $darkblue $darkblack
  63. client.urgent $darkred $darkred $black $darkred $darkred
  64. client.background $black
  65.  
  66. bar {
  67. font pango:mono 11
  68. colors {
  69. background $darkblack
  70. statusline $darkwhite
  71. separator $cyan
  72. focused_workspace $blue $darkblue $darkwhite
  73. active_workspace $blue $blue $darkwhite
  74. inactive_workspace $darkblack $darkblack $white
  75. urgent_workspace $darkblack $darkblack $white
  76. }
  77. status_command i3blocks
  78. position top
  79. mode dock
  80. modifier None
  81. }
  82.  
  83. # #---Basic Bindings---# #
  84. bindsym $mod+Return exec $term
  85. bindsym $mod+Shift+Return exec --no-startup-id samedir
  86.  
  87. bindsym $mod+Shift+space floating toggle
  88. bindsym $mod+space focus mode_toggle
  89.  
  90. bindsym $mod+Escape workspace prev
  91. bindsym $mod+Shift+Escape exec --no-startup-id prompt "Are you sure you want to leave i3?" "i3-msg exit"
  92.  
  93. # bindsym $mod+BackSpace
  94. bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Are you sure you want to reboot?" "$reboot"
  95.  
  96. ##bindsym $mod+grave
  97. ##bindsym $mod+asciitilde
  98.  
  99. #STOP/HIDE EVERYTHING:
  100. bindsym $mod+Shift+Delete exec --no-startup-id lmc truemute ; exec $truepause ; workspace lmao ; exec $term -e htop ; exec $term -e ranger
  101.  
  102. # #---Letter Key Bindings---# #
  103. bindsym $mod+q [con_id="__focused__" instance="^(?!math|dropdown).*$"] kill
  104. bindsym $mod+Shift+q [con_id="__focused__" instance="^(?!math|dropdown).*$"] kill
  105.  
  106. bindsym $mod+w exec --no-startup-id $BROWSER
  107. bindsym $mod+Shift+w exec --no-startup-id $BROWSER
  108.  
  109. bindsym $mod+e exec $term -e neomutt
  110. bindsym $mod+Shift+e exec --no-startup-id tutorialvids
  111.  
  112. bindsym $mod+r exec $term -e ranger
  113. bindsym $mod+Shift+r exec $term -e sudo ranger /
  114.  
  115. bindsym $mod+t split toggle
  116. bindsym $mod+Shift+t gaps inner current set 15; gaps outer current set 15
  117.  
  118. bindsym $mod+y exec $term -e calcurse
  119. bindsym $mod+Shift+y exec --no-startup-id "bash ~/.scripts/i3resize left"
  120.  
  121. bindsym $mod+u [instance="dropdown"] scratchpad show; [instance="dropdown"] move position center
  122. bindsym $mod+Shift+u exec --no-startup-id "bash ~/.scripts/i3resize down"
  123.  
  124. bindsym $mod+i exec $term -e htop
  125. bindsym $mod+Shift+i exec --no-startup-id "bash ~/.scripts/i3resize up"
  126.  
  127. bindsym $mod+o sticky toggle
  128. bindsym $mod+Shift+o exec --no-startup-id "bash ~/.scripts/i3resize right"
  129.  
  130. bindsym $mod+p exec --no-startup-id lmc toggle
  131. #bindsym $mod+Shift+p
  132.  
  133. bindsym $mod+a [instance="math"] scratchpad show; [instance="math"] move position center
  134. bindsym $mod+Shift+a exec $term -e pulsemixer
  135.  
  136. bindsym $mod+s gaps inner current plus 5
  137. bindsym $mod+Shift+s gaps inner current minus 5
  138.  
  139. bindsym $mod+d exec --no-startup-id dmenu_run
  140. bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0
  141.  
  142. set $freeze Distraction-free mode (mod+shift+esc to exit)
  143. mode "$freeze" { bindsym $mod+Shift+Escape mode "default"
  144. }
  145.  
  146. bindsym $mod+f fullscreen toggle
  147. bindsym $mod+Shift+f mode "$freeze"
  148.  
  149. bindsym $mod+g workspace prev
  150. bindsym $mod+Shift+g exec --no-startup-id gimp; workspace $ws5
  151.  
  152. bindsym $mod+h focus left
  153. bindsym $mod+Shift+h move left 30
  154.  
  155. bindsym $mod+j focus down
  156. bindsym $mod+Shift+j move down 30
  157.  
  158. bindsym $mod+k focus up
  159. bindsym $mod+Shift+k move up 30
  160.  
  161. bindsym $mod+l focus right
  162. bindsym $mod+Shift+l move right 30
  163.  
  164. bindsym $mod+z gaps outer current plus 5
  165. bindsym $mod+Shift+z gaps outer current minus 5
  166.  
  167. bindsym $mod+x exec --no-startup-id ~/.config/i3/lock.sh
  168. bindsym $mod+Shift+x exec --no-startup-id prompt "Are you sure you want to shutdown?" "$shutdown"
  169.  
  170. bindsym $mod+c exec --no-startup-id camtoggle
  171. ##bindsym $mod+Shift+c
  172.  
  173. bindsym $mod+v exec $term -e ncmpcpp -s visualizer
  174. bindsym $mod+Shift+v exec --no-startup-id projectM-pulseaudio
  175.  
  176. bindsym $mod+b bar mode toggle
  177. bindsym $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id bottomleft
  178.  
  179. bindsym $mod+n exec $term -e newsboat
  180. ##bindsym $mod+Shift+n
  181.  
  182. bindsym $mod+m exec --no-startup-id st -e ncmpcpp
  183. bindsym $mod+Shift+m exec --no-startup-id lmc mute
  184.  
  185. # #---Workspace Bindings---# #
  186. bindsym $mod+Home workspace $ws1
  187. bindsym $mod+Shift+Home move container to workspace $ws1
  188. bindsym $mod+End workspace $ws10
  189. bindsym $mod+Shift+End move container to workspace $ws10
  190. bindsym $mod+Prior workspace prev
  191. bindsym $mod+Shift+Prior move container to workspace prev
  192. bindsym $mod+Next workspace next
  193. bindsym $mod+Shift+Next move container to workspace next
  194. bindsym $mod+Tab workspace back_and_forth
  195. bindsym $mod+XF86Back workspace prev
  196. ##bindsym $mod+Shift+XF86Back
  197. bindsym $mod+XF86Forward workspace next
  198. ##bindsym $mod+Shift+XF86Forward
  199. bindsym $mod+semicolon workspace next
  200. bindsym $mod+apostrophe split horizontal ;; exec $term
  201. bindsym $mod+slash split vertical ;; exec $term
  202. bindsym $mod+Shift+slash kill
  203. bindsym $mod+backslash workspace back_and_forth
  204.  
  205. set $ws1 "1"
  206. set $ws2 "2"
  207. set $ws3 "3"
  208. set $ws4 "4"
  209. set $ws5 "5"
  210. set $ws6 "6"
  211. set $ws7 "7"
  212. set $ws8 "8"
  213. set $ws9 "9"
  214. set $ws10 "10"
  215.  
  216. # switch to workspace
  217. bindsym $mod+1 workspace $ws1
  218. bindsym $mod+2 workspace $ws2
  219. bindsym $mod+3 workspace $ws3
  220. bindsym $mod+4 workspace $ws4
  221. bindsym $mod+5 workspace $ws5
  222. bindsym $mod+6 workspace $ws6
  223. bindsym $mod+7 workspace $ws7
  224. bindsym $mod+8 workspace $ws8
  225. bindsym $mod+9 workspace $ws9
  226. bindsym $mod+0 workspace $ws10
  227.  
  228. # move focused container to workspace
  229. bindsym $mod+Shift+1 move container to workspace $ws1
  230. bindsym $mod+Shift+2 move container to workspace $ws2
  231. bindsym $mod+Shift+3 move container to workspace $ws3
  232. bindsym $mod+Shift+4 move container to workspace $ws4
  233. bindsym $mod+Shift+5 move container to workspace $ws5
  234. bindsym $mod+Shift+6 move container to workspace $ws6
  235. bindsym $mod+Shift+7 move container to workspace $ws7
  236. bindsym $mod+Shift+8 move container to workspace $ws8
  237. bindsym $mod+Shift+9 move container to workspace $ws9
  238. bindsym $mod+Shift+0 move container to workspace $ws10
  239.  
  240. for_window [class="Pinentry"] sticky enable
  241. for_window [class="sent"] border pixel 0px
  242. for_window [class="Blender"] move to workspace $ws6
  243. for_window [class="marble"] move to workspace $ws7
  244. for_window [title="GIMP Startup"] move workspace $ws5
  245. for_window [class="Gimp"] move workspace $ws5
  246. for_window [window_role="GtkFileChooserDialog"] resize shrink height 10 px
  247. for_window [title="Default - Wine desktop"] floating enable
  248. for_window [instance="dropdown"] floating enable
  249. for_window [instance="dropdown"] resize set 625 400
  250. for_window [instance="dropdown"] move scratchpad
  251. for_window [instance="dropdown"] border pixel 5
  252. # Runs the tmuxinit script, which searches for an earlier tmux instance,
  253. # otherwise starts a new one (to prevent multiple dropdown sessions).
  254. exec --no-startup-id $term -n dropdown -e tmuxinit
  255. for_window [instance="math"] floating enable
  256. for_window [instance="math"] resize set 800 300
  257. for_window [instance="math"] move scratchpad
  258. for_window [instance="math"] border pixel 5
  259. exec --no-startup-id $term -n math -f mono:pixelsize=24 -e dropdowncalc
  260. for_window [title="mpvfloat"] floating enable
  261. for_window [title="mpvfloat"] sticky enable
  262. for_window [title="mpvfloat"] border pixel 0
  263. no_focus [title="mpvfloat"]
  264.  
  265. # #---Function Buttons---# #
  266. bindsym $mod+F1 exec --no-startup-id zathura ~/.config/i3/i3_guide.pdf
  267. bindsym $mod+F2 restart
  268. bindsym $mod+F3 exec --no-startup-id displayselect
  269. bindsym $mod+F4 exec --no-startup-id $hibernate
  270. bindsym $mod+F5 exec --no-startup-id $netrefresh
  271. bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli
  272. ##bindsym $mod+F7
  273. bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh
  274. bindsym $mod+F9 exec --no-startup-id dmenumount
  275. bindsym $mod+F10 exec --no-startup-id dmenuumount
  276. ##bindsym $mod+F11
  277. ##bindsym $mod+F12
  278.  
  279. # #---Arrow Keys---# #
  280. bindsym $mod+Left focus left
  281. bindsym $mod+Down focus down
  282. bindsym $mod+Up focus up
  283. bindsym $mod+Right focus right
  284. bindsym $mod+Shift+Left move left
  285. bindsym $mod+Shift+Down move down
  286. bindsym $mod+Shift+Up move up
  287. bindsym $mod+Shift+Right move right
  288.  
  289. # #---Media Keys---# #
  290.  
  291. # Volume keys
  292. bindsym $mod+plus exec --no-startup-id lmc up 5
  293. bindsym $mod+Shift+plus exec --no-startup-id lmc up 15
  294. bindsym $mod+minus exec --no-startup-id lmc down 5
  295. bindsym $mod+Shift+minus exec --no-startup-id lmc down 15
  296. bindsym $mod+less exec --no-startup-id lmc prev
  297. bindsym $mod+Shift+less exec --no-startup-id lmc replay
  298. bindsym $mod+greater exec --no-startup-id lmc next
  299. bindsym $mod+Shift+greater exec --no-startup-id lmc next
  300.  
  301. # For advancing forward/backward in an mpd song
  302. bindsym $mod+bracketleft exec --no-startup-id lmc back 10
  303. bindsym $mod+Shift+bracketleft exec --no-startup-id lmc back 120
  304. bindsym $mod+bracketright exec --no-startup-id lmc forward 10
  305. bindsym $mod+Shift+bracketright exec --no-startup-id lmc forward 120
  306.  
  307. # For screenshots and recording
  308. bindsym Print exec --no-startup-id maim | xclip -selection clipboard -t image/png
  309. bindsym Shift+Print exec --no-startup-id maim -s | xclip -selection clipboard -t image/png
  310. bindsym $mod+Print exec --no-startup-id dmenurecord
  311. bindsym $mod+Scroll_Lock exec --no-startup-id "killall screenkey || screenkey"
  312. bindsym $mod+Delete exec $stoprec
  313. bindsym XF86Launch1 exec $stoprec & xset dpms force off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement