Advertisement
Dobbie03

i3 config

Jan 1st, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.56 KB | None | 0 0
  1.  
  2. set_from_resource $color15_i3wmthemer color15
  3. set_from_resource $color14_i3wmthemer color14
  4. set_from_resource $color13_i3wmthemer color13
  5. set_from_resource $color12_i3wmthemer color12
  6. set_from_resource $color11_i3wmthemer color11
  7. set_from_resource $color10_i3wmthemer color10
  8. set_from_resource $color09_i3wmthemer color9
  9. set_from_resource $color08_i3wmthemer color8
  10. set_from_resource $color07_i3wmthemer color7
  11. set_from_resource $color06_i3wmthemer color6
  12. set_from_resource $color05_i3wmthemer color5
  13. set_from_resource $color04_i3wmthemer color4
  14. set_from_resource $color03_i3wmthemer color3
  15. set_from_resource $color02_i3wmthemer color2
  16. set_from_resource $color01_i3wmthemer color1
  17. set_from_resource $color00_i3wmthemer color0
  18. set_from_resource $foreground_i3wmthemer foreground
  19. set_from_resource $background_i3wmthemer background
  20.  
  21. #########################################
  22. ### KEY DEFINITIONS ####
  23. #########################################
  24. ## $Mod = Super key or Mod4 ##
  25. ## Mod1 = ALT key ##
  26. ## Control = CTRL key ##
  27. ## Shift = SHIFT key ##
  28. ## Escape = ESCAPE key ##
  29. ## Return = ENTER or RETURN key ##
  30. ## Pause = PAUSE key ##
  31. ## Print = PRINT key ##
  32. ## Tab = TAB key ##
  33. #########################################
  34.  
  35. ####################################################################################################
  36. ################# colors ##################
  37. ####################################################################################################
  38.  
  39. # font
  40. font pango:Ubuntu Regular 10
  41.  
  42. # class border backgr. text indicator
  43. client.focused $foreground_i3wmthemer $background_i3wmthemer $foreground_i3wmthemer $background_i3wmthemer $background_i3wmthemer
  44. client.focused_inactive $foreground_i3wmthemer $background_i3wmthemer $foreground_i3wmthemer $background_i3wmthemer $background_i3wmthemer
  45. client.unfocused $foreground_i3wmthemer $background_i3wmthemer $foreground_i3wmthemer $background_i3wmthemer $background_i3wmthemer
  46. client.urgent $foreground_i3wmthemer $background_i3wmthemer $foreground_i3wmthemer $background_i3wmthemer $background_i3wmthemer
  47. client.background $background_i3wmthemer
  48.  
  49.  
  50. ####################################################################################################
  51. ################# Define variables #################
  52. ####################################################################################################
  53.  
  54. #set Super or Alt key
  55. set $mod Mod4
  56. #set $mod Mod1
  57.  
  58. # vim directional keys
  59. set $up l
  60. set $down k
  61. set $left j
  62. set $right semicolon
  63.  
  64. ####################################################################################################
  65. ################# Define Workspaces and screens #################
  66. ####################################################################################################
  67.  
  68. # monitors
  69. set $firstMonitor DisplayPort-0
  70. set $secondMonitor HDMI-A-0
  71.  
  72. workspace 1 output $firstMonitor
  73. workspace 2 output $firstMonitor
  74. workspace 3 output $firstMonitor
  75. workspace 4 output $firstMonitor
  76. workspace 5 output $firstMonitor
  77. workspace 6 output $secondMonitor
  78. workspace 7 output $secondMonitor
  79. workspace 8 output $secondMonitor
  80. workspace 9 output $secondMonitor
  81. workspace 10 output $secondMonitor
  82.  
  83. # switch to workspace
  84. bindsym $mod+1 workspace 1
  85. bindsym $mod+2 workspace 2
  86. bindsym $mod+3 workspace 3
  87. bindsym $mod+4 workspace 4
  88. bindsym $mod+5 workspace 5
  89. bindsym $mod+6 workspace 6
  90. bindsym $mod+7 workspace 7
  91. bindsym $mod+8 workspace 8
  92. bindsym $mod+9 workspace 9
  93. bindsym $mod+0 workspace 10
  94.  
  95. # move focused container to workspace
  96. bindsym $mod+Shift+1 move container to workspace 1; workspace 1
  97. bindsym $mod+Shift+2 move container to workspace 2; workspace 2
  98. bindsym $mod+Shift+3 move container to workspace 3; workspace 3
  99. bindsym $mod+Shift+4 move container to workspace 4; workspace 4
  100. bindsym $mod+Shift+5 move container to workspace 5; workspace 5
  101. bindsym $mod+Shift+6 move container to workspace 6; workspace 6
  102. bindsym $mod+Shift+7 move container to workspace 7; workspace 7
  103. bindsym $mod+Shift+8 move container to workspace 8; workspace 8
  104. bindsym $mod+Shift+9 move container to workspace 9; workspace 9
  105. bindsym $mod+Shift+0 move container to workspace 10; workspace 10
  106.  
  107. ####################################################################################################
  108. ################# reload configs #################
  109. ####################################################################################################
  110.  
  111. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  112. bindsym $mod+Shift+r restart
  113.  
  114. # reload the configuration file
  115. bindsym $mod+Shift+c reload
  116.  
  117. # kill focused window
  118. bindsym $mod+Shift+q kill
  119.  
  120. ####################################################################################################
  121. ################ Container/window control ##################
  122. ####################################################################################################
  123.  
  124. # Use Mouse+$mod to drag floating windows to their wanted position
  125. floating_modifier $mod
  126.  
  127. # toggle tiling / floating
  128. bindsym $mod+Shift+space floating toggle
  129.  
  130. # change focus
  131. bindsym $mod+$left focus left
  132. bindsym $mod+$down focus down
  133. bindsym $mod+$up focus up
  134. bindsym $mod+$right focus right
  135.  
  136. # alternatively, you can use the cursor keys:
  137. bindsym $mod+Left focus left
  138. bindsym $mod+Down focus down
  139. bindsym $mod+Up focus up
  140. bindsym $mod+Right focus right
  141.  
  142.  
  143. # move focused window
  144. bindsym $mod+Shift+$left move left
  145. bindsym $mod+Shift+$down move down
  146. bindsym $mod+Shift+$up move up
  147. bindsym $mod+Shift+$right move right
  148.  
  149. # alternatively, you can use the cursor keys:
  150. bindsym $mod+Shift+Left move left
  151. bindsym $mod+Shift+Down move down
  152. bindsym $mod+Shift+Up move up
  153. bindsym $mod+Shift+Right move right
  154.  
  155. # resizing
  156. bindsym mod1+Left resize shrink width 10 px or 5 ppt
  157. bindsym mod1+Down resize grow height 10 px or 5 ppt
  158. bindsym mod1+Up resize shrink height 10 px or 5 ppt
  159. bindsym mod1+Right resize grow width 10 px or 5 ppt
  160.  
  161. # next/previous workspace
  162. bindsym Mod1+Tab workspace next
  163. bindsym Mod1+Shift+Tab workspace prev
  164. bindsym $mod+Tab workspace back_and_forth
  165.  
  166. #navigate workspaces next / previous
  167. bindsym Mod1+Ctrl+Right workspace next
  168. bindsym Mod1+Ctrl+Left workspace prev
  169.  
  170. # switch to workspace with urgent window
  171. for_window [urgent=latest] focus
  172.  
  173. # default tiling orientation
  174. default_orientation horizontal
  175.  
  176. # container layout
  177. bindsym $mod+h split h
  178. bindsym $mod+v split v
  179. bindsym $mod+Shift+t layout tabbed
  180. bindsym $mod+Shift+s layout stacking
  181. bindsym $mod+Shift+h layout splith
  182. bindsym $mod+Shift+v layout splitv
  183.  
  184. # switch between tiling / floating
  185. bindsym $mod+space focus mode_toggle
  186.  
  187. # focus the parent container
  188. bindsym $mod+a focus parent
  189.  
  190. bindsym $mod+Shit+y floating enable, fullscreen disable, sticky toggle, resize set 680 400, move to position 1945 45
  191.  
  192. # focus the child container
  193. #bindsym $mod+d focus child
  194.  
  195. ####################################################################################################
  196. ################# Autostart applications ##################
  197. ####################################################################################################
  198.  
  199. # re-run with every i3 reload
  200. exec_always --no-startup-id numlockx on
  201. exec_always --no-startup-id ksuperkey -e 'Super_L=Alt_L|F1'
  202. exec_always --no-startup-id compton
  203. exec_always --no-startup-id polybar -r i3-bar
  204.  
  205. # run once at startup
  206. exec --no-startup-id xfsettingsd &
  207. exec --no-startup-id nitrogen --restore
  208. exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
  209. #exec --no-startup-id xfce4-power-manager &
  210. exec --no-startup-id xscreensaver -no-splash &
  211. exec --no-startup-id xrandr --output DisplayPort-0 --mode 3840x2160 --output HDMI-A-0 --auto --right-of DisplayPort-0
  212.  
  213. # system tray
  214. #exec --no-startup-id nm-applet
  215. #exec --no-startup-id volumeicon
  216.  
  217.  
  218. ####################################################################################################
  219. ################# application keyboard shortcuts ##################
  220. ####################################################################################################
  221.  
  222. bindsym $mod+e exec --no-startup-id al-open -edit
  223. bindsym Control+space exec --no-startup-id "rofi -modi run,drun,window -show drun"
  224. bindsym mod1+F1 exec --no-startup-id "rofi -modi run,drun,window -show drun"
  225. bindsym $mod+t exec --no-startup-id exo-open --launch TerminalEmulator
  226. bindsym $mod+w exec --no-startup-id exo-open --launch WebBrowser
  227. bindsym $mod+f exec --no-startup-id exo-open --launch FileManager
  228. bindsym $mod+m exec audacious
  229. bindsym Print exec --no-startup-id xfce4-screenshooter
  230. bindsym $mod+F11 exec --no-startup-id /usr/bin/rofi-logout
  231.  
  232. ####################################################################################################
  233. ################# application settings #################
  234. ####################################################################################################
  235.  
  236. for_window [class="qt5ct|Lxappearance|^Gpick$|Pamac|Peek|Nitrogen|Audacious"] floating enable
  237. for_window [window_role="^Preferences$"] floating enable
  238.  
  239. for_window [class="Termite|^Thunar|Geany|Firefox"] focus
  240.  
  241. # Assign Applications to specific workspace
  242. # get class with xprop
  243. assign [class="Firefox"] → 1
  244. assign [class="Geany"] → 2
  245. assign [class="Thunar"] → 3
  246. assign [class="^Gimp"] → 4
  247.  
  248. #for_window [class="(?i)CoverGloobus$"] floating enable, sticky enable, resize set 150 150
  249. for_window [title="(?i)audacious"] floating enable
  250.  
  251. ####################################################################################################
  252. ################# audio settings #################
  253. ####################################################################################################
  254.  
  255. bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
  256. bindsym XF86AudioNext exec --no-startup-id playerctl next
  257. bindsym XF86AudioPrev exec --no-startup-id playerctl previous
  258. bindsym XF86AudioStop exec --no-startup-id playerctl stop
  259. bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 2
  260. bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 2
  261. bindsym XF86AudioMute exec --no-startup-id pamixer -t
  262. bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 # increase screen brightness
  263. bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 # decrease screen brightness
  264.  
  265. ####################################################################################################
  266. ################# border control #################
  267. ####################################################################################################
  268.  
  269. hide_edge_borders both
  270. bindsym $mod+shift+b exec --no-startup-id i3-msg border toggle
  271.  
  272. #changing border style
  273. bindsym $mod+n border normal
  274. bindsym $mod+y border 1pixel
  275. bindsym $mod+u border none
  276.  
  277. new_window pixel 2
  278. new_float pixel 2
  279. popup_during_fullscreen smart
  280.  
  281. for_window [class="^.*"] border pixel 2
  282. gaps inner 8
  283. gaps outer 2
  284. #smart_gaps on
  285. #smart_borders on
  286.  
  287. ####################################################################################################
  288. ################# Modes #################
  289. ####################################################################################################
  290.  
  291. # sets gaps
  292. set $mode_gaps Gaps: +/- (local) Shift +/- (global)
  293. bindsym $mod+Shift+g mode "$mode_gaps"
  294.  
  295. mode "$mode_gaps" {
  296. bindsym plus gaps inner current plus 2
  297. bindsym minus gaps inner current minus 2
  298. bindsym 0 gaps inner current set 0
  299.  
  300. bindsym Shift+plus gaps inner all plus 2
  301. bindsym Shift+minus gaps inner all minus 2
  302. bindsym Shift+0 gaps inner all set 0
  303.  
  304. bindsym Return mode "default"
  305. bindsym Escape mode "default"
  306. }
  307.  
  308.  
  309. # exit i3 (logs you out of your X session)
  310. bindsym $mod+Shift+e exec --no-startup-id "i3-nagbar -t warning -m 'You pressed the exit shortcut.\
  311. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
  312.  
  313. #Press $mod (super) and X to exit
  314. bindsym $mod+X mode "$mode_system"
  315.  
  316. set $mode_system (k)  (l)  (u)  (h) ⏾ (r)  (s) 
  317. mode "$mode_system" {
  318. bindsym k exec --no-startup-id i3lock-fancy, mode "default"
  319. bindsym l exec --no-startup-id ~/.config/i3/scripts/i3exit.sh logout, mode "default"
  320. bindsym u exec --no-startup-id ~/.config/i3/scripts/i3exit.sh suspend, mode "default"
  321. bindsym h exec --no-startup-id ~/.config/i3/scripts/i3exit.sh hibernate, mode "default"
  322. bindsym r exec --no-startup-id ~/.config/i3/scripts/i3exit.sh reboot, mode "default"
  323. bindsym s exec --no-startup-id ~/.config/i3/scripts/i3exit.sh shutdown, mode "default"
  324.  
  325. # back to normal: Enter or Escape
  326. bindsym Return mode "default"
  327. bindsym Escape mode "default"
  328. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement