config 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. ##### i3-config / RESLOVED #######################
  2. ##### GENERAL #####################################
  3. set $mod Mod4
  4. font pango:Iosevka 8
  5. # APP VARIABLES
  6. set $qute qutebrowser --target window
  7. set $firefox firefox --new-window
  8. set $surf surf
  9. set $term kitty
  10. # Power Profiles menu switcher (rofi)
  11. bindsym $mod+Shift+p exec ~/.config/i3/scripts/power-profiles
  12. # Define names for default workspaces for which we configure key bindings later on.
  13. # We use variables to avoid repeating the names in multiple places.
  14. set $ws1 "1:"
  15. set $ws2 "2:"
  16. set $ws3 "3:"
  17. set $ws4 "4:"
  18. set $ws5 "5:"
  19. set $ws6 "6"
  20. set $ws7 "7"
  21. set $ws8 "8"
  22. set $ws9 "9"
  23. set $ws10 "10"
  24. #get auth work with polkit-gnome
  25. exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
  26. # set powersavings for display:
  27. exec --no-startup-id xset s 480 dpms 600 600 600
  28. # DIR VARIABLES
  29. set $bin ~/bin
  30. # RESIZE VARIABLES
  31. set $center move absolute position center
  32. # FLOATING
  33. floating_modifier $mod
  34. set $thick 2
  35. # DEFAULT BORDER
  36. for_window [class="^.*"] border pixel $thick
  37. for_window [class=".*"] title_window_icon on
  38. hide_edge_borders vertical
  39. # APPLICATION BORDERS
  40. #for_window [class="Emacs"] border pixel $thick
  41. for_window [class="st"] border pixel $thick
  42. #for_window [class="Surf"] floating enable
  43. #for_window [class="Surf"] floating_maximum_size 800 x 550
  44. # GAP VARIABLES
  45. set $inner 6
  46. set $outer 3
  47. # SET GAPS
  48. gaps inner $inner
  49. gaps outer $outer
  50. # set floating (nontiling) for apps needing it
  51. for_window [class="Yad" instance="yad"] floating enable
  52. for_window [class="Galculator" instance="galculator"] floating enable
  53. for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
  54. # set floating (nontiling) for special apps
  55. for_window [class="Xsane" instance="xsane"] floating enable
  56. for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
  57. for_window [class="qt5ct" instance="qt5ct"] floating enable
  58. for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
  59. for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
  60. for_window [class="Pamac-manager"] floating enable
  61. for_window [window_role="About"] floating enable
  62. for_window [class="Foliate"] floating enable
  63. for_window [class="Foliate"] floating_maximum_size 400 x 800
  64. # set border of floating window
  65. for_window [class="urxvt"] border pixel 1
  66. # Define colors variables:
  67. set $darkbluetrans #08052be6
  68. set $darkblue #08052b
  69. set $lightblue #5294e2
  70. set $urgentred #e53935
  71. set $white #ffffff
  72. set $black #000000
  73. set $purple #e345ff
  74. set $darkgrey #383c4a
  75. set $grey #b0b5bd
  76. set $mediumgrey #8b8b8b
  77. set $yellowbrown #e1b700
  78. #class border bground text indicator child_border
  79. client.focused $lightblue $darkblue $white $purple $mediumgrey
  80. client.unfocused $darkblue $darkblue $grey $purple $darkgrey
  81. client.focused_inactive $darkblue $darkblue $grey $purple $black
  82. client.urgent $urgentred $urgentred $white $purple $yellowbrown
  83. bar {
  84. font pango: Iosveka 8
  85. status_command i3blocks -c ~/.config/i3/i3blocks.conf
  86. position top
  87. # i3bar_command i3bar --transparency
  88. # it could be that you have no primary display set: set one (xrandr --output <output> --primary)
  89. # reference: https://i3wm.org/docs/userguide.html#_tray_output
  90. tray_output primary
  91. tray_padding 0
  92. # When strip_workspace_numbers is set to yes,
  93. # any workspace that has a name of the form
  94. # “[n][:][NAME]” will display only the name.
  95. strip_workspace_numbers yes
  96. ##strip_workspace_name no
  97. colors {
  98. separator $purple
  99. background $darkgrey
  100. statusline $white
  101. # border bg txt indicator
  102. focused_workspace $mediumgrey $grey $darkgrey $purple
  103. active_workspace $lightblue $mediumgrey $darkgrey $purple
  104. inactive_workspace $darkgrey $darkgrey $grey $purple
  105. urgent_workspace $urgentred $urgentred $white $purple
  106. }
  107. }
  108. # CUSTOM BINDINGS
  109. #bindsym $mod+shift+m exec --no-startup-id surf https://15five-dev.atlassian.net/secure/Dashboard.jspa
  110. # SCRATCHPAD
  111. bindsym $mod+Ctrl+Return exec rofi -show ssh
  112. bindsym $mod+Return exec $term
  113. bindsym $mod+Shift+Return exec kitty
  114. #bindsym $mod+Shift+BackSpace floating enable, move position 48 px 48 px, move scratchpad
  115. #bindsym $mod+Ctrl+BackSpace exec $term -e tmux new-session -A -s scratch
  116. # KILL
  117. bindsym $mod+Shift+q kill
  118. bindsym $mod+Shift+x exec exit
  119. # RELOAD
  120. bindsym $mod+Shift+BackSpace reload
  121. # RESTART
  122. bindsym $mod+Shift+r restart
  123. bindsym $mod+w layout toggle split
  124. bindsym $mod+Ctrl+w layout stacked
  125. bindsym $mod+Shift+w layout tabbed
  126. title_align center
  127. ##### MOVEMENT ####################################
  128. # WORKSPACES
  129. bindsym $mod+Ctrl+Shift+h move workspace to output left
  130. bindsym $mod+Ctrl+Shift+l move workspace to output right
  131. bindsym $mod+Ctrl+Shift+j move workspace to output down
  132. bindsym $mod+Ctrl+Shift+k move workspace to output up
  133. # FOCUS
  134. bindsym $mod+h focus left
  135. bindsym $mod+j focus down
  136. bindsym $mod+k focus up
  137. bindsym $mod+l focus right
  138. bindsym $mod+Left focus left
  139. bindsym $mod+Down focus down
  140. bindsym $mod+Up focus up
  141. bindsym $mod+Right focus right
  142. # MOVE
  143. bindsym $mod+Ctrl+h move left
  144. bindsym $mod+Ctrl+j move down
  145. bindsym $mod+Ctrl+k move up
  146. bindsym $mod+Ctrl+l move right
  147. bindsym $mod+Ctrl+Left move left
  148. bindsym $mod+Ctrl+Down move down
  149. bindsym $mod+Ctrl+Up move up
  150. bindsym $mod+Ctrl+Right move right
  151. # RESIZE
  152. bindsym $mod+Shift+h resize shrink width 20px or 20 ppt
  153. bindsym $mod+Shift+j resize shrink height 20px or 20 ppt
  154. bindsym $mod+Shift+k resize grow height 20px or 20 ppt
  155. bindsym $mod+Shift+l resize grow width 20px or 20 ppt
  156. bindsym $mod+Shift+Left resize shrink width 10px or 10 ppt
  157. bindsym $mod+Shift+Down resize shrink height 10px or 10 ppt
  158. bindsym $mod+Shift+Up resize grow height 10px or 10 ppt
  159. bindsym $mod+Shift+Right resize grow width 10px or 10 ppt
  160. # VERTICAL SPLIT
  161. bindsym $mod+v split v
  162. # HORIZONTAL SPLIT
  163. bindsym $mod+b split h
  164. # FULLSCREEN
  165. bindsym $mod+f fullscreen toggle
  166. # TOGGLE FLOATING
  167. ##bindsym $mod+escape floating toggle; $center
  168. # MODE TOGGLE
  169. bindsym $mod+Shift+space focus mode_toggle
  170. # PAPER MODE
  171. bindsym $mod+Ctrl+space floating toggle; resize set 780px 880px;
  172. # Small PAPER MODE
  173. bindsym $mod+Ctrl+p floating toggle; resize set 480px 580px;
  174. # CENTER FLOATING
  175. bindsym $mod+c $center
  176. # DISPLAYS
  177. bindsym $mod+F1 exec ~/.screenlayout/titan-one.sh
  178. bindsym $mod+F2 exec ~/.screenlayout/titan-two.sh
  179. # bind program to workspace and focus to them on startup:
  180. assign [class="emacs"] $ws1
  181. assign [class="(?i)firefox"] $ws3
  182. assign [class="qutebrowser"] $ws4
  183. ##### WORKSPACES ##################################
  184. # WORKSPACES
  185. set $ws1 number 1
  186. set $ws2 number 2
  187. set $ws3 number 3
  188. set $ws4 number 4
  189. set $ws5 number 5
  190. set $ws6 number 6
  191. set $ws7 number 7
  192. set $ws8 number 8
  193. set $ws9 number 9
  194. #assign [class="Firefox"] $ws1
  195. #assign [class="emacs"] $ws2
  196. #assign [class="^Zoom"] $ws5
  197. # SWITCH TO WORKSPACE
  198. bindsym $mod+1 workspace $ws1
  199. bindsym $mod+2 workspace $ws2
  200. bindsym $mod+3 workspace $ws3
  201. bindsym $mod+4 workspace $ws4
  202. bindsym $mod+5 workspace $ws5
  203. bindsym $mod+6 workspace $ws6
  204. bindsym $mod+7 workspace $ws7
  205. bindsym $mod+8 workspace $ws8
  206. bindsym $mod+9 workspace $ws9
  207. bindsym $mod+Mod2+KP_1 workspace $ws1
  208. bindsym $mod+Mod2+KP_2 workspace $ws2
  209. bindsym $mod+Mod2+KP_3 workspace $ws3
  210. bindsym $mod+Mod2+KP_4 workspace $ws4
  211. bindsym $mod+Mod2+KP_5 workspace $ws5
  212. bindsym $mod+Mod2+KP_6 workspace $ws6
  213. bindsym $mod+Mod2+KP_7 workspace $ws7
  214. bindsym $mod+Mod2+KP_8 workspace $ws8
  215. bindsym $mod+Mod2+KP_9 workspace $ws9
  216. # MOVE WINDOW TO WORKSPACE
  217. bindsym $mod+Shift+1 move container to workspace $ws1
  218. bindsym $mod+Shift+2 move container to workspace $ws2
  219. bindsym $mod+Shift+3 move container to workspace $ws3
  220. bindsym $mod+Shift+4 move container to workspace $ws4
  221. bindsym $mod+Shift+5 move container to workspace $ws5
  222. bindsym $mod+Shift+6 move container to workspace $ws6
  223. bindsym $mod+Shift+7 move container to workspace $ws7
  224. bindsym $mod+Shift+8 move container to workspace $ws8
  225. bindsym $mod+Shift+9 move container to workspace $ws9
  226. bindsym $mod+Ctrl+Mod2+KP_1 move container to workspace $ws1
  227. bindsym $mod+Ctrl+Mod2+KP_2 move container to workspace $ws2
  228. bindsym $mod+Ctrl+Mod2+KP_3 move container to workspace $ws3
  229. bindsym $mod+Ctrl+Mod2+KP_4 move container to workspace $ws4
  230. bindsym $mod+Ctrl+Mod2+KP_5 move container to workspace $ws5
  231. bindsym $mod+Ctrl+Mod2+KP_6 move container to workspace $ws6
  232. bindsym $mod+Ctrl+Mod2+KP_7 move container to workspace $ws7
  233. bindsym $mod+Ctrl+Mod2+KP_8 move container to workspace $ws8
  234. bindsym $mod+Ctrl+Mod2+KP_9 move container to workspace $ws9
  235. ##=================================================##
  236. # Assign Workspaces:
  237. #assign [class="Emacs"] $ws1
  238. #assign [class=$qute] $ws2
  239. #assign [class=$term] $ws3
  240. #assign [class="calibre"] $ws5
  241. #assign [class="Foliate"] $ws5
  242. ##### COLORS #######################################
  243. # XRESOURCES
  244. set $fg "#FF00FF"
  245. set $bg "#AAAAAA"
  246. set $tx "#000000"
  247. set $ltx "#000000"
  248. # CLASS BORDER BACK TEXT INDICATOR
  249. client.focused $fg $fg $tx $fg
  250. client.focused_inactive $bg $bg $tx $fg
  251. client.unfocused $bg $bg $ltx $bg
  252. client.urgent $bg $bg $bg $bg
  253. client.placeholder $bg $bg $bg $bg
  254. ##### TOOLS ########################################
  255. # bindsym $mod+F11 exec --no-startup-id systemctl --user restart canon-webcam
  256. # bindsym $mod+F12 exec --no-startup-id ffplay /dev/video5
  257. # SCREENSHOT
  258. set $shots ~/var/media/screenshots
  259. bindsym $mod+Print exec maim --hidecursor $shots/$(date +%s).png
  260. bindsym $mod+Ctrl+Print exec screencap
  261. bindsym $mod+Shift+Print exec pkill ffmpeg
  262. # CAST
  263. set $casts ~/videos/casts
  264. #bindsym $mod+Ctrl+F11 exec anypaste -x -s -p streamable $(last $casts)
  265. #bindsym $mod+Shift+F11 exec ffplay -loop 0 $(last $casts)
  266. # Sreen brightness controls
  267. bindsym F5 exec ~/.bin/fade down
  268. bindsym F6 exec ~/.bin/fade up
  269. #bindsym XF86MonBrightnessUp exec ~/.bin/fade up
  270. #bindsym XF86MonBrightnessDown exec ~/.bin/fade down
  271. #bindsym XF86MonBrightnessUp exec ~/.config/i3/bright.sh -u # increase screen brightness
  272. #bindsym XF86MonBrightnessDown exec ~/.config/i3/bright.sh -d # decrease screen brightness
  273. #bindsym XF86Search exec ~/.config/i3/bright.sh 1 # decrease screen brightness
  274. #bindsym F5 exec ~/.config/i3/bright.sh -d # decrease screen brightness
  275. #bindsym F6 exec ~/.config/i3/bright.sh -u # increase screen brightness
  276. # ROFI
  277. bindsym $mod+space exec rofi -show combi -display-window "W"
  278. bindsym $mod+P exec --no-startup-id ~/.config/rofi/rofi-pass.sh
  279. bindsym $mod+o exec --no-startup-id ~/.config/rofi/www.sh
  280. bindsym $mod+Shift+o exec --no-startup-id ~/.config/rofi/www-incognito.sh
  281. bindsym $mod+s exec --no-startup-id ~/.config/rofi/web-search.sh
  282. bindsym $mod+Shift+b exec --no-startup-id ~/.config/rofi/books-search.sh
  283. bindsym $mod+Shift+s exec --no-startup-id ~/.config/rofi/slack.sh
  284. # Lock with
  285. bindsym $mod+Shift+F12 exec --no-startup-id i3lock -i ~/var/media/backgrounds/astrobin/`ls -Ar ~/var/media/backgrounds/astrobin/ | tail -n 1` -t
  286. # BACKGROUND
  287. #exec hsetroot -cover ~/var/media/backgrounds/bing/`ls -A ~/var/media/backgrounds/bing | tail -n 1`
  288. ##### APP BINDS ###################################
  289. bindsym $mod+n exec $qute --target window
  290. bindsym $mod+Shift+n exec $qute --target private-window
  291. bindsym $mod+Shift+c exec org-capture
  292. bindsym $mod+Shift+y exec xfreerdp /u:powellc /p:mainroot /v:telesto.local /w:1200 /h:700
  293. bindsym $mod+Ctrl+y exec pkill xfreerdp
  294. bindsym Print exec --no-startup-id flameshot gui
  295. bindsym $mod+F6 exec --no-startup-id $surf https://15five.slack.com
  296. bindsym F7 exec --no-startup-id $qute https://15five-dev.atlassian.net/secure/Dashboard.jspa
  297. bindsym $mod+F7 exec --no-startup-id $qute https://app.datadoghq.com/logs
  298. bindsym F8 exec --no-startup-id $firefox https://15five.15five.com/report/current/
  299. bindsym $mod+F8 exec --no-startup-id $firefox
  300. bindsym F9 exec --no-startup-id $qute https://my.five.unbl.ink/
  301. bindsym $mod+F9 exec --no-startup-id $qute https://my.five.unbl.ink/admin/dj/
  302. bindsym F10 exec --no-startup-id $qute https://admin.cloud100.15five.com/admin/dj
  303. bindsym $mod+F10 exec --no-startup-id $qute
  304. bindsym F11 exec --no-startup-id $qute https://15five.my.salesforce.com
  305. bindsym $mod+F11 exec --no-startup-id $qute https://15five--15fivesb.my.salesforce.com
  306. bindsym F12 exec --no-startup-id $qute https://wx.unbl.ink
  307. bindsym $mod+F12 exec --no-startup-id $qute https://podcasts.unbl.ink/
  308. bindsym $mod+Insert exec --no-startup-id zathura ~/var/documents/15five/strengths.pdf
  309. bindsym $mod+Home exec --no-startup-id snapclient -h mopidy2.local
  310. bindsym $mod+Shift+Home exec --no-startup-id pkill snapclient
  311. bindsym $mod+e exec emacsclient -cnq
  312. bindsym $mod+Shift+e exec emacs --daemon
  313. bindsym $mod+Ctrl+e exec pkill emacs
  314. ##### LAUNCH ######################################
  315. # STARTUP
  316. exec --no-startup-id unclutter -grab
  317. exec --no-startup-id nm-applet
  318. exec --no-startup-id copyq
  319. # RELOAD
  320. exec --no-startup-id picom --config ~/.config/compton/compton.conf
  321. exec --no-startup-id dunst
  322. #exec --no-startup-id syncthing
  323. exec xrdb --merge ~/.Xresoureces
  324. # Set wallpaper and keyboard mappings
  325. exec_always --no-startup-id changepaper
  326. exec_always setxkbmap -model pc105 -layout us,ru -option grp:ctrls_toggle -option caps:escape -option compose:ralt
  327. ## Volume control
  328. # Pulse Audio controls
  329. bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
  330. bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
  331. bindsym XF86AudioMute exec amixer -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
  332. bindsym XF86AudioMicMute exec amixer -D pulse sset Capture toggle && pkill -RTMIN+1 i3blocks
  333. bindsym F1 exec amixer -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
  334. bindsym F2 exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
  335. bindsym F3 exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
  336. bindsym F4 exec amixer -D pulse sset Capture toggle && pkill -RTMIN+1 i3blocks
  337. bindsym $mod+z exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
  338. bindsym $mod+x exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
  339. bindsym $mod+a exec amixer -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
  340. #bindsym $mod+Home exec --no-startup-id cvlc https://stream.unbl.ink/mopidy
  341. #bindsym $mod+Shift+Home exec --no-startup-idcvlc https://playerservices.streamtheworld.com/api/livestream-redirect/WMEAFM.mp3
  342. bindsym $mod+End exec pkill vlc
  343. # Iapetus central volume
  344. #@bindsym $mod+. exec ssh iapetus.local down
  345. #@bindsym $mod+Shift+. exec ssh iapetus.local up
  346. #@bindsym $mod+Alt+. exec ssh iapetus.local playu
  347. #@bindsym $mod+Ctrl+. exec ssh iapetus.local "pkill vlc"
  348. bindsym $mod+d exec rofi -modi drun -show drun \
  349. -config ~/.config/rofi/rofidmenu.rasi
  350. #bindsym F9 exec rofi -modi drun -show drun \
  351. # -config ~/.config/rofi/rofidmenu.rasi
  352. ## rofi bindings for window menu ($mod+t /F10 optional disabled)
  353. bindsym $mod+t exec rofi -show window \
  354. -config ~/.config/rofi/rofidmenu.rasi