Advertisement
Guest User

i3 config

a guest
Jan 2nd, 2021
681
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.67 KB | None | 0 0
  1. # This file a modified version based by default i3-config-wizard config
  2. # source is available here:
  3. # https://raw.githubusercontent.com/endeavouros-team/i3-EndeavourOS/master/.config/i3/config
  4. # Maintainer: joekamprad [joekamprad@endeavouros.com]
  5. # https://endeavouros.com
  6. #
  7. # --> to update this run the following command:
  8. # wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/i3-EndeavourOS/master/.config/i3/config -P ~/.config/i3/
  9.  
  10. #get latest configs from GitHub:
  11. #exec --no-startup-id git clone https://github.com/endeavouros-team/i3-EndeavourOS.git ~/.config/i3/original/
  12.  
  13. # i3 config file
  14. #
  15. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  16.  
  17. set $mod Mod4
  18.  
  19. # workspace layouts:
  20. #default i3 tiling mode
  21. workspace_layout default
  22.  
  23.  
  24. # Set inner/outer gaps
  25. gaps inner 2
  26. gaps outer 2
  27.  
  28. #do not show titlebar on windows:
  29. new_window 1pixel
  30.  
  31. #workspace_layout stacking
  32.  
  33. #workspace_layout tabbed
  34. #Tiling mode is tabbed:
  35. #so each new window will open fullscreen as a tab, you can change between window-tabs with mouse or shortcut:
  36. #
  37. # [mod]+Left focus left (left arrow key)
  38. # [mod]+Right focus right (right arrow key)
  39.  
  40.  
  41. # get auth work with polkit-gnome:
  42. exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
  43.  
  44. # Font for window titles. Will also be used by the bar unless a different font
  45. # is used in the bar {} block below.
  46. # Before i3 v4.8, we used to recommend this one as the default:
  47. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  48. # The font above is very space-efficient, that is, it looks good, sharp and
  49. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  50. # X core fonts rendering does not support right-to-left and this being a bitmap
  51. # font, it doesn’t scale on retina/hidpi displays.
  52. font pango:Noto Sans Regular 10
  53.  
  54. # thin borders:
  55. hide_edge_borders both
  56.  
  57. # Use Mouse+$mod to drag floating windows to their wanted position:
  58. floating_modifier $mod
  59.  
  60. # start a terminal:
  61. bindsym $mod+Return exec xfce4-terminal
  62.  
  63. # kill focused window:
  64. bindsym $mod+Shift+q kill
  65.  
  66. # open keybindings overview:
  67. bindsym $mod+F1 exec "xed ~/.config/i3/keybindings"
  68.  
  69. # change focus:
  70. bindsym $mod+j focus left
  71. bindsym $mod+k focus down
  72. bindsym $mod+u focus up
  73. bindsym $mod+ntilde focus right
  74.  
  75. # alternatively, you can use the cursor keys:
  76. bindsym $mod+Left focus left
  77. bindsym $mod+Down focus down
  78. bindsym $mod+Up focus up
  79. bindsym $mod+Right focus right
  80.  
  81. # move focused window:
  82. bindsym $mod+Shift+j move left
  83. bindsym $mod+Shift+k move down
  84. bindsym $mod+Shift+l move up
  85. bindsym $mod+Shift+ntilde move right
  86.  
  87. # alternatively, you can use the cursor keys:
  88. bindsym $mod+Shift+Left move left
  89. bindsym $mod+Shift+Down move down
  90. bindsym $mod+Shift+Up move up
  91. bindsym $mod+Shift+Right move right
  92.  
  93. # split in horizontal orientation:
  94. bindsym $mod+h split h
  95.  
  96. # split in vertical orientation:
  97. bindsym $mod+v split v
  98.  
  99. # enter fullscreen mode for the focused container:
  100. bindsym $mod+f fullscreen toggle
  101.  
  102. # change container layout (stacked, tabbed, toggle split):
  103. bindsym $mod+Shift+s layout stacking
  104. bindsym $mod+Shift+w layout tabbed
  105. bindsym $mod+Shift+e layout toggle split
  106.  
  107. # toggle tiling / floating:
  108. bindsym $mod+Shift+space floating toggle
  109.  
  110. # change focus between tiling / floating windows:
  111. bindsym $mod+space focus mode_toggle
  112.  
  113. # focus the parent container:
  114. bindsym $mod+a focus parent
  115.  
  116. # focus the child container:
  117. #bindsym $mod+d focus child
  118.  
  119. # workspace-edit:
  120. set $ws1 "Workspace 1"
  121. set $ws2 "Workspace 2"
  122. set $ws3 "Workspace 3"
  123. set $ws4 "Workspace 4"
  124. set $ws5 "Workspace 5"
  125.  
  126. bindsym $mod+s exec --no-startup-id ~/.config/i3/scripts/empty_workspace.sh
  127.  
  128. # autostart start applications + bind program to workspace:
  129.  
  130. # Autostart apps:
  131. #exec --no-startup-id sleep 2 && xfce4-terminal
  132. #exec --no-startup-id firefox
  133. #exec --no-startup-id sleep 3 && thunar
  134. #exec --no-startup-id blueberry-tray
  135.  
  136. # dex execute .desktop files:
  137. exec --no-startup-id dex -a -s /etc/xdg/autostart/:~/.config/autostart
  138.  
  139. # transparency:
  140. #exec --no-startup-id xcompmgr -c
  141. exec --no-startup-id picom -cC
  142.  
  143. #set wallpaper:
  144. exec --no-startup-id nitrogen --restore
  145.  
  146. #set powersavings for display:
  147. exec --no-startup-id xset s 480 dpms 600 600 600
  148.  
  149. # Desktop notifications_
  150. exec --no-startup-id usr/bin/dunst
  151.  
  152. # set floating (nontiling)for apps needing it:
  153. for_window [class="Yad" instance="yad"] floating enable
  154. for_window [class="Galculator" instance="galculator"] floating enable
  155. for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
  156.  
  157. # set floating (nontiling) for special apps:
  158. for_window [class="Xsane" instance="xsane"] floating enable
  159. for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
  160. for_window [class="qt5ct" instance="qt5ct"] floating enable
  161. for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
  162. for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
  163. for_window [class="Pamac-manager"] floating enable
  164.  
  165. # resize floating windows with mouse scroll:
  166. bindsym --whole-window --border $mod+button4 resize shrink height 5 px or 5 ppt
  167. bindsym --whole-window --border $mod+button5 resize grow height 5 px or 5 ppt
  168. bindsym --whole-window --border $mod+shift+button4 resize shrink width 5 px or 5 ppt
  169. bindsym --whole-window --border $mod+shift+button5 resize grow width 5 px or 5 ppt
  170.  
  171. # switch to workspace:
  172. bindsym $mod+1 workspace $ws1
  173. bindsym $mod+2 workspace $ws2
  174. bindsym $mod+3 workspace $ws3
  175. bindsym $mod+4 workspace $ws4
  176. bindsym $mod+5 workspace $ws5
  177. bindsym $mod+6 workspace $ws6
  178. bindsym $mod+7 workspace $ws7
  179. bindsym $mod+8 workspace $ws8
  180. bindsym $mod+9 workspace $ws9
  181.  
  182.  
  183. # move focused container to workspace:
  184. bindsym $mod+Shift+1 move container to workspace $ws1
  185. bindsym $mod+Shift+2 move container to workspace $ws2
  186. bindsym $mod+Shift+3 move container to workspace $ws3
  187. bindsym $mod+Shift+4 move container to workspace $ws4
  188. bindsym $mod+Shift+5 move container to workspace $ws5
  189. bindsym $mod+Shift+6 move container to workspace $ws6
  190. bindsym $mod+Shift+7 move container to workspace $ws7
  191. bindsym $mod+Shift+8 move container to workspace $ws8
  192. bindsym $mod+Shift+9 move container to workspace $ws9
  193.  
  194.  
  195. # reload the configuration file:
  196. bindsym $mod+Shift+c reload
  197.  
  198. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3):
  199. bindsym $mod+Shift+r restart
  200.  
  201. # exit i3 (logs you out of your X session):
  202. bindsym $mod+Shift+F1 exec ~/.config/i3/scripts/shutdown_menu -p rofi -c
  203.  
  204. # resize window (you can also use the mouse for that):
  205. mode "resize" {
  206. # These bindings trigger as soon as you enter the resize mode
  207.  
  208. # Pressing left will shrink the window’s width.
  209. # Pressing right will grow the window’s width.
  210. # Pressing up will shrink the window’s height.
  211. # Pressing down will grow the window’s height.
  212. bindsym j resize shrink width 10 px or 10 ppt
  213. bindsym k resize grow height 10 px or 10 ppt
  214. bindsym l resize shrink height 10 px or 10 ppt
  215. bindsym ntilde resize grow width 10 px or 10 ppt
  216.  
  217. # same bindings, but for the arrow keys
  218. bindsym Left resize shrink width 10 px or 10 ppt
  219. bindsym Down resize grow height 10 px or 10 ppt
  220. bindsym Up resize shrink height 10 px or 10 ppt
  221. bindsym Right resize grow width 10 px or 10 ppt
  222.  
  223. # back to normal: Enter or Escape
  224. bindsym Return mode "default"
  225. bindsym Escape mode "default"
  226. }
  227.  
  228. bindsym $mod+r mode "resize"
  229.  
  230. # Multimedia Keys:
  231.  
  232. # volume
  233. bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
  234. bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
  235.  
  236. # gradular volume control
  237. bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
  238. bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
  239.  
  240. # mute
  241. bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 i3blocks
  242.  
  243. bindsym XF86AudioPlay exec playerctl play
  244. bindsym XF86AudioPause exec playerctl pause
  245. bindsym XF86AudioNext exec playerctl next
  246. bindsym XF86AudioPrev exec playerctl previous
  247.  
  248. # App shortcuts
  249. bindsym $mod+w exec "/usr/bin/firefox"
  250. bindsym $mod+n exec "/usr/bin/thunar"
  251. bindsym Print exec "scrot ~/%Y-%m-%d-%T-screenshot.png"
  252.  
  253. # Redirect sound to headphones
  254. bindsym $mod+m exec "/usr/local/bin/switch-audio-port"
  255.  
  256.  
  257. # Lock the system
  258. bindsym $mod+l exec i3lock -i ~/.config/i3/i3-lock-screen.png -t -f
  259.  
  260. set $bg-color #2f343f
  261. set $inactive-bg-color #2f343f
  262. set $text-color #f3f4f5
  263. set $inactive-text-color #676e7d
  264. set $urgent-bg-color #e53935
  265. set $indicator-color #a0a0a0
  266.  
  267. # set window colors:
  268. # border background text indicator
  269. client.focused $bg-color $bg-color $text-color $indicator-color
  270. client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color
  271. client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color
  272. client.urgent $urgent-bg-color $urgent-bg-color $text-color $indicator-color
  273.  
  274.  
  275. # Start i3bar to display a workspace bar (plus the system information i3status
  276. # finds out, if available):
  277. bar {
  278. status_command i3blocks -c ~/.config/i3/i3blocks.conf
  279. position bottom
  280. colors {
  281. separator #666666
  282. background #222222
  283. statusline #dddddd
  284. focused_workspace #0088CC #0088CC #ffffff
  285. active_workspace #333333 #333333 #ffffff
  286. inactive_workspace #333333 #333333 #888888
  287. urgent_workspace #2f343a #900000 #ffffff
  288. }
  289. }
  290.  
  291. # rofi bindings fancy application menu
  292. bindsym $mod+d exec rofi -modi drun -show drun -line-padding 4 \
  293. -columns 2 -padding 50 -hide-scrollbar \
  294. -show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
  295.  
  296. bindsym F9 exec rofi -modi drun -show drun -line-padding 4 \
  297. -columns 2 -padding 50 -hide-scrollbar \
  298. -show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
  299.  
  300. bindsym $mod+o exec rofi -show window -line-padding 4 \
  301. -lines 6 -padding 50 -hide-scrollbar \
  302. -show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
  303.  
  304. bindsym F10 exec rofi -show window -line-padding 4 \
  305. -lines 6 -padding 50 -hide-scrollbar \
  306. -show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
  307.  
  308.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement