Fixed some configuration lines for i3

The focus_follows_mouse line had a typo which prevented the option to be
off.

The launch shortcut that use the variables were also broken, fixed that
This commit is contained in:
Lucien Cartier-Tilet 2019-12-05 16:01:37 +01:00
parent 61e1815a69
commit 95568e0181
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 191 additions and 160 deletions

View File

@ -101,6 +101,7 @@
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-27f4474a-e037-4e40-b33a-7fe34ca012e3 :CUSTOM_ID: h-27f4474a-e037-4e40-b33a-7fe34ca012e3
:HEADER-ARGS: :exports code :tangle config##yadm.j2 :HEADER-ARGS: :exports code :tangle config##yadm.j2
:HEADER-ARGS:python: :exports none :tangle no
:END: :END:
** Global ** Global
:PROPERTIES: :PROPERTIES:
@ -123,9 +124,6 @@
call the terminal itself. If I ever need to move from my current terminal, I call the terminal itself. If I ever need to move from my current terminal, I
will just have to change the name of the executable here. will just have to change the name of the executable here.
Finally, some variables hold some long strings for commands I dont want to
have to type multiple times.
#+NAME: variable-table #+NAME: variable-table
| variable | value | | variable | value |
|-------------+--------------------------------------------------------------------------| |-------------+--------------------------------------------------------------------------|
@ -136,34 +134,65 @@
| $left | Left | | $left | Left |
| $right | Right | | $right | Right |
| $term | st | | $term | st |
| $exiti3 | i3-nagbar -t warning -m 'Leave i3?' -b 'Yes' 'i3-msg exit' |
#+NAME: variable-sh
| $exiti3 | i3-nagbar -t warning -m "Leave i3?" -b "Yes" "i3-msg exit" |
| $lockscreen | Lucien Cartier-Tilet\n(Phuntsok Drak-pa)\n+33 (0)6 83 90 56 89 | | $lockscreen | Lucien Cartier-Tilet\n(Phuntsok Drak-pa)\n+33 (0)6 83 90 56 89 |
| $rofiexec | rofi -combi-modi window,drun -show combi -mohh combi -m -1 -show-icons | | $rofiexec | rofi -combi-modi 'window,drun' -show combi -mohh combi -m -1 -show-icons |
| $gnus | emacsclient --create-frame --eval '(gnus)' -a nvim -n | | $gnus | emacsclient --create-frame --eval "(gnus)" -n |
| $ec | emacsclient --create-frame -a nvim -n | | $ec | emacsclient --create-frame -n |
| $walset | wal -i ~/Pictures/Wallpapers -o wal-set |
Variables will be set like so. Variables will be set like so.
#+BEGIN_SRC conf :tangle no :exports code #+BEGIN_SRC conf :tangle no
set $term st set $term st
#+END_SRC #+END_SRC
#+NAME: generate-variables #+NAME: generate-variables
#+BEGIN_SRC python :var variables=variable-table :exports none :tangle no #+BEGIN_SRC python :var variables=variable-table :cache yes
result = '' result = ''
for line in variables: for line in variables:
result += "set {0} {1}\n".format(line[0], line[1]) result += "set {0}\t{1}\n".format(line[0], line[1])
return result return result
#+END_SRC #+END_SRC
#+RESULTS[daefb71e1df094fad8f60b95c8b00730d5110ae3]: generate-variables
: set $mod Mod4
: set $alt Mod1
: set $up Up
: set $down Down
: set $left Left
: set $right Right
: set $term st
Finally, some variables hold some long strings for commands I dont want to
have to type multiple times.
#+NAME: generate-variables2
#+BEGIN_SRC python :var variables=variable-sh :cache yes
result = ''
for line in variables:
result += "set {0}\t\"{1}\"\n".format(line[0], line[1])
return result
#+END_SRC
#+RESULTS[caa4fad487ab743e5398c357542b25eaa2b792cf]: generate-variables2
: set $exiti3 "i3-nagbar -t warning -m "Leave i3?" -b "Yes" "i3-msg exit""
: set $lockscreen "Lucien Cartier-Tilet\n(Phuntsok Drak-pa)\n+33 (0)6 83 90 56 89"
: set $rofiexec "rofi -combi-modi "window,drun" -show combi -mohh combi -m -1 -show-icons"
: set $gnus "emacsclient --create-frame --eval "(gnus)" -n"
: set $ec "emacsclient --create-frame -n"
: set $walset "wal -i ~/Pictures/Wallpapers -o wal-set"
Here is the configuration: Here is the configuration:
#+BEGIN_SRC conf :noweb yes #+BEGIN_SRC conf :noweb yes
<<generate-variables()>> <<generate-variables()>>
<<generate-variables2()>>
#+END_SRC #+END_SRC
Now comes the font for the window tiles. Honestly, this setting is useless Now comes the font for the window tiles. Honestly, this setting is useless
since we do not see it, but lets set it anyway. since we do not see it, but lets set it anyway.
#+BEGIN_SRC conf #+BEGIN_SRC conf
font DejaVuSans:monospace 8 font Fira Sans Book:style=Book:pixelsize=10
#+END_SRC #+END_SRC
** Floating windows ** Floating windows
@ -207,7 +236,7 @@
that the software mouse will most likely end up in another window I do not that the software mouse will most likely end up in another window I do not
want to focus. want to focus.
#+BEGIN_SRC conf #+BEGIN_SRC conf
focus_follow_mouse off focus_follows_mouse no
#+END_SRC #+END_SRC
** Popup handling ** Popup handling
@ -252,7 +281,7 @@
I also do not want to see any window border, so I will be turning this I also do not want to see any window border, so I will be turning this
setting off. setting off.
#+BEGIN_SRC conf #+BEGIN_SRC conf
smart_borders off smart_borders on
#+END_SRC #+END_SRC
By the way, the default border is invisible, since it is zero pixels wide. By the way, the default border is invisible, since it is zero pixels wide.
@ -265,7 +294,7 @@
between my containers. between my containers.
#+BEGIN_SRC conf #+BEGIN_SRC conf
gaps inner 20 gaps inner 20
gaps outter -10 gaps outer -10
#+END_SRC #+END_SRC
And I am not using i3-gaps-rounded for nothing: my containers that are not And I am not using i3-gaps-rounded for nothing: my containers that are not
@ -293,6 +322,7 @@
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h-21870449-7730-4164-8add-167cb4e75218 :CUSTOM_ID: h-21870449-7730-4164-8add-167cb4e75218
:HEADER-ARGS: :exports code :HEADER-ARGS: :exports code
:HEADER-ARGS:python: :exports none :tangle no
:END: :END:
I decided to bind some windows to some workspaces in order to have a better I decided to bind some windows to some workspaces in order to have a better
organization of my desktop. organization of my desktop.
@ -317,7 +347,7 @@
#+END_SRC #+END_SRC
#+NAME: generate-workspaces #+NAME: generate-workspaces
#+BEGIN_SRC python :var workspaces=assignment-table :exports none #+BEGIN_SRC python :var workspaces=assignment-table
results = '' results = ''
for line in workspaces: for line in workspaces:
results += 'assign [class="{0}"] {1}\n'.format(line[1],line[2]) results += 'assign [class="{0}"] {1}\n'.format(line[1],line[2])
@ -358,7 +388,7 @@
#+BEGIN_SRC python :exports none :var table=[] :eval yes :tangle no #+BEGIN_SRC python :exports none :var table=[] :eval yes :tangle no
results = '' results = ''
for line in table: for line in table:
results += "bindsym {0} {1}\n".format(line[0], line[1]) results += "bindsym {0}\t{1}\n".format(line[0], line[1])
return results return results
#+END_SRC #+END_SRC
@ -401,8 +431,8 @@
wallpaper and will generate my systems color configuration from it. wallpaper and will generate my systems color configuration from it.
#+NAME: wal-sh #+NAME: wal-sh
| shortcut | command | what it does | | shortcut | command | what it does |
|-------------+------------------------------------------------+--------------------------------------------------------------| |-------------+--------------+--------------------------------------------------------------|
| $mod+Ctrl+w | exec "wal -i ~/Pictures/Wallpapers -o wal-set" | Set a random wallpaper and generates a color profile from it | | $mod+Ctrl+w | exec $walset | Set a random wallpaper and generates a color profile from it |
We also have some shortcuts to lock our screen, sleep, hibernate and shut We also have some shortcuts to lock our screen, sleep, hibernate and shut
down our computer. down our computer.
@ -514,10 +544,10 @@
#+NAME: containers-move-sh #+NAME: containers-move-sh
| shortcut | command | what it does | | shortcut | command | what it does |
|-------------------+--------------------------------+------------------------------------------------------------| |-------------------+--------------------------------+------------------------------------------------------------|
| $mod+Shift+$left | move container to output left | Moves the container to the screen left of the current one | | $mod+Ctrl+$left | move container to output left | Moves the container to the screen left of the current one |
| $mod+Shift+$down | move container to output down | Moves the container to the screen down of the current one | | $mod+Ctrl+$down | move container to output down | Moves the container to the screen down of the current one |
| $mod+Shift+$up | move container to output up | Moves the container to the screen above the current one | | $mod+Ctrl+$up | move container to output up | Moves the container to the screen above the current one |
| $mod+Shift+$right | move container to output right | Moves the container to the screen right of the current one | | $mod+Ctrl+$right | move container to output right | Moves the container to the screen right of the current one |
You can also send containers to other workspaces by their number. You can also send containers to other workspaces by their number.
#+NAME: containers-ws-sh #+NAME: containers-ws-sh
@ -691,8 +721,8 @@
|-------------------+-----------------------------------------------+------------------------------| |-------------------+-----------------------------------------------+------------------------------|
| $mod+g | gaps inner current plus 5 | Increase the inner gap size | | $mod+g | gaps inner current plus 5 | Increase the inner gap size |
| $mod+Shift+g | gaps inner current minus 5 | Decrease the inner gap size | | $mod+Shift+g | gaps inner current minus 5 | Decrease the inner gap size |
| $mod+Ctrl+g | gaps outer current plus 5 | Increase the outter gap size | | $mod+Ctrl+g | gaps outer current plus 5 | Increase the outer gap size |
| $mod+Ctrl+Shift+g | gaps outer current minus 5 | Decrease the outter gap size | | $mod+Ctrl+Shift+g | gaps outer current minus 5 | Decrease the outer gap size |
| $mod+$alt+g | gaps inner all set 20; gaps outer all set -10 | Reset gaps | | $mod+$alt+g | gaps inner all set 20; gaps outer all set -10 | Reset gaps |
Here is the corresponding configuration: Here is the corresponding configuration:

View File

@ -7,19 +7,20 @@ set $down Down
set $left Left set $left Left
set $right Right set $right Right
set $term st set $term st
set $exiti3 i3-nagbar -t warning -m 'Leave i3?' -b 'Yes' 'i3-msg exit' set $exiti3 "i3-nagbar -t warning -m "Leave i3?" -b "Yes" "i3-msg exit""
set $lockscreen Lucien Cartier-Tilet\n(Phuntsok Drak-pa)\n+33 (0)6 83 90 56 89 set $lockscreen "Lucien Cartier-Tilet\n(Phuntsok Drak-pa)\n+33 (0)6 83 90 56 89"
set $rofiexec rofi -combi-modi window,drun -show combi -mohh combi -m -1 -show-icons set $rofiexec "rofi -combi-modi 'window,drun' -show combi -mohh combi -m -1 -show-icons"
set $gnus emacsclient --create-frame --eval '(gnus)' -a nvim -n set $gnus "emacsclient --create-frame --eval "(gnus)" -n"
set $ec emacsclient --create-frame -a nvim -n set $ec "emacsclient --create-frame -n"
set $walset "wal -i ~/Pictures/Wallpapers -o wal-set"
font DejaVuSans:monospace 8 font Fira Sans Book:style=Book:pixelsize=10
floating_modifier $mod floating_modifier $mod
mouse_warping none mouse_warping none
focus_follow_mouse off focus_follows_mouse no
popup_during_fullscreen leave_fullscreen popup_during_fullscreen leave_fullscreen
@ -27,12 +28,12 @@ workspace_auto_back_and_forth yes
smart_gaps on smart_gaps on
smart_borders off smart_borders on
default_border pixel 0 default_border pixel 0
gaps inner 20 gaps inner 20
gaps outter -10 gaps outer -10
border_radius 5 border_radius 5
@ -70,7 +71,7 @@ bindsym $mod+Shift+h exec $term htop
bindsym $mod+Shift+c exec yadm alt && i3-msg reload bindsym $mod+Shift+c exec yadm alt && i3-msg reload
bindsym $mod+Shift+r exec yadm alt && i3-msg restart bindsym $mod+Shift+r exec yadm alt && i3-msg restart
bindsym $mod+Shift+e exec $exiti3 bindsym $mod+Shift+e exec $exiti3
bindsym $mod+Ctrl+w exec "wal -i ~/Pictures/Wallpapers -o wal-set" bindsym $mod+Ctrl+w exec $walset
bindsym $mod+l i3lock -fol bindsym $mod+l i3lock -fol
bindsym $mod+$alt+h exec "systemctl suspend" bindsym $mod+$alt+h exec "systemctl suspend"
bindsym $mod+Ctrl+h exec "systemctl hibernate" bindsym $mod+Ctrl+h exec "systemctl hibernate"
@ -100,10 +101,10 @@ bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right bindsym $mod+Shift+$right move right
bindsym $mod+Shift+$left move container to output left bindsym $mod+Ctrl+$left move container to output left
bindsym $mod+Shift+$down move container to output down bindsym $mod+Ctrl+$down move container to output down
bindsym $mod+Shift+$up move container to output up bindsym $mod+Ctrl+$up move container to output up
bindsym $mod+Shift+$right move container to output right bindsym $mod+Ctrl+$right move container to output right
bindsym $mod+Shift+1 move container to workspace 1 bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2 bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3 bindsym $mod+Shift+3 move container to workspace 3