SHARE
TWEET

Jakub's i3 config draft

a guest Aug 14th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This configuration file is based on Luke Smith's i3wm setup:
  2. # originally by http://lukesmith.xyz, modified a lot
  3.  
  4. # Be sure that you have your $BROWSER environmental variable set to your favorite browser.
  5. # E.g., put `export BROWSER="firefox"` into your bash_profile
  6.  
  7. # #---Colors ---# #
  8. set $base00 #101218
  9. #set $base01 #1f222d
  10. set $base01 #072584
  11. set $base02 #252936
  12. set $base03 #7780a1
  13. set $base04 #C0C5CE
  14. set $base05 #d1d4e0
  15. set $base06 #C9CCDB
  16. set $base07 #ffffff
  17. set $base08 #ee829f
  18. set $base09 #f99170
  19. set $base0A #ffefcc
  20. set $base0B #a5ffe1
  21. set $base0C #97e0ff
  22. set $base0D #97bbf7
  23. set $base0E #c0b7f9
  24. set $base0F #fcc09e
  25.  
  26. # Workspaces names
  27. set $ws1 "1"
  28. set $ws2 "2"
  29. set $ws3 "3"
  30. set $ws4 "4"
  31. set $ws5 "5"
  32. set $ws6 "6"
  33. set $ws7 "7"
  34. set $ws8 "8"
  35. set $ws9 "9"
  36. set $ws10 "10"
  37.  
  38. ###########################
  39. # ---Basic Definitions--- #
  40. ###########################
  41.  
  42. # Needed for i3-gaps, fonts
  43. #for_window [class="^.*"] border pixel 0
  44. for_window [class="^.*"] border normal
  45.  
  46. for_window [class="Gnome-terminal"] border normal
  47. for_window [class="XTerm"] border normal
  48. for_window [class="Opera"] border pixel 0
  49. for_window [class="Google-chrome"] border pixel 0
  50. for_window [class=".*"] title_format "<b>%title</b>"
  51.  
  52. #gaps inner 0
  53. #gaps outer 0
  54. #font pango:monospace 8
  55. font pango:System San Francisco Display 8 # alternative
  56. #font pango:System San Francisco Display 18
  57.  
  58. # Super as the modifier key
  59. set $mod Mod4
  60.  
  61. #set $term --no-startup-id gnome-terminal
  62. set $term --no-startup-id xterm
  63. set $redshift_with_location --no-startup-id redshift -l 55.0:15.0
  64. #set $term --no-startup-id gnome-terminal
  65. # --hide-menubar
  66. set $stoprec --no-startup-id killall ffmpeg
  67.  
  68. #SYSTEMD
  69. set $shutdown sudo shutdown -h now
  70. set $reboot sudo reboot
  71. set $netrefresh --no-startup-id sudo systemctl restart NetworkManager
  72. set $hibernate sudo systemctl suspend
  73.  
  74. ##############################################
  75. # ---Starting External Scripts on Startup--- #
  76. ##############################################
  77.  
  78. # Set CPU cores to performance
  79. exec --no-startup-id bash /home/jakub/Dropbox/sync/homedir/.config/i3/scripts/governors/performance.sh
  80.  
  81. # Initial config
  82. exec --no-startup-id ~/.config/i3/scripts/displays/defaultconfig.sh
  83. # Scalling and workspace outputs
  84. exec --no-startup-id xrandr --dpi 220;
  85.  
  86.  
  87. #Wallpaper
  88. exec_always feh --bg-scale /home/jakub/.wallpapers/wallpaper-3.jpg
  89. #exec_always feh --bg-scale /home/jakub/./config/.wallpaper.jpg
  90.  
  91.  
  92. # Redshift temperature
  93. exec --no-startup-id $redshift_with_location -x; exec --no-startup-id $redshift_with_location -O 3900;
  94.  
  95. #Turn off touchpad
  96. exec --no-startup-id exec synclient TouchpadOff=1
  97.  
  98. #Compton
  99. #exec_always compton -f
  100. #exec_always compton --config /home/jakub/.config/compton.conf
  101.  
  102. # Target config
  103. exec --no-startup-id ~/.config/i3/scripts/displays/MedFusionLab/medfusion.sh
  104.  
  105. #Redshift: make screen more red
  106. exec --no-startup-id redshift -l 55.0:15.0 -O 4500
  107.  
  108. # Autokey for keybindings remapping
  109. exec --no-startup-id autokey-gtk
  110.  
  111. # Configure keyboard
  112. exec --no-startup-id bash /home/jakub/.config/i3/scripts/keyboard.sh
  113.  
  114. # Update keyboard profile
  115. exec --no-startup-id bash ~/.profile
  116.  
  117. # Udiskie for automount
  118.  exec --no-startup-id udiskie -ans &
  119.  
  120. # Scripts for pdf conversions to Kindle-friendly formats
  121. exec --no-startup-id bash home/jakub/Dropbox/@Kindle/scripts/1columnProcessing.sh
  122. exec --no-startup-id bash home/jakub/Dropbox/@Kindle/scripts/2columnProcessing.sh
  123.  
  124. # Dropbox
  125. exec --no-startup-id dropbox start
  126. # Google Drive
  127. exec --no-startup-id insync start
  128.  
  129.  
  130. # Consider this hint: for_window [class="Evince"] move container to workspace "5: doc", workspace "5: doc", focus
  131.  
  132.  
  133. ############################
  134. # ---Arrange workspaces--- #
  135. ############################
  136.  
  137. # IDE
  138. for_window [class="jetbrains-clion"] move container to workspace $ws1
  139. for_window [class="jetbrains-pycharm-ce"] move container to workspace $ws1
  140. for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 # it does work
  141.  
  142. # recently added and not working as expected
  143. for_window [instance="sun-awt-X11-XWindowPeer"] move container to workspace $ws1
  144. assign [instance="sun-awt-X11-XWindowPeer"] $ws1
  145.  
  146. # recently added and not working as expected
  147. for_window [class="^jetbrains-.+"] move container to workspace $ws1
  148. for_window [title="^win.+"] move container to workspace $ws1
  149.  
  150. assign [class="^jetbrains-.+"] $ws1
  151. assign [class="jetbrains-pycharm-ce"][window_type=dialog] workspace $ws1
  152. #assign [class="com-mathworks-util-PostVMInit" title="^Fig"] $ws2
  153. assign [class="MATLAB R2019a - academic use"] $ws2 #it does work
  154.  
  155. #for_window [instance="sun-awt-X11-XWindowPeer"] focus border pixel 0,
  156.  
  157. # Browser
  158. for_window [class="Google-chrome"] move container to workspace $ws2
  159. for_window [class="Opera"] move container to workspace $ws3
  160.  
  161. #for_window [class="Gnome-terminal"] move container to workspace $ws4
  162. #assign [class="Gnome-terminal"] $ws4
  163.  
  164. # TODO: solve xterm issues
  165. #for_window [class="XTerm"] move container to workspace $ws4
  166. #assign [class="XTerm"] $ws4
  167. #for_window [instance="xterm"] move container to workspace $ws4
  168. #assign [instance="xterm"] $ws4
  169.  
  170. # Language learning
  171. assign [class="Anki"] workspace $ws9
  172. for_window [class="Anki"] move container to workspace $ws9
  173. for_window [class="Anki"][title="Add"] move container to workspace $ws8
  174. for_window [class="Anki"][title="Browse.+"] move container to workspace $ws8
  175. #for_window [class="Anki"][title="^Browse.+"] move workspace current, focus, fullscreen
  176.  
  177. # Leisure time
  178. for_window [class="Spotify"] move container to workspace $ws10
  179.  
  180. # Manage popups
  181. #for_window [window_type=dialog] move workspace current, focus
  182.  
  183.  
  184. # --- Execute Programs --- #
  185. #
  186. # TODO: execute the correct version of CLion all the time
  187. #exec bash ~/Downloads/other/clion/clion-2017.2.3/bin/clion.sh
  188. #exec bash ~/Downloads/other/clion/clion-2017.2.3/bin/clion.sh
  189. #exec pycharm-community
  190. #exec google-chrome
  191. #exec opera
  192. #exec spotify
  193.  
  194. #exec --no-startup-id i3-msg 'workspace 1:IDE; exec bash ~/Downloads/other/clion/clion-2017.2.3/bin/clion.sh'
  195. #exec --no-startup-id i3-msg 'workspace 2:Terminal; exec $term -e ranger'
  196. #exec --no-startup-id i3-msg 'workspace 3:Browser; exec opera'
  197. #exec --no-startup-id i3-msg 'workspace 4:Free; exec google-chrome'
  198.  
  199.  
  200. #Composite manager:
  201. #exec --no-startup-id compton --xrender-sync-fence
  202. #Try to load VGA screen if available:
  203. #exec --no-startup-id screen.sh v
  204.  
  205.  
  206. # Widow Colours
  207. #                         border  background text    indicator
  208.   client.focused          $base01 $base01    $base07 $base0F
  209.   client.focused_inactive $base02 $base02    $base03 $base0F
  210.   client.unfocused        $base02 $base02    $base03 $base0F
  211.   client.urgent           $base02 $base08    $base00 $base0F
  212.  
  213. bar {
  214.         #status_command i3status
  215.         status_command i3blocks -c ~/.config/i3/i3blocks.conf
  216.         #font pango: System San Francisco Display, FontAwesome 24
  217.         font pango: System San Francisco Display, FontAwesome 10 # alternative
  218.         position top
  219.         strip_workspace_numbers yes
  220.         #bindsym button4 nop
  221.         #bindsym button5 nop
  222.         colors {
  223.               separator $base03
  224.               background $base02
  225.               statusline $base05
  226. #                                border  background text
  227.               focused_workspace  $base01 $base01    $base07
  228.               active_workspace   $base01 $base02    $base03
  229.               inactive_workspace $base02 $base02    $base03
  230.               urgent_workspace   $base01 $base01    $base08
  231.     }
  232. }
  233.  
  234.  
  235. #Runs the key remapping scripts
  236. exec --no-startup-id ~/.scripts/remaps
  237. #Unclutter makes the mouse invisible after a brief period TODO: make invisibe at the moment the workspace is changed
  238. exec --no-startup-id unclutter
  239. #Network Manager applet
  240. exec --no-startup-id nm-applet
  241.  
  242.  
  243. #ActivityWatch: tracking time spent in apps
  244. exec --no-startup-id "/home/jakub/.config/i3/scripts/activity-watch-startup.sh"
  245. #OPENRC
  246. #set $shutdown sudo openrc-shutdown -p
  247. #set $reboot sudo openrc-shutdown -r
  248. #set $netrefresh --no-startup-id sudo rc-service NetworkManager restart
  249.  
  250. #RUNIT
  251. #set $shutdown sudo shutdown -h now
  252. #set $reboot sudo reboot
  253. #set $netrefresh --no-startup-id sudo sv restart NetworkManager
  254.  
  255.  
  256. # #---Basic Bindings---# #
  257. bindsym $mod+Return     exec $term
  258. #TODO: make it work
  259. bindsym $mod+Shift+Return   exec $term -e vim ~/vimwiki/index.wiki
  260.  
  261. #bindsym $mod+Shift+space   floating toggle
  262. #bindsym $mod+space     focus mode_toggle
  263.  
  264. bindsym $mod+Escape     workspace prev
  265. bindsym $mod+Shift+Escape   exec prompt "Are you sure you want to leave i3?" "i3-msg exit"
  266.  
  267. # bindsym $mod+BackSpace
  268. bindsym $mod+Shift+BackSpace    exec prompt "Are you sure you want to reboot?" "$reboot"
  269.  
  270. #JetBrains
  271. ## bindsym $mod+grave
  272. ##bindsym $mod+asciitilde
  273.  
  274. #STOP/HIDE EVERYTHING:
  275. bindsym $mod+Shift+Delete   exec $truemute ; exec $truepause ; workspace lmao ; exec $term -e htop ; exec $term -e ranger
  276.  
  277. # #---Letter Key Bindings---# #
  278. bindsym $mod+q          kill
  279. bindsym $mod+Shift+q        kill
  280.  
  281. bindsym $mod+w          exec $term -e sudo wifi-menu
  282. bindsym $mod+Shift+w        exec --no-startup-id $BROWSER
  283.  
  284. # TODO: install neomutt
  285. bindsym $mod+e          exec $term -e neomutt
  286.  
  287. #JetBrains shortcut
  288. ##bindsym $mod+Shift+e
  289.  
  290. bindsym $mod+r          exec $term -e ranger
  291. #bindsym $mod+r             exec $term ranger
  292. bindsym $mod+Shift+r        exec $term -e sudo ranger
  293.  
  294. bindsym $mod+t          split toggle
  295. #bindsym $mod+Shift+t       gaps inner current set 15; gaps outer current set 15
  296.  
  297. bindsym $mod+y          exec $term -e calcurse
  298. bindsym $mod+Shift+y        resize shrink width 10 px or 10ppt
  299.  
  300. bindsym $mod+u          [instance="dropdown"] scratchpad show; [instance="dropdown"] move position center
  301. bindsym $mod+Shift+u        resize shrink height 10 px or 10 ppt
  302.  
  303. bindsym $mod+i          exec $term -e htop
  304. bindsym $mod+Shift+i        resize grow height 10 px or 10 ppt
  305.  
  306. bindsym $mod+o          sticky toggle
  307. bindsym $mod+Shift+o        resize grow width 10 px or 10 ppt
  308.  
  309. bindsym $mod+p          exec $pause
  310. bindsym $mod+Shift+p        exec mypaint
  311.  
  312. bindsym $mod+a          [instance="math"] scratchpad show; [instance="math"] move position center
  313. bindsym $mod+Shift+a        exec $term -e ncpamixer
  314.  
  315. # bindsym $mod+s            gaps inner current plus 5
  316. # bindsym $mod+Shift+s      gaps inner current minus 5
  317.  
  318. #bindsym $mod+d         exec --no-startup-id dmenu_run
  319. #bindsym $mod+d exec rofi -show drun -lines 5 -eh 2 -width 100 -padding 1450 -opacity "80" -bw 0 -bc "$base01" -bg "$base02" -fg "$base07" -hlbg "$base05" -columns 2 -font "System San Francisco Display 28" -hlfg "#9575cd"
  320. #bindsym $mod+d exec rofi -show drun -lines 5 -eh 2 -width 100 -opacity "80" -bw 0 -bc "$base01" -bg "$base02" -fg "$base07" -hlbg "$base05" -columns 2 -font "System San Francisco Display 28" -hlfg "#9575cd"
  321.  
  322. #rofi -modi drun -show drun
  323. #bindsym $mod+d exec rofi -show drun -lines 5 -eh 2 -width 100 -padding 0 -opacity "80" -bw 0 -bc "$base01" -bg "$base02" -fg "$base07" -hlbg "$base05" -columns 2 -font "System San Francisco Display 28" -hlfg "#9575cd"
  324. #bindsymbindsym  $mod+d exec rofi -show run -lines 5 -eh 2 -fullscreen -width 100
  325. #
  326. bindsym $mod+d exec rofi -modi drun -show drun -opacity "85" -bg "#dddddd" -fg "#222222" -fullscreen -bw 0 -padding 300 -font "System San Francisco Display 36"
  327. #
  328. #bindsym mod+d exec rofi -show drun -width 100 -padding $(($(xwininfo -root |awk '/Height/ { print $2}')/2))
  329.  
  330. #bindsym $mod+d exec rofi -show drun -lines 5 -eh 2 -width 100 -padding 100 -opacity "80" -bw 0 -bc "$base01" -bg "$base02" -fg "$base07" -hlbg "$base05" -columns 2 -font "System San Francisco Display 28" -hlfg "#9575cd"
  331. #bindsym $mod+Shift+d       gaps inner current set 0; gaps outer current set 0
  332.  
  333. bindsym $mod+f          fullscreen toggle
  334. ##bindsym $mod+Shift+f
  335.  
  336. bindsym $mod+g          workspace prev
  337. # bindsym $mod+Shift+g      exec --no-startup-id gimp; workspace $ws5
  338.  
  339. bindsym $mod+h          focus left
  340. bindsym $mod+Shift+h        move left 30
  341.  
  342. bindsym $mod+j          focus down
  343. bindsym $mod+Shift+j        move down 30
  344.  
  345. bindsym $mod+k          focus up
  346. bindsym $mod+Shift+k        move up 30
  347.  
  348. bindsym $mod+l          focus right
  349. bindsym $mod+Shift+l        move right 30
  350.  
  351. # bindsym $mod+z            gaps outer current plus 5
  352. # bindsym $mod+Shift+z      gaps outer current minus 5
  353.  
  354. bindsym $mod+x          exec --no-startup-id ~/.config/i3/lock.sh
  355. bindsym $mod+Shift+x        exec prompt "Are you sure you want to shutdown?" "$shutdown"
  356.  
  357. bindsym $mod+c          exec --no-startup-id camtoggle
  358. ##bindsym $mod+Shift+c
  359.  
  360. bindsym $mod+v          exec $term -e ncmpcpp -s visualizer
  361. bindsym $mod+Shift+v        exec projectM-pulseaudio
  362.  
  363. bindsym $mod+b          floating toggle; sticky toggle; exec --no-startup-id bottomleft
  364. #bindsym $mod+Shift+b       exec --no-startup-id blender; workspace $ws6
  365.  
  366. bindsym $mod+n          exec $term -e newsboat
  367. ##bindsym $mod+Shift+n
  368.  
  369. bindsym $mod+m          exec $music
  370. bindsym $mod+Shift+m        exec $mute
  371.  
  372.  
  373. # #---Workspace Bindings---# #
  374. bindsym $mod+Home       workspace $ws1
  375. bindsym $mod+Shift+Home     move container to workspace $ws1
  376. bindsym $mod+End        workspace $ws10
  377. bindsym $mod+Shift+End      move container to workspace $ws10
  378. bindsym $mod+Prior      workspace prev
  379. bindsym $mod+Shift+Prior    move container to workspace prev
  380. bindsym $mod+Next       workspace next
  381. bindsym $mod+Shift+Next     move container to workspace next
  382. bindsym $mod+Tab        workspace back_and_forth
  383. bindsym $mod+XF86Back       workspace prev
  384. ##bindsym $mod+Shift+XF86Back
  385. bindsym $mod+XF86Forward    workspace next
  386. ##bindsym $mod+Shift+XF86Forward
  387. bindsym $mod+semicolon      workspace next
  388. bindsym $mod+apostrophe     split horizontal ;; exec $term
  389. bindsym $mod+slash      split vertical ;; exec $term
  390. bindsym $mod+Shift+slash    kill
  391. bindsym $mod+backslash      workspace back_and_forth
  392.  
  393. # switch to workspace
  394. bindsym $mod+1      workspace $ws1
  395. bindsym $mod+2      workspace $ws2
  396. bindsym $mod+3      workspace $ws3
  397. bindsym $mod+4      workspace $ws4
  398. bindsym $mod+5      workspace $ws5
  399. bindsym $mod+6      workspace $ws6
  400. bindsym $mod+7      workspace $ws7
  401. bindsym $mod+8      workspace $ws8
  402. bindsym $mod+9      workspace $ws9
  403. bindsym $mod+0      workspace $ws10
  404.  
  405. # move focused container to workspace
  406. bindsym $mod+Shift+1    move container to workspace $ws1
  407. bindsym $mod+Shift+2    move container to workspace $ws2
  408. bindsym $mod+Shift+3    move container to workspace $ws3
  409. bindsym $mod+Shift+4    move container to workspace $ws4
  410. bindsym $mod+Shift+5    move container to workspace $ws5
  411. bindsym $mod+Shift+6    move container to workspace $ws6
  412. bindsym $mod+Shift+7    move container to workspace $ws7
  413. bindsym $mod+Shift+8    move container to workspace $ws8
  414. bindsym $mod+Shift+9    move container to workspace $ws9
  415. bindsym $mod+Shift+0    move container to workspace $ws10
  416.  
  417. for_window [class="Pinentry"] sticky enable
  418. for_window [class="sent"] border pixel 0px
  419. for_window [class="Blender"] move to workspace $ws6
  420. #workspace $ws6 gaps inner 0
  421. #workspace $ws6 gaps outer 0
  422. for_window [class="marble"] move to workspace $ws7
  423. for_window [title="GIMP Startup"] move workspace $ws5
  424. for_window [class="Gimp"] move workspace $ws5
  425. #workspace $ws5 gaps inner 0
  426. #workspace $ws5 gaps outer 0
  427. for_window [window_role="gimp-dock"] floating disable; move left; resize shrink width 50 px or 50ppt
  428. for_window [window_role="gimp-toolbox"] floating disable; move right; resize grow width 30 px or 30ppt
  429. for_window [window_role="GtkFileChooserDialog"] resize shrink height 10 px
  430. for_window [instance="dl"] move workspace $ws10
  431.  
  432. # First I have a tmux window used for background scripts.
  433. # I'll later bind this to mod+u.
  434. for_window [instance="dropdown"] floating enable
  435. for_window [instance="dropdown"] resize set 625 400
  436. for_window [instance="dropdown"] move scratchpad
  437. for_window [instance="dropdown"] border pixel 5
  438. # Runs the tmuxinit script, which searches for an earlier tmux instance,
  439. # otherwise starts a new one (to prevent multiple dropdown sessions).
  440. exec --no-startup-id $term -n dropdown -e tmuxinit
  441. # Runs neofetch on first tmux screen if installed.
  442. exec_always --no-startup-id "tmux send-keys -t 0:0 'clear && neofetch 2>/dev/null' Enter"
  443.  
  444. # PDF conversion Script running on startup TODO: consider better way
  445. #exec --no-startup-id bash /home/jakub/Dropbox/sync/homedir/.config/i3/scripts/@automation_startup.sh
  446.  
  447. #exec --no-startup-id tmux "send-keys -t automation.0 ls ENTER"
  448. #exec_always "tmux new -s automation -d"
  449. #exec_always "tmux send -t automation ls ENTER"
  450.  
  451. # Then I have a window running R I use for basic arithmetic
  452. # I'll later bind this to mod+a.
  453. for_window [instance="math"] floating enable
  454. for_window [instance="math"] resize set 800 300
  455. for_window [instance="math"] move scratchpad
  456. for_window [instance="math"] border pixel 5
  457. exec --no-startup-id $term -n math -f mono:pixelsize=24 -e dropdowncalc
  458.  
  459. # Bindings to make the webcam float and stick.
  460. for_window [title="mpvfloat"] floating enable
  461. for_window [title="mpvfloat"] sticky enable
  462. for_window [title="mpvfloat"] border pixel 0
  463. no_focus [title="mpvfloat"]
  464.  
  465. # #---Function Buttons---# #
  466. bindsym $mod+F1     exec --no-startup-id mupdf ~/.config/i3/i3_guide.pdf
  467. bindsym $mod+F2     restart
  468. bindsym $mod+F3     exec --no-startup-id displayselect
  469. bindsym $mod+F4     exec --no-startup-id $hibernate
  470. bindsym $mod+F5     exec --no-startup-id $netrefresh
  471. bindsym $mod+F6     exec --no-startup-id $term -e transmission-remote-cli
  472. ##bindsym $mod+F7
  473. ##bindsym $mod+F8
  474. bindsym $mod+F9     exec --no-startup-id dmenumount
  475. bindsym $mod+F10    exec --no-startup-id dmenuumount
  476. ##bindsym $mod+F11
  477. ##bindsym $mod+F12
  478.  
  479.  
  480. # #---Arrow Keys---# #
  481. bindsym $mod+Left       focus left
  482. bindsym $mod+Down       focus down
  483. bindsym $mod+Up         focus up
  484. bindsym $mod+Right      focus right
  485. bindsym $mod+Shift+Left     move left
  486. bindsym $mod+Shift+Down     move down
  487. bindsym $mod+Shift+Up       move up
  488. bindsym $mod+Shift+Right    move right
  489.  
  490.  
  491. # #---Media Keys---# #
  492.  
  493. # Volume keys
  494. #bindsym $mod+plus exec --no-startup-id pactl -- set-sink-volume 0 +5%
  495. #bindsym $mod+Shift+plus        exec $biginc
  496. #bindsym $mod+minus exec --no-startup-id pactl -- set-sink-volume 0 -5%
  497. #bindsym $mod+Shift+minus   exec $bigdec
  498. #bindsym $mod+less      exec $prev
  499. #bindsym $mod+Shift+less        exec $beg
  500. #bindsym $mod+greater       exec $next
  501. #bindsym $mod+Shift+greater exec $next
  502.  
  503.  
  504. # Volume keys (PC)
  505. bindsym $mod+plus exec "amixer -q sset Master,0 1+ unmute"
  506. bindsym $mod+Shift+plus     exec $biginc
  507. bindsym $mod+minus exec "amixer -q sset Master,0 1- unmute"
  508. bindsym $mod+Shift+minus    exec $bigdec
  509. bindsym $mod+less       exec $prev
  510. bindsym $mod+Shift+less     exec $beg
  511. bindsym $mod+greater        exec $next
  512. bindsym $mod+Shift+greater  exec $next
  513.  
  514. # For advancing forward/backward in an mpd song
  515. bindsym $mod+bracketleft    exec $lilbak
  516. bindsym $mod+Shift+bracketleft  exec $bigbak
  517. bindsym $mod+bracketright   exec $lilfor
  518. bindsym $mod+Shift+bracketright exec $bigfor
  519.  
  520. # For screenshots and recording
  521. #bindsym Print          exec --no-startup-id scrot
  522. bindsym Shift+Print         exec --no-startup-id scrot -u
  523.  
  524. #bindsym $mod+Print     exec --no-startup-id dmenurecord
  525. #bindsym $mod+Scroll_Lock   exec --no-startup-id "killall screenkey || screenkey"
  526. #bindsym $mod+Delete        exec $stoprec
  527. #bindsym XF86Launch1        exec $stoprec & xset dpms force off
  528.  
  529. # #---Extra XF86 Keys---# #
  530. # These are the extra media keys that some keyboards have.
  531. #bindsym XF86AudioMute      exec $mute
  532. #bindsym XF86AudioLowerVolume   exec $dec
  533. #bindsym XF86AudioRaiseVolume   exec $inc
  534. bindsym XF86PowerOff        exec prompt "Are you sure you want to shutdown?" "$shutdown"
  535. ##bindsym XF86Copy      exec
  536. ##bindsym XF86Open      exec
  537. ##bindsym XF86Paste     exec
  538. ##bindsym XF86Cut       exec
  539. ##bindsym XF86MenuKB        exec
  540. bindsym XF86Calculator      exec $term -e R -q
  541. bindsym XF86Sleep       exec sudo zzz
  542. ##bindsym XF86WakeUp        exec
  543. bindsym XF86Explorer        exec $term -e ranger
  544. ##bindsym XF86Send      exec
  545. ##bindsym XF86Xfer      exec
  546. bindsym XF86WWW         exec --no-startup-id $BROWSER
  547. ##bindsym XF86DOS       exec
  548. bindsym XF86ScreenSaver     exec --no-startup-id ~/.config/i3/lock.sh
  549. ##bindsym XF86RotateWindows exec
  550. ##bindsym XF86TaskPane      exec
  551. ##bindsym XF86Favorites     exec
  552. bindsym XF86MyComputer      exec $term -e ranger
  553. ##bindsym XF86Back      exec
  554. ##bindsym XF86Forward       exec
  555. bindsym XF86Eject       exec sudo umount -R /mnt
  556. bindsym XF86AudioNext       exec $next
  557. bindsym XF86AudioPlay       exec $pause
  558. bindsym XF86AudioPrev       exec $prev
  559. bindsym XF86AudioStop       exec $pause
  560. ##bindsym XF86AudioRecord
  561. bindsym XF86AudioRewind     exec $lilbak
  562. bindsym XF86AudioForward    exec $lilfor
  563. ##bindsym XF86Phone     exec
  564. ##bindsym XF86Tools     exec
  565. bindsym XF86HomePage        exec $BROWSER https://lukesmith.xyz
  566. bindsym XF86Reload      restart
  567. ##bindsym XF86ScrollUp      exec
  568. ##bindsym XF86ScrollDown        exec
  569. ##bindsym XF86New       exec
  570. ##bindsym XF86LaunchA       exec
  571. ##bindsym XF86LaunchB       exec
  572. ##bindsym XF86Launch2       exec
  573. ##bindsym XF86Launch3       exec
  574. ##bindsym XF86Launch4       exec
  575. ##bindsym XF86Launch5       exec
  576. ##bindsym XF86Launch6       exec
  577. ##bindsym XF86Launch7       exec
  578. ##bindsym XF86Launch8       exec
  579. ##bindsym XF86Launch9       exec
  580. bindsym XF86AudioMicMute    exec $micmute
  581. ##bindsym XF86TouchpadToggle    exec
  582. bindsym XF86TouchpadOn      exec --no-startup-id exec synclient TouchpadOff=0
  583. bindsym XF86TouchpadOff     exec --no-startup-id exec synclient TouchpadOff=1
  584. bindsym XF86Suspend     exec --no-startup-id ~/.config/i3/lock.sh
  585. bindsym XF86Close       kill
  586. bindsym XF86WebCam      exec --no-startup-id camtoggle
  587. bindsym XF86Mail        exec $term -e neomutt
  588. bindsym XF86Messenger       exec $term -e weechat
  589. bindsym XF86Search      exec $BROWSER https://duckduckgo.com
  590. ##bindsym XF86Go            exec
  591. ##bindsym XF86Finance       exec
  592. ##bindsym XF86Game      exec
  593. bindsym XF86Shop        exec $BROWSER https://ebay.com
  594. #bindsym XF86MonBrightnessDown  exec --no-startup-id xbacklight -dec 15
  595. #bindsym XF86MonBrightnessUp    exec --no-startup-id xbacklight -inc 15
  596. bindsym XF86AudioMedia      exec $music
  597. bindsym XF86Display     exec --no-startup-id arandr
  598. #bindsym XF86KbdLightOnOff  exec
  599. #bindsym XF86KbdBrightnessDown  exec --no-startup-id python3.6 ~/.i3/kb-lights.py -
  600. #bindsym XF86KbdBrightnessUp    exec --no-startup-id python3.6 ~/.i3/kb-lights.py +
  601. ##bindsym XF86Reply     exec
  602. ##bindsym XF86MailForward   exec
  603. ##bindsym XF86Save      exec
  604. bindsym XF86Documents       exec $term -e ranger ~/Documents
  605. ##bindsym XF86Battery       exec
  606. ##bindsym XF86Bluetooth     exec
  607. bindsym XF86WLAN        exec $netrefresh
  608.  
  609. ## MY MODIFIFACATIONS
  610. #bindsym XF86MonBrightnessDown  exec --no-startup-id light -U 5
  611. #bindsym XF86MonBrightnessUp    exec --no-startup-id light -A 5
  612.  
  613. bindsym XF86MonBrightnessDown   exec --no-startup-id /home/jakub/Dropbox/sync/homedir/.config/i3/scripts/displays/decrease_brightness.sh
  614.  
  615. bindsym XF86MonBrightnessUp exec --no-startup-id /home/jakub/Dropbox/sync/homedir/.config/i3/scripts/displays/increase_brightness.sh
  616.  
  617.  
  618. # Pulse Audio controls
  619. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume 0 +5% #increase sound volume
  620. bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume 0 -5% #decrease sound volume
  621. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
  622.  
  623. # Screenshots TODO remove ~
  624. #bindsym --release Print exec "scrot -m '~/Pictures/screenshots/%s_%H%M_%d.%m.%Y_$wx$h.png'"
  625. #bindsym --release Shift+Print exec "scrot -s '~/Pictures/screenshots/%s_%H%M_%d%m%Y_$wx$h.png'"
  626. #bindsym --release $mod+Shift+Print exec "scrot -u -d 4 '~/Pictures/screenshots/%s_%H%M_%d%m%Y_$wx$h.png'"
  627.  
  628. #TODO: make it user-adaptable
  629. #bindsym --release Print exec "scrot -m '/home/jakub/Pictures/screenshots/%s_%H%M_%d.%m.%Y_$wx$h.png'"
  630. bindsym --release Print exec "import png:- | xclip -selection clipboard -t image/png"
  631. #bindsym --release Shift+Print exec "scrot -s '/home/jakub/Pictures/screenshots/%s_%H%M_%d%m%Y_$wx$h.png'"
  632. #bindsym --release Shift+Print exec "scrot '%Y-%m-%d_$wx$h.png' -e 'mv $f home/jakub/Pictures/screenshots/'"
  633. bindsym --release Shift+Print exec "bash /home/jakub/.config/i3/scripts/take-screenshot.bash"
  634. bindsym --release $mod+Shift+Print exec "scrot -u -d 4 '/home/jakub/Pictures/screenshots/%s_%H%M_%d%m%Y_$wx$h.png'"
  635.  
  636. # HINTS:
  637. # For checking key names use the following command:
  638. # xev -event keyboard
  639.  
  640.  
  641. # MY MODES
  642. # Autokey-gtk for simulating arrows under h j k l:
  643. # https://askubuntu.com/questions/254424/how-can-i-change-what-keys-on-my-keyboard-do-how-can-i-create-custom-keyboard/304834#304834
  644.  
  645. #######
  646. # TODO: execute governor's command with sudo
  647. set $mode_system System (L) lock, (E) logout, (S) suspend, (H) hibernate, (R) reboot, (P) shutdown  |  Power: (k)high (j)low
  648. mode "$mode_system" {
  649.     bindsym l exec --no-startup-id i3lock, mode "default"
  650.     bindsym e exec --no-startup-id i3-msg exit, mode "default"
  651.     bindsym s exec --no-startup-id systemctl suspend, mode "default"
  652.     bindsym h exec --no-startup-id systemctl hibernate, mode "default"
  653.     bindsym r exec --no-startup-id systemctl reboot, mode "default"
  654.     bindsym p exec --no-startup-id systemctl poweroff, mode "default"
  655.  
  656.     # please add the following line to the sudoers file (with command: sudo visudo)
  657.     # jakub ALL=(ALL) NOPASSWD: /usr/bin/cpufreq-set # MAKE SURE TO ADD IT IN THE END!!!
  658.     bindsym k exec bash /home/jakub/Dropbox/sync/homedir/.config/i3/scripts/governors/performance.sh, mode "default"
  659.     bindsym j exec bash /home/jakub/Dropbox/sync/homedir/.config/i3/scripts/governors/powersave.sh, mode "default"
  660.     # back to normal: Enter or Escape
  661.     bindsym Return mode "default"
  662.     bindsym Escape mode "default"
  663. }
  664. bindsym $mod+Delete mode "$mode_system"
  665.  
  666.  
  667. #######
  668. set $mode_launch Launch (c) CLion, (p) PyCharm, (a) Anki
  669. mode "$mode_launch" {
  670.     bindsym c exec bash /home/jakub/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/183.5429.37/bin/clion.sh, mode "default"
  671.     #bindsym p  exec bash ~/Downloads/pycharm-community-2018.1.4/bin/pycharm.sh, mode "default"
  672.     bindsym p exec bash /home/jakub/.config/i3/scripts/launch/pycharm.sh, mode "default"
  673.     bindsym a exec GTK_THEME=elementary anki, mode "default"
  674.  
  675.     # back to normal: Enter or Escape
  676.     bindsym Return mode "default"
  677.     bindsym Escape mode "default"
  678. }
  679. bindsym $mod+Shift+d mode "$mode_launch"
  680.  
  681.  
  682. set $mode_books Books: (r)os
  683. mode "$mode_books" {
  684.     bindsym r exec zathura home/jakub/Dropbox/@Kindle/@jakub_kindle/programming/@ROS/systematic-approach-learning-robot-programming-ros/ROS_Systematic_Approach.pdf, mode "default"
  685.     #bindsym p  exec bash ~/Downloads/pycharm-community-2018.1.4/bin/pycharm.sh, mode "default"
  686.     # back to normal: Enter or Escape
  687.     bindsym Return mode "default"
  688.     bindsym Escape mode "default"
  689. }
  690. bindsym $mod+Shift+b mode "$mode_books"
  691.  
  692. #######
  693. bindsym $mod+space mode "$mode_alternative"
  694. set $mode_alternative Alternative:
  695.  
  696. mode "$mode_alternative" {
  697.     bindsym h workspace $ws1, mode "default"
  698.     bindsym j workspace $ws2, mode "default"
  699.     bindsym k workspace $ws3, mode "default"
  700.     bindsym l workspace $ws4, mode "default"
  701.     bindsym semicolon workspace $ws5, mode "default"
  702.  
  703.     # back to normal: Enter or Escape
  704.     bindsym Return mode "default"
  705.     bindsym Escape mode "default"
  706. }
  707.  
  708. #######
  709. set $displayMode "Set display mode: [l]aptop [h]ome 4[k]new [m]ed  |  Toggle: [c]ompton  |  [0]-[9] Redshift  |  [G]raphics Mode"
  710.  
  711. mode $displayMode {
  712.     bindsym w exec --no-startup-id "\
  713.                ~/.config/i3/scripts/work-displays.sh && \
  714.                ~/.config/i3/scripts/dpi-96.sh;" \
  715.                 mode "default"
  716.  
  717.     bindsym c exec bash ~/.config/i3/scripts/compton-toggle.sh; mode "default"
  718.  
  719.     #bindsym h exec --no-startup-id ~/.config/i3/scripts/displays/home/home.sh; exec source ~/.config/i3/scripts/displays/home/workspaces-to-output.sh; mode "default"
  720.  
  721.     #bindsym k exec --no-startup-id ~/.config/i3/scripts/displays/home4k/new4.sh; exec xrandr --dpi 220; mode "default"
  722.     #bindsym 4 exec --no-startup-id ~/.config/i3/scripts/displays/home4k/home4k.sh; exec xrandr --dpi 220; mode "default"
  723.     bindsym h exec --no-startup-id ~/.config/i3/scripts/displays/home4k/new5.sh; exec source ~/.config/i3/scripts/displays/home4k/workspaces-to-output.sh; exec xrandr --dpi 220; mode "default"
  724.  
  725.     #bindsym k exec --no-startup-id ~/.config/i3/scripts/displays/homeX1_single/homeX1_single.sh; exec xrandr --dpi 220; mode "default"
  726.     bindsym k exec --no-startup-id ~/.config/i3/scripts/displays/one4k/single_monitor4K.sh; exec xrandr --dpi 220; mode "default"
  727.  
  728.     bindsym j exec --no-startup-id ~/.config/i3/scripts/displays/one4k/HDMI_single_monitor4K.sh; exec xrandr --dpi 220; mode "default"
  729.  
  730.     bindsym m exec --no-startup-id ~/.config/i3/scripts/displays/MedFusionLab/medfusion.sh; exec xrandr --dpi 220; mode "default"
  731.  
  732.     bindsym l exec --no-startup-id "\
  733.                ~/.config/i3/scripts/displays/laptop/laptop.sh && \
  734.                ~/.config/i3/scripts/dpi-192.sh"; \
  735.                 mode "default"
  736.  
  737.     bindsym g exec --no-startup-id "\
  738.                ~/.config/i3/scripts/displays/library/fullHD_multiply.sh && \
  739.                ~/.config/i3/scripts/dpi-192.sh"; \
  740.                 mode "default"
  741.  
  742.     # Redshift settings
  743.     bindsym 1 exec $redshift_with_location -x; exec $redshift_with_location -O 2700; mode "default"
  744.     bindsym 2 exec $redshift_with_location -x; exec $redshift_with_location -O 3000; mode "default"
  745.     bindsym 3 exec $redshift_with_location -x; exec $redshift_with_location -O 3300; mode "default"
  746.     bindsym 4 exec $redshift_with_location -x; exec $redshift_with_location -O 3600; mode "default"
  747.     bindsym 5 exec $redshift_with_location -x; exec $redshift_with_location -O 3900; mode "default"
  748.     bindsym 6 exec $redshift_with_location -x; exec $redshift_with_location -O 4200; mode "default"
  749.     bindsym 7 exec $redshift_with_location -x; exec $redshift_with_location -O 4500; mode "default"
  750.     bindsym 8 exec $redshift_with_location -x; exec $redshift_with_location -O 4800; mode "default"
  751.     bindsym 9 exec $redshift_with_location -x; exec $redshift_with_location -O 5100; mode "default"
  752.     bindsym 0 exec $redshift_with_location -x; exec $redshift_with_location -O 5500; mode "default"
  753.  
  754.     # Graphics card settings: applied after reboot
  755.     bindsym Shift+g mode $graphicsMode
  756.  
  757.     bindsym Return mode "default"
  758.     bindsym Escape mode "default"
  759. }
  760. bindsym $mod+s mode $displayMode
  761.  
  762. # Setting graphics at next startup
  763. set $graphicsMode "Set graphics mode and restart: [i]ntel [n]vidia"
  764. mode $graphicsMode {
  765.     bindsym i exec --no-startup-id "\
  766.               system76-power graphics intel &&  \
  767.               reboot"; \
  768.                mode "default"
  769.     bindsym n exec --no-startup-id "\
  770.               system76-power graphics nvidia &&  \
  771.               reboot"; \
  772.                mode "default"
  773.     bindsym Return mode "default"
  774.     bindsym Escape mode "default"
  775. }
  776.  
  777. workspace_auto_back_and_forth yes
  778. hide_edge_borders both
  779.  
  780. #bindcode --release 108 workspace back_and_forth; exec --no-startup-id xdotool key --clearmodifiers space; focus; exec --no-startup-id i3-msg workspace back_and_forth
  781. #bindcode --release 108 workspace back_and_forth; exec "xdotool key space"; workspace back_and_forth
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top