Advertisement
mosaid

my i3 config

Dec 22nd, 2019
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.15 KB | None | 0 0
  1.  
  2. set $mod Mod4
  3. set $altgr mod5
  4.  
  5. #i3-gaps
  6. #gaps inner 12
  7.  
  8. font pango:monospace 12
  9.  
  10. # Use Mouse+$mod to drag floating windows to their wanted position
  11. floating_modifier $mod
  12.  
  13. # start a terminal
  14. #bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
  15. bindsym $mod+Return exec --no-startup-id lxterminal
  16. bindsym $mod+t exec --no-startup-id lxterminal
  17. bindsym mod1+s exec --no-startup-id xterm
  18.  
  19.  
  20.  
  21.  
  22. # kill focused window
  23. bindsym $mod+Shift+Q kill
  24. bindsym mod1+x kill
  25. bindsym button3 floating toggle
  26.  
  27. # start rofi (a program launcher)
  28. bindsym $mod+x exec --no-startup-id "rofi -show combi "
  29. bindsym $mod+w exec --no-startup-id ~/.i3/mylocate.sh
  30. bindsym $mod+c exec --no-startup-id "i3-dmenu-desktop --dmenu='dmenu -b -i -l 49 -fn monospace:20 -p run'"
  31.  
  32. # change focus
  33. #bindsym $mod+j focus left
  34. #bindsym $mod+k focus down
  35. #bindsym $mod+l focus up
  36. #bindsym $mod+m focus right
  37.  
  38. # alternatively, you can use the cursor keys:
  39. bindsym $mod+Left focus left
  40. bindsym $mod+Down focus down
  41. bindsym $mod+Up focus up
  42. bindsym $mod+Right focus right
  43.  
  44. # # move focused window
  45. # bindsym $mod+Shift+j move left
  46. # bindsym $mod+Shift+k move down
  47. # bindsym $mod+Shift+l move up
  48. # bindsym $mod+Shift+M move right
  49.  
  50. # alternatively, you can use the cursor keys:
  51. bindsym $mod+Shift+Left move left
  52. bindsym $mod+Shift+Down move down
  53. bindsym $mod+Shift+Up move up
  54. bindsym $mod+Shift+Right move right
  55.  
  56. # split in horizontal orientation
  57. bindsym $mod+h split h
  58.  
  59. # split in vertical orientation
  60. bindsym $mod+v split v
  61.  
  62. # enter fullscreen mode for the focused container
  63. bindsym $mod+f fullscreen toggle
  64.  
  65. # change container layout (stacked, tabbed, toggle split)
  66. bindsym $mod+s layout stacking
  67. bindsym $mod+z layout tabbed
  68. bindsym $mod+e layout toggle split
  69.  
  70. # toggle tiling / floating
  71. bindsym $mod+Shift+space floating toggle
  72.  
  73. # change focus between tiling / floating windows
  74. bindsym $mod+space focus mode_toggle
  75.  
  76. # focus the parent container
  77. bindsym $mod+q focus parent
  78.  
  79. # focus the child container
  80. #bindsym $mod+d focus child
  81.  
  82. # Define names for default workspaces for which we configure key bindings later on.
  83. # We use variables to avoid repeating the names in multiple places.
  84. set $ws1 "1: root"
  85. set $ws2 "2: net"
  86. set $ws3 "3: Media"
  87. set $ws4 "4: Files"
  88. set $ws5 "5: Work"
  89. set $ws6 "6: Docs"
  90. set $ws7 "7"
  91. set $ws8 "8"
  92. set $ws9 "9"
  93. set $ws10 "10"
  94. set $ws11 "11"
  95. set $ws12 "12"
  96. set $ws13 "13"
  97.  
  98. # switch to workspace
  99. bindsym $mod+ampersand workspace $ws1
  100. bindsym $mod+eacute workspace $ws2
  101. bindsym $mod+quotedbl workspace $ws3
  102. bindsym $mod+apostrophe workspace $ws4
  103. bindsym $mod+parenleft workspace $ws5
  104. bindsym $mod+minus workspace $ws6
  105. bindsym $mod+egrave workspace $ws7
  106. bindsym $mod+underscore workspace $ws8
  107. bindsym $mod+ccedilla workspace $ws9
  108. bindsym $mod+agrave workspace $ws10
  109. bindsym $mod+parenright workspace $ws11
  110. bindsym $mod+equal workspace $ws12
  111. bindsym $mod+control+twosuperior workspace $ws13
  112.  
  113. # switch to workspace
  114. bindsym $mod+control+ampersand workspace "14"
  115. bindsym $mod+control+eacute workspace "15"
  116. bindsym $mod+control+quotedbl workspace "16"
  117. bindsym $mod+control+apostrophe workspace "17"
  118. bindsym $mod+control+parenleft workspace "18"
  119. bindsym $mod+control+minus workspace "19"
  120. bindsym $mod+control+egrave workspace "20"
  121. bindsym $mod+control+underscore workspace "21"
  122. bindsym $mod+control+ccedilla workspace "22"
  123. bindsym $mod+control+agrave workspace "23"
  124. bindsym $mod+control+parenright workspace "24"
  125.  
  126. # move focused container to workspace
  127. bindsym $mod+Shift+ampersand move container to workspace $ws1
  128. bindsym $mod+Shift+eacute move container to workspace $ws2
  129. bindsym $mod+Shift+quotedbl move container to workspace $ws3
  130. bindsym $mod+Shift+apostrophe move container to workspace $ws4
  131. bindsym $mod+Shift+parenleft move container to workspace $ws5
  132. bindsym $mod+Shift+minus move container to workspace $ws6
  133. bindsym $mod+Shift+egrave move container to workspace $ws7
  134. bindsym $mod+Shift+underscore move container to workspace $ws8
  135. bindsym $mod+Shift+ccedilla move container to workspace $ws9
  136. bindsym $mod+Shift+agrave move container to workspace $ws10
  137. bindsym $mod+Shift+parenright move container to workspace $ws11
  138. bindsym $mod+Shift+equal move container to workspace $ws12
  139. bindsym $mod+Shift+twosuperior move container to workspace $ws13
  140.  
  141. # move focused container to workspace
  142. bindsym $mod+control+Shift+ampersand move container to workspace "14"
  143. bindsym $mod+control+Shift+eacute move container to workspace "15"
  144. bindsym $mod+control+Shift+quotedbl move container to workspace "16"
  145. bindsym $mod+control+Shift+apostrophe move container to workspace "17"
  146. bindsym $mod+control+Shift+parenleft move container to workspace "18"
  147. bindsym $mod+control+Shift+minus move container to workspace "19"
  148. bindsym $mod+control+Shift+egrave move container to workspace "20"
  149. bindsym $mod+control+Shift+underscore move container to workspace "21"
  150. bindsym $mod+control+Shift+ccedilla move container to workspace "22"
  151. bindsym $mod+control+Shift+agrave move container to workspace "23"
  152. bindsym $mod+control+Shift+parenright move container to workspace "24"
  153.  
  154. # dual monitor settings
  155. #exec_always --no-startup-id xrandr --output HDMI-1 --right-of eDP-1
  156. set $firstmonitor eDP1
  157. set $secondmonitor HDMI1
  158.  
  159. workspace $ws1 output $firstmonitor
  160. workspace $ws2 output $firstmonitor
  161. workspace $ws3 output $secondmonitor
  162. workspace $ws4 output $firstmonitor
  163. workspace $ws5 output $firstmonitor
  164. workspace $ws6 output $firstmonitor
  165. workspace $ws8 output $firstmonitor
  166. workspace $ws9 output $firstmonitor
  167.  
  168. assign [class="Transmission-gtk"] $ws1
  169. assign [class="Navigator|firefox"] $ws2
  170. assign [class="libreoffice-calc|libreoffice-writer"] $ws5
  171. assign [class="Chromium"] $ws5
  172. assign [class="Tor Browser"] $ws7
  173. assign [class="VirtualBox Manager"] $ws7
  174. assign [class="sqlitebrowser|DB Browser for SQLite"] $ws6
  175. assign [class="Evince"] $ws6
  176. assign [class="VirtualBox Machine|VirtualBox Machine"] $ws6
  177. assign [class="obs|explorer.exe|Wine|huniepop.exe|joey_pc.exe"] $ws11
  178. assign [class="openshot|QtCreator|TeXstudio"] $ws11
  179. #
  180. #
  181. #some window parameters
  182. for_window [class="mpv|Tor Browser|Transmission-gtk|vlc|Pavucontrol"] floating enable border normal
  183. for_window [class="Gnome-system-monitor|smplayer|Gnome-calculator"] floating enable border normal
  184. for_window [class="Pidgin|Woeusbgui|Wicd-client.py"] floating enable border normal
  185. for_window [class="VirtualBox Manager|florence|Florence"] floating enable border normal
  186. for_window [class="TelegramDesktop|Qalculate-gtk"] floating enable border normal
  187. for_window [class="feh"] floating enable move absolute position 0px 0px
  188. #for_window [class="VirtualBox Machine"] floating enable, resize set 1601 900, move position 0 0
  189.  
  190. # reload the configuration file
  191. bindsym $mod+Shift+c reload
  192. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  193. bindsym $mod+Shift+r restart
  194. # exit i3 (logs you out of your X session)
  195. bindsym $mod+Shift+e exec --no-startup-id "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'"
  196.  
  197. # resize window (you can also use the mouse for that)
  198. mode "resize" {
  199. # These bindings trigger as soon as you enter the resize mode
  200.  
  201. # Pressing left will shrink the window’s width.
  202. # Pressing right will grow the window’s width.
  203. # Pressing up will shrink the window’s height.
  204. # Pressing down will grow the window’s height.
  205. bindsym j resize shrink width 10 px or 10 ppt
  206. bindsym k resize grow height 10 px or 10 ppt
  207. bindsym l resize shrink height 10 px or 10 ppt
  208. bindsym m resize grow width 10 px or 10 ppt
  209.  
  210. # same bindings, but for the arrow keys
  211. bindsym Left resize shrink width 10 px or 10 ppt
  212. bindsym Down resize shrink height 10 px or 10 ppt
  213. bindsym Up resize grow height 10 px or 10 ppt
  214. bindsym Right resize grow width 10 px or 10 ppt
  215.  
  216. # back to normal: Enter or Escape or $mod+r
  217. bindsym Return mode "default"
  218. bindsym Escape mode "default"
  219. bindsym $mod+r mode "default"
  220. }
  221.  
  222. bindsym $mod+r mode "resize"
  223.  
  224.  
  225. # Start i3bar to display a workspace bar (plus the system information i3status
  226. # finds out, if available)
  227.  
  228. bar {
  229. #mode hide
  230. #hidden_state hide
  231. #modifier Mod1
  232. font pango:FontAwesome Bold 14
  233. status_command i3blocks -c ~/.i3/i3blocks.conf
  234. position top
  235. #bindsym --release button3 exec --no-startup-id scrot '%Y-%m-%d-%s_$wx$h.png' -e 'mv $f ~/Pictures/' && mplayer ~/.i3/Nikon.ogg
  236. #mode hide
  237. #hidden_state hide
  238. #modifier Mod4
  239. }
  240.  
  241. # Pulse Audio controls
  242. bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 2%+
  243. bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 2%-
  244. bindsym XF86AudioMute exec --no-startup-id --no-startup-id pactl set-sink-mute 0 toggle # mute sound
  245.  
  246. # Screen brightness controls
  247. #bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 20 # increase screen brightness
  248. #bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 20 # decrease screen brightness
  249. bindsym XF86MonBrightnessUp exec --no-startup-id light -A 5 # increase screen brightness
  250. bindsym XF86MonBrightnessDown exec --no-startup-id light -U 5 # decrease screen brightness
  251.  
  252. # Touchpad controls
  253. #bindsym XF86TouchpadToggle exec --no-startup-id /some/path/toggletouchpad.sh # toggle touchpad
  254. #bindsym XF86TouchpadToggle exec --no-startup-id vlc
  255.  
  256. # Media player controls
  257. bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
  258. bindsym XF86AudioPause exec --no-startup-id playerctl play-pause
  259. bindsym XF86AudioNext exec --no-startup-id playerctl next
  260. bindsym XF86AudioPrev exec --no-startup-id playerctl previous
  261.  
  262. #screenshots
  263. bindsym Print exec --no-startup-id ~/.i3/screenshot.sh 1
  264. bindsym mod1+control+p exec --no-startup-id ~/.i3/screenshot.sh 1
  265. bindsym mod1+control+o exec --no-startup-id ~/.i3/screenshot.sh 2
  266.  
  267. #other keyboard shortcuts
  268. bindsym $mod+l exec --no-startup-id betterlockscreen --lock
  269. bindsym $mod+n exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/playFromClipboard.sh npr
  270. bindsym $mod+m exec --no-startup-id ~/.i3/user.sh menu
  271. bindsym mod1+space exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts0/media-controls.sh pp
  272. bindsym mod1+n exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts0/media-controls.sh n
  273. bindsym mod1+b exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts0/media-controls.sh p
  274. bindsym mod1+v exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts0/media-controls.sh v
  275. bindsym mod1+c exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts0/media-controls.sh vv
  276. bindsym mod1+r exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts0/media-controls.sh r
  277. bindsym mod1+w exec --no-startup-id ~/.i3/pplay/play.sh
  278. bindsym mod1+f exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts1/conkyfont.sh
  279. bindsym mod1+d exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/myBash_functions.sh eglllr
  280. bindsym mod1+t exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/myBash_functions.sh ttor
  281. bindsym control+less exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/ws.sh ++
  282. bindsym control+shift+less exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/ws.sh --
  283.  
  284. #startup
  285. #exec --no-startup-id wicd-gtk -t
  286. #exec --no-startup-id google-drive-ocamlfuse ~/gDrive
  287. #exec --no-startup-id firefox
  288. #exec --no-startup-id pidgin
  289. exec --no-startup-id mpd
  290. exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent
  291. exec --no-startup-id nm-applet
  292. exec --no-startup-id transmission-gtk -m
  293. exec --no-startup-id udiskie
  294. exec --no-startup-id ~/.i3/start-conky.sh
  295. exec --no-startup-id ~/.i3/prayerTime.sh
  296. exec --no-startup-id ~/.i3/pplay/pplayEngine.sh
  297. exec --no-startup-id ~/.i3/wchanger/wchanger-engine.sh
  298. exec --no-startup-id ~/.i3/onedriveMonitor.sh
  299. exec --no-startup-id redshift
  300. exec_always --no-startup-id numlockx on
  301. exec_always --no-startup-id picom --config ~/.i3/picom.conf
  302. exec_always --no-startup-id xkb-switch --i3
  303.  
  304. set $mode_display Mirrored (c) , Ext Screen (v) , HDMI ON (b) , HDMI OFF (n)
  305. mode "$mode_display" {
  306. bindsym c exec --no-startup-id ~/.i3/display.sh mirrored , mode "default"
  307. bindsym v exec --no-startup-id ~/.i3/display.sh extended , mode "default"
  308. bindsym b exec --no-startup-id ~/.i3/display.sh mirrored , mode "default"
  309. bindsym n exec --no-startup-id ~/.i3/display.sh default , mode "default"
  310.  
  311. bindsym Return mode "default"
  312. bindsym Escape mode "default"
  313. }
  314. #
  315. bindsym $mod+d mode "$mode_display"
  316. #bindsym $mod+d exec --no-startup-id ~/.i3/display.sh
  317. #bindsym XF86Display exec --no-startup-id ~/.i3/display.sh
  318.  
  319. # multitouch gestures
  320. bindsym --whole-window $mod+button10 workspace prev_on_output
  321. bindsym --whole-window $mod+button11 workspace next_on_output
  322.  
  323. #keyboard layout
  324. exec_always --no-startup-id "setxkbmap -model pc104 -layout fr,ar -variant ,, -option grp:alt_shift_toggle"
  325.  
  326. #switch to greeter and login
  327. #bindsym $mod+twosuperior exec dm-tool switch-to-greeter
  328.  
  329.  
  330. set $playFromClipboard play From ClipBoard (c), play next youtube video (v)
  331. mode "$playFromClipboard" {
  332.  
  333. bindsym c exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/playFromClipboard.sh
  334. bindsym v exec --no-startup-id ~/OneDrive/OneDrive/linux/scripts2/playFromClipboard.sh n
  335.  
  336. bindsym Escape mode "default"
  337. }
  338.  
  339. bindsym mod1+p mode "$playFromClipboard"
  340.  
  341. set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
  342. mode "$mode_system" {
  343. bindsym l exec --no-startup-id i3exit.sh lock, mode "default"
  344. bindsym e exec --no-startup-id i3exit.sh logout, mode "default"
  345. bindsym s exec --no-startup-id i3exit.sh suspend, mode "default"
  346. bindsym h exec --no-startup-id i3exit.sh hibernate, mode "default"
  347. bindsym r exec --no-startup-id i3exit.sh reboot, mode "default"
  348. bindsym Shift+s exec --no-startup-id i3exit.sh shutdown, mode "default"
  349.  
  350. # back to normal: Enter or Escape
  351. bindsym Return mode "default"
  352. bindsym Escape mode "default"
  353. }
  354. bindsym $mod+Shift+s mode "$mode_system"
  355.  
  356. #wallpaper changer keys
  357. bindsym mod1+g exec --no-startup-id ~/.i3/wchanger/wchanger.sh p
  358. bindsym mod1+h exec --no-startup-id ~/.i3/wchanger/wchanger.sh dir
  359. bindsym mod1+j exec --no-startup-id ~/.i3/wchanger/wchanger.sh fav
  360. bindsym mod1+k exec --no-startup-id ~/.i3/wchanger/wchanger.sh sdd
  361. bindsym mod1+l exec --no-startup-id ~/.i3/wchanger/wchanger.sh stt
  362. bindsym mod1+m exec --no-startup-id ~/.i3/wchanger/wchanger.sh u
  363. bindsym mod1+comma exec --no-startup-id ~/.i3/wchanger/wchanger.sh -
  364. bindsym mod1+semicolon exec --no-startup-id ~/.i3/wchanger/wchanger.sh +
  365. bindsym mod1+colon exec --no-startup-id ~/.i3/wchanger/wchanger.sh fix
  366. bindsym mod1+exclam exec --no-startup-id ~/.i3/wchanger/wchanger.sh list
  367. bindsym mod1+ugrave exec --no-startup-id ~/.i3/wchanger/wchanger.sh af
  368. bindsym mod1+asterisk exec --no-startup-id ~/.i3/wchanger/wchanger.sh rf
  369. bindsym mod1+dead_circumflex exec --no-startup-id ~/.i3/wchanger/wchanger.sh setmode
  370. bindsym mod1+dollar exec --no-startup-id ~/.i3/wchanger/wchanger.sh x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement