Advertisement
mosaid

i3config

May 25th, 2018
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.23 KB | None | 0 0
  1.  
  2. set $mod Mod4
  3.  
  4. #i3-gaps
  5. #gaps inner 12
  6.  
  7. font pango:monospace 12
  8.  
  9. # Use Mouse+$mod to drag floating windows to their wanted position
  10. floating_modifier $mod
  11.  
  12. # start a terminal
  13. #bindsym $mod+Return exec i3-sensible-terminal
  14. bindsym $mod+Return exec lxterminal
  15. bindsym $mod+t exec lxterminal
  16.  
  17. # kill focused window
  18. bindsym $mod+Shift+Q kill
  19. bindsym mod1+x kill
  20. bindsym button3 kill
  21.  
  22. # start rofi (a program launcher)
  23. bindsym $mod+x exec "rofi -show combi "
  24. bindsym mod1+s exec "xdg-open $(locate home /run/media | rofi -dmenu -i -p locate )"
  25.  
  26. # change focus
  27. #bindsym $mod+j focus left
  28. #bindsym $mod+k focus down
  29. #bindsym $mod+l focus up
  30. #bindsym $mod+m focus right
  31.  
  32. # alternatively, you can use the cursor keys:
  33. bindsym $mod+Left focus left
  34. bindsym $mod+Down focus down
  35. bindsym $mod+Up focus up
  36. bindsym $mod+Right focus right
  37.  
  38. # move focused window
  39. bindsym $mod+Shift+j move left
  40. bindsym $mod+Shift+k move down
  41. bindsym $mod+Shift+l move up
  42. bindsym $mod+Shift+M move right
  43.  
  44. # alternatively, you can use the cursor keys:
  45. bindsym $mod+Shift+Left move left
  46. bindsym $mod+Shift+Down move down
  47. bindsym $mod+Shift+Up move up
  48. bindsym $mod+Shift+Right move right
  49.  
  50. # split in horizontal orientation
  51. bindsym $mod+h split h
  52.  
  53. # split in vertical orientation
  54. bindsym $mod+v split v
  55.  
  56. # enter fullscreen mode for the focused container
  57. bindsym $mod+f fullscreen toggle
  58.  
  59. # change container layout (stacked, tabbed, toggle split)
  60. bindsym $mod+s layout stacking
  61. bindsym $mod+z layout tabbed
  62. bindsym $mod+e layout toggle split
  63.  
  64. # toggle tiling / floating
  65. bindsym $mod+Shift+space floating toggle
  66.  
  67. # change focus between tiling / floating windows
  68. bindsym $mod+space focus mode_toggle
  69.  
  70. # focus the parent container
  71. bindsym $mod+q focus parent
  72.  
  73. # focus the child container
  74. #bindsym $mod+d focus child
  75.  
  76. # Define names for default workspaces for which we configure key bindings later on.
  77. # We use variables to avoid repeating the names in multiple places.
  78. set $ws1 "1: root"
  79. set $ws2 "2: net"
  80. set $ws3 "3: Media"
  81. set $ws4 "4: Files"
  82. set $ws5 "5: Work"
  83. set $ws6 "6: Docs"
  84. set $ws7 "7"
  85. set $ws8 "8"
  86. set $ws9 "9"
  87. set $ws10 "10"
  88.  
  89. # switch to workspace
  90. bindsym $mod+ampersand workspace $ws1
  91. bindsym $mod+eacute workspace $ws2
  92. bindsym $mod+quotedbl workspace $ws3
  93. bindsym $mod+apostrophe workspace $ws4
  94. bindsym $mod+parenleft workspace $ws5
  95. bindsym $mod+minus workspace $ws6
  96. bindsym $mod+egrave workspace $ws7
  97. bindsym $mod+underscore workspace $ws8
  98. bindsym $mod+ccedilla workspace $ws9
  99. bindsym $mod+agrave workspace $ws10
  100.  
  101. # move focused container to workspace
  102. bindsym $mod+Shift+ampersand move container to workspace $ws1
  103. bindsym $mod+Shift+eacute move container to workspace $ws2
  104. bindsym $mod+Shift+quotedbl move container to workspace $ws3
  105. bindsym $mod+Shift+apostrophe move container to workspace $ws4
  106. bindsym $mod+Shift+parenleft move container to workspace $ws5
  107. bindsym $mod+Shift+minus move container to workspace $ws6
  108. bindsym $mod+Shift+egrave move container to workspace $ws7
  109. bindsym $mod+Shift+underscore move container to workspace $ws8
  110. bindsym $mod+Shift+ccedilla move container to workspace $ws9
  111. bindsym $mod+Shift+agrave move container to workspace $ws10
  112.  
  113. # dual monitor settings
  114. #exec_always --no-startup-id xrandr --output HDMI-1 --right-of eDP-1
  115. set $firstmonitor eDP-1
  116. set $secondmonitor HDMI-1
  117.  
  118. workspace $ws1 output $firstmonitor
  119. workspace $ws2 output $firstmonitor
  120. workspace $ws4 output $firstmonitor
  121. workspace $ws3 output $secondmonitor
  122.  
  123. assign [class="Transmission-gtk"] $ws1
  124. assign [class="Firefox"] $ws2
  125. assign [class="Clementine|mpv|vlc"] $ws3
  126. assign [class="Pantheon-files"] $ws4
  127. assign [class="Evince|Transmission-gtk"] $ws6
  128. assign [class="Tor Browser"] $ws7
  129. #
  130. #
  131. #some window parameters
  132. for_window [class="mpv|Tor Browser|Transmission-gtk|vlc|Pavucontrol"] floating enable border normal
  133. for_window [class="Gnome-system-monitor|smplayer|Gnome-calculator"] floating enable border normal
  134. for_window [class="Pidgin"] floating enable border normal
  135.  
  136. # reload the configuration file
  137. bindsym $mod+Shift+c reload
  138. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  139. bindsym $mod+Shift+r restart
  140. # exit i3 (logs you out of your X session)
  141. bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
  142.  
  143. # resize window (you can also use the mouse for that)
  144. mode "resize" {
  145. # These bindings trigger as soon as you enter the resize mode
  146.  
  147. # Pressing left will shrink the window’s width.
  148. # Pressing right will grow the window’s width.
  149. # Pressing up will shrink the window’s height.
  150. # Pressing down will grow the window’s height.
  151. bindsym j resize shrink width 10 px or 10 ppt
  152. bindsym k resize grow height 10 px or 10 ppt
  153. bindsym l resize shrink height 10 px or 10 ppt
  154. bindsym m resize grow width 10 px or 10 ppt
  155.  
  156. # same bindings, but for the arrow keys
  157. bindsym Left resize shrink width 10 px or 10 ppt
  158. bindsym Down resize shrink height 10 px or 10 ppt
  159. bindsym Up resize grow height 10 px or 10 ppt
  160. bindsym Right resize grow width 10 px or 10 ppt
  161.  
  162. # back to normal: Enter or Escape or $mod+r
  163. bindsym Return mode "default"
  164. bindsym Escape mode "default"
  165. bindsym $mod+r mode "default"
  166. }
  167.  
  168. bindsym $mod+r mode "resize"
  169.  
  170.  
  171. # Start i3bar to display a workspace bar (plus the system information i3status
  172. # finds out, if available)
  173.  
  174. bar {
  175. status_command i3blocks -c ~/.i3/i3blocks.conf
  176. position top
  177. #bindsym --release button3 exec scrot '%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/Pictures/' && mplayer ~/.i3/Nikon.ogg
  178. #mode hide
  179. #hidden_state hide
  180. #modifier Mod4
  181. }
  182.  
  183. # Pulse Audio controls
  184. bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 2%+
  185. bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 2%-
  186. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
  187.  
  188. # Screen brightness controls
  189. #bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
  190. #bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
  191. bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
  192. bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
  193.  
  194. # Touchpad controls
  195. #bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
  196. #bindsym XF86TouchpadToggle exec vlc
  197.  
  198. # Media player controls
  199. bindsym XF86AudioPlay exec playerctl play-pause
  200. bindsym XF86AudioPause exec playerctl play-pause
  201. bindsym XF86AudioNext exec playerctl next
  202. bindsym XF86AudioPrev exec playerctl previous
  203.  
  204. #screenshots
  205. bindsym Print exec scrot '%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/Pictures/' && mplayer ~/.i3/Nikon.ogg
  206.  
  207.  
  208. #other keyboard shortcuts
  209. bindsym $mod+l exec betterlockscreen --lock
  210. bindsym mod1+space exec ~/gDrive/gDrive/linux/scripts0/media-controls.sh pp
  211. bindsym mod1+n exec ~/gDrive/gDrive/linux/scripts0/media-controls.sh n
  212. bindsym mod1+b exec ~/gDrive/gDrive/linux/scripts0/media-controls.sh p
  213. bindsym mod1+v exec ~/gDrive/gDrive/linux/scripts0/media-controls.sh v
  214. bindsym mod1+c exec ~/gDrive/gDrive/linux/scripts0/media-controls.sh vv
  215. bindsym mod1+w exec ~/gDrive/gDrive/linux/scripts0/play.sh
  216. bindsym mod1+h exec ~/.i3/wchanger.sh dir
  217. bindsym mod1+j exec ~/.i3/wchanger.sh sdir
  218. bindsym mod1+g exec bash ~/.bash_functions eglllr
  219. bindsym mod1+d exec bash ~/.i3/wchanger.sh
  220. bindsym mod1+p exec ~/gDrive/gDrive/linux/scripts2/playFromClipboard.sh
  221. bindsym mod1+control+p exec "shutter -s=1,1,1920,1080 -d=2"
  222. bindsym control+less exec ~/gDrive/gDrive/linux/scripts2/ws.sh ++
  223. bindsym control+shift+less exec ~/gDrive/gDrive/linux/scripts2/ws.sh --
  224.  
  225. #startup
  226. exec --no-startup-id compton
  227. #exec --no-startup-id google-drive-ocamlfuse ~/gDrive
  228. exec --no-startup-id firefox
  229. #exec --no-startup-id pidgin
  230. exec --no-startup-id mpd
  231. #exec --no-startup-id pantheon-files
  232. exec --no-startup-id ~/.i3/start-conky.sh
  233. exec --no-startup-id ~/.i3/cronscript.sh
  234. exec --no-startup-id ~/.i3/wchanger-engine.sh
  235. exec --no-startup-id redshift
  236. exec_always --no-startup-id numlockx on
  237. #exec_always --no-startup-id compton --config ~/.i3/compton.conf
  238.  
  239. set $mode_display Ext Screen (v) VGA ON, (h) HDMI ON, (x) VGA OFF, (y) HDMI OFF
  240. mode "$mode_display" {
  241. bindsym v exec --no-startup-id xrandr --output VGA1 --auto --right-of LVDS1, mode "default"
  242. bindsym h exec --no-startup-id xrandr --output HDMI1 --auto --right-of LVDS1, mode "default"
  243. bindsym x exec --no-startup-id xrandr --output VGA1 --auto --off, mode "default"
  244. bindsym y exec --no-startup-id xrandr --output HDMI1 --auto --off, mode "default"
  245.  
  246. # back to normal: Enter or Escape
  247. bindsym Return mode "default"
  248. bindsym Escape mode "default"
  249. }
  250. #
  251. #bindsym $mod+x mode "$mode_display"
  252. bindsym $mod+d exec ~/.i3/display.sh
  253. bindsym XF86Display exec ~/.i3/display.sh
  254.  
  255. # multitouch gestures
  256. bindsym --whole-window $mod+button10 workspace prev_on_output
  257. bindsym --whole-window $mod+button11 workspace next_on_output
  258.  
  259. #keyboard layout
  260. exec_always "setxkbmap -model pc104 -layout fr,ar -variant ,, -option grp:alt_shift_toggle"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement