removed generated i3 config, which now does not rely on yadm
This commit is contained in:
		
							parent
							
								
									2bd06d9558
								
							
						
					
					
						commit
						6466dca44b
					
				@ -1,226 +0,0 @@
 | 
			
		||||
# -*- mode: conf -*-
 | 
			
		||||
 | 
			
		||||
set $mod    Mod4
 | 
			
		||||
set $alt    Mod1
 | 
			
		||||
set $up    Up
 | 
			
		||||
set $down    Down
 | 
			
		||||
set $left    Left
 | 
			
		||||
set $right    Right
 | 
			
		||||
set $term    st
 | 
			
		||||
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"
 | 
			
		||||
 | 
			
		||||
font Fira Sans Book:style=Book:pixelsize=10
 | 
			
		||||
 | 
			
		||||
floating_modifier $mod
 | 
			
		||||
 | 
			
		||||
mouse_warping none
 | 
			
		||||
 | 
			
		||||
focus_follows_mouse no
 | 
			
		||||
 | 
			
		||||
popup_during_fullscreen leave_fullscreen
 | 
			
		||||
 | 
			
		||||
workspace_auto_back_and_forth yes
 | 
			
		||||
 | 
			
		||||
smart_gaps on
 | 
			
		||||
 | 
			
		||||
smart_borders on
 | 
			
		||||
 | 
			
		||||
default_border pixel 0
 | 
			
		||||
 | 
			
		||||
gaps inner 20
 | 
			
		||||
gaps outer -10
 | 
			
		||||
 | 
			
		||||
border_radius 5
 | 
			
		||||
 | 
			
		||||
set_from_resource $fg i3wm.color7 #f0f0f0
 | 
			
		||||
set_from_resource $bg i3wm.color2 #f0f0f0
 | 
			
		||||
 | 
			
		||||
# class                 border  backgr. text indicator child_border
 | 
			
		||||
client.focused          $bg     $bg     $fg  $bg       $bg
 | 
			
		||||
client.focused_inactive $bg     $bg     $fg  $bg       $bg
 | 
			
		||||
client.unfocused        $bg     $bg     $fg  $bg       $bg
 | 
			
		||||
client.urgent           $bg     $bg     $fg  $bg       $bg
 | 
			
		||||
client.placeholder      $bg     $bg     $fg  $bg       $bg
 | 
			
		||||
 | 
			
		||||
assign [class="Emacs"] 2
 | 
			
		||||
assign [class="Chromium"] 3
 | 
			
		||||
assign [class="firefox"] 3
 | 
			
		||||
assign [class="Nemo"] 4
 | 
			
		||||
assign [class="Godot"] 5
 | 
			
		||||
assign [class="Gimp*"] 6
 | 
			
		||||
assign [class="gnome-boxes"] 8
 | 
			
		||||
assign [class="Steam"] 9
 | 
			
		||||
assign [class="discord"] 10
 | 
			
		||||
 | 
			
		||||
{% if YADM_HOSTNAME == 'Marpa' -%}
 | 
			
		||||
workspace 10 output eDP-1
 | 
			
		||||
{% endif -%}
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Return    exec $term
 | 
			
		||||
bindsym $mod+$alt+Return    split h;; exec $term
 | 
			
		||||
bindsym $mod+Shift+Return    split v;; exec $term
 | 
			
		||||
bindsym $mod+$alt+m    exec $term ssh Mila
 | 
			
		||||
bindsym $mod+$alt+n    exec $term ssh Naro
 | 
			
		||||
bindsym $mod+Shift+h    exec $term htop
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+c    exec yadm alt && i3-msg reload
 | 
			
		||||
bindsym $mod+Shift+r    exec yadm alt && i3-msg restart
 | 
			
		||||
bindsym $mod+Shift+e    exec $exiti3
 | 
			
		||||
bindsym $mod+Ctrl+w    exec $walset
 | 
			
		||||
bindsym $mod+l    exec i3lock -fol
 | 
			
		||||
bindsym $mod+$alt+h    exec "systemctl suspend"
 | 
			
		||||
bindsym $mod+Ctrl+h    exec "systemctl hibernate"
 | 
			
		||||
bindsym $mod+Shift+F4    exec poweroff
 | 
			
		||||
 | 
			
		||||
bindsym $mod+h    split h
 | 
			
		||||
bindsym $mod+v    split v
 | 
			
		||||
 | 
			
		||||
bindsym $mod+$left    focus left
 | 
			
		||||
bindsym $mod+$down    focus down
 | 
			
		||||
bindsym $mod+$up    focus up
 | 
			
		||||
bindsym $mod+$right    focus right
 | 
			
		||||
 | 
			
		||||
bindsym $mod+1    workspace 1
 | 
			
		||||
bindsym $mod+2    workspace 2
 | 
			
		||||
bindsym $mod+3    workspace 3
 | 
			
		||||
bindsym $mod+4    workspace 4
 | 
			
		||||
bindsym $mod+5    workspace 5
 | 
			
		||||
bindsym $mod+6    workspace 6
 | 
			
		||||
bindsym $mod+7    workspace 7
 | 
			
		||||
bindsym $mod+8    workspace 8
 | 
			
		||||
bindsym $mod+9    workspace 9
 | 
			
		||||
bindsym $mod+0    workspace 10
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+$left    move left
 | 
			
		||||
bindsym $mod+Shift+$down    move down
 | 
			
		||||
bindsym $mod+Shift+$up    move up
 | 
			
		||||
bindsym $mod+Shift+$right    move right
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Ctrl+$left    move container to output left
 | 
			
		||||
bindsym $mod+Ctrl+$down    move container to output down
 | 
			
		||||
bindsym $mod+Ctrl+$up    move container to output up
 | 
			
		||||
bindsym $mod+Ctrl+$right    move container to output right
 | 
			
		||||
bindsym $mod+Shift+1    move container to workspace 1
 | 
			
		||||
bindsym $mod+Shift+2    move container to workspace 2
 | 
			
		||||
bindsym $mod+Shift+3    move container to workspace 3
 | 
			
		||||
bindsym $mod+Shift+4    move container to workspace 4
 | 
			
		||||
bindsym $mod+Shift+5    move container to workspace 5
 | 
			
		||||
bindsym $mod+Shift+6    move container to workspace 6
 | 
			
		||||
bindsym $mod+Shift+7    move container to workspace 7
 | 
			
		||||
bindsym $mod+Shift+8    move container to workspace 8
 | 
			
		||||
bindsym $mod+Shift+9    move container to workspace 9
 | 
			
		||||
bindsym $mod+Shift+0    move container to workspace 10
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Ctrl+Shift+$left    move workspace to output left
 | 
			
		||||
bindsym $mod+Ctrl+Shift+$down    move workspace to output down
 | 
			
		||||
bindsym $mod+Ctrl+Shift+$up    move workspace to output up
 | 
			
		||||
bindsym $mod+Ctrl+Shift+$right    move workspace to output right
 | 
			
		||||
 | 
			
		||||
bindsym $mod+q    kill
 | 
			
		||||
bindsym $alt+F4    kill
 | 
			
		||||
 | 
			
		||||
bindsym $mod+f    fullscreen toggle
 | 
			
		||||
bindsym $mod+r    mode "resize"
 | 
			
		||||
mode "resize" {
 | 
			
		||||
    bindsym $right    resize grow width 20 px or 10 ppt
 | 
			
		||||
    bindsym r    resize grow width 20 px or 10 ppt
 | 
			
		||||
    bindsym $left    resize shrink width 10 px or 5 ppt
 | 
			
		||||
    bindsym c    resize shrink width 10 px or 5 ppt
 | 
			
		||||
    bindsym $down    resize grow height 10 px or 5 ppt
 | 
			
		||||
    bindsym t    resize grow height 10 px or 5 ppt
 | 
			
		||||
    bindsym $up    resize shrink height 10 px or 5 ppt
 | 
			
		||||
    bindsym s    resize shrink height 10 px or 5 ppt
 | 
			
		||||
    bindsym Return    mode "default"
 | 
			
		||||
    bindsym Escape    mode "default"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+space    floating toggle
 | 
			
		||||
bindsym $mod+space    focus mode_toggle
 | 
			
		||||
bindsym $mod+Ctrl+c    move position center
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+s    move scratchpad
 | 
			
		||||
bindsym $mod+s    scratchpad show
 | 
			
		||||
bindsym $mod+Ctrl+s    sticky toggle
 | 
			
		||||
 | 
			
		||||
bindsym $mod+g    gaps inner current plus 5
 | 
			
		||||
bindsym $mod+Shift+g    gaps inner current minus 5
 | 
			
		||||
bindsym $mod+Ctrl+g    gaps outer current plus 5
 | 
			
		||||
bindsym $mod+Ctrl+Shift+g    gaps outer current minus 5
 | 
			
		||||
bindsym $mod+$alt+g    gaps inner all set 20; gaps outer all set -10
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+d    exec --no-startup-id j4-dmenu-desktop
 | 
			
		||||
bindsym $mod+d    exec --no-startup-id $rofiexec
 | 
			
		||||
 | 
			
		||||
bindsym $mod+b    exec firefox
 | 
			
		||||
bindsym $mod+m    exec $gnus
 | 
			
		||||
bindsym Ctrl+Shift+d    exec discord-canary
 | 
			
		||||
 | 
			
		||||
bindsym Print    exec --no-startup-id scrot
 | 
			
		||||
bindsym Ctrl+Print    exec --no-startup-id "scrot -s"
 | 
			
		||||
bindsym Shift+Print    exec --no-startup-id "scrot -d 3"
 | 
			
		||||
 | 
			
		||||
bindsym XF86MonBrightnessUp    exec xbacklight -inc 5
 | 
			
		||||
bindsym $mod+$alt+Next    exec xbacklight -inc 5
 | 
			
		||||
bindsym XF86MonBrightnessDown    exec xbacklight -dec 5
 | 
			
		||||
bindsym $mod+$alt+Prev    exec xbacklight -dec 5
 | 
			
		||||
 | 
			
		||||
bindsym XF86AudioNext    exec mpc next
 | 
			
		||||
bindsym $alt+XF86AudioRaiseVolume    exec mpc next
 | 
			
		||||
bindsym $mod+Next    exec mpc next
 | 
			
		||||
bindsym XF86AudioPrev    exec mpc prev
 | 
			
		||||
bindsym $alt+XF86AudioLowerVolume    exec mpc prev
 | 
			
		||||
bindsym $mod+Prior    exec mpc prev
 | 
			
		||||
bindsym XF86AudioPlay    exec mpc toggle
 | 
			
		||||
bindsym $mod+p    exec mpc toggle
 | 
			
		||||
bindsym $mod+$alt+p    exec mpc stop
 | 
			
		||||
bindsym XF86AudioStop    exec mpc stop
 | 
			
		||||
bindsym $alt+XF86AudioPlay    exec mpc stop
 | 
			
		||||
bindsym $mod+$alt+7    exec mpc volume +5
 | 
			
		||||
bindsym $mod+$alt+8    exec mpc volume -5
 | 
			
		||||
bindsym $mod+Shift+n    exec $term ncmpcpp -q
 | 
			
		||||
bindsym $mod+Shift+v    exec $term ncmpcpp -qs visualizer
 | 
			
		||||
bindsym XF86AudioMute    exec "amixer set Master 1+ toggle"
 | 
			
		||||
bindsym Ctrl+$mod+Prior    exec "amixer -q set Master 2%+ unmute"
 | 
			
		||||
bindsym XF86AudioRaiseVolume    exec "amixer -q set Master 2%+ unmute"
 | 
			
		||||
bindsym Ctrl+$mod+Next    exec "amixer -q set Master 2%- unmute"
 | 
			
		||||
bindsym XF86AudioLowerVolume    exec "amixer -q set Master 2%- unmute"
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+p    exec rofi-pass --type
 | 
			
		||||
bindsym $mod+Ctrl+Shift+p    exec rofi-pass
 | 
			
		||||
bindsym $mod+Ctrl+m    exec rofi-mount
 | 
			
		||||
bindsym $mod+Ctrl+u    exec rofi-umount
 | 
			
		||||
bindsym $mod+$alt+e    exec rofi-emoji
 | 
			
		||||
bindsym $mod+w    exec wacom-setup
 | 
			
		||||
bindsym $mod+Shift+w    exec connect-wifi
 | 
			
		||||
 | 
			
		||||
bindsym $mod+e    exec $ec
 | 
			
		||||
bindsym $mod+n    exec nemo
 | 
			
		||||
bindsym $mod+$alt+c    exec speedcrunch
 | 
			
		||||
bindsym $mod+F3    exec arandr
 | 
			
		||||
 | 
			
		||||
{% if YADM_HOSTNAME == 'Marpa' -%}
 | 
			
		||||
bindsym $mod+Ctrl+p xrandr --output HDMI-1 --mode 1024x768 --right-of eDP-1
 | 
			
		||||
{% else -%}
 | 
			
		||||
bindsym $mod+Ctrl+p xrandr --output VGA1 --mode 1024x768 --right-of LVDS1
 | 
			
		||||
{% endif -%}
 | 
			
		||||
 | 
			
		||||
{% if YADM_HOSTNAME == 'Gampo' -%}
 | 
			
		||||
exec --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
 | 
			
		||||
{% endif -%}
 | 
			
		||||
exec_always --no-startup-id wal -i "$(< "${HOME}/.cache/wal/wal")"
 | 
			
		||||
exec --no-startup-id xss-lock -- i3lock -fol
 | 
			
		||||
exec --no-startup-id dunst -config ~/.config/dunst/dunstrc
 | 
			
		||||
exec --no-startup-id xrdb $HOME/.Xresources
 | 
			
		||||
exec --no-startup-id compton -F --opengl --config ~/.config/compton.conf -e 1
 | 
			
		||||
exec_always --no-startup-id polybar-launch
 | 
			
		||||
exec_always --no-startup-id enable_touch
 | 
			
		||||
exec --no-startup-id syndaemon -i 1.0 -t -k
 | 
			
		||||
exec --no-startup-id mpd
 | 
			
		||||
exec --no-startup-id mpc stop
 | 
			
		||||
exec --no-startup-id mpd_discord_richpresence --no-idle --fork
 | 
			
		||||
exec --no-startup-id nm-applet
 | 
			
		||||
@ -5,14 +5,13 @@
 | 
			
		||||
#+HTML_HEAD_EXTRA: <meta name="description" content="Phundrak's i3 config" />
 | 
			
		||||
#+HTML_HEAD_EXTRA: <meta property="og:title" content="Phundrak's i3 config" />
 | 
			
		||||
#+HTML_HEAD_EXTRA: <meta property="og:description" content="Description of the i3 config file of Phundrak" />
 | 
			
		||||
#+PROPERTY: header-args :noweb yes :exports code :tangle ~/.config/i3/config##yadm.j2
 | 
			
		||||
#+PROPERTY: header-args :noweb yes :exports code :tangle ~/.config/i3/config
 | 
			
		||||
#+PROPERTY: header-args:python :exports none :tangle no
 | 
			
		||||
 | 
			
		||||
* Table of Contents                                        :TOC_4_gh:noexport:
 | 
			
		||||
* Table of Contents :TOC:noexport:
 | 
			
		||||
  :PROPERTIES:
 | 
			
		||||
  :CUSTOM_ID: h-c7ab05d0-4c5f-4a4c-8603-4c79e264141c
 | 
			
		||||
  :END:
 | 
			
		||||
 | 
			
		||||
- [[#presentation][Presentation]]
 | 
			
		||||
- [[#variables-declaration][Variables declaration]]
 | 
			
		||||
  - [[#global][Global]]
 | 
			
		||||
@ -328,12 +327,18 @@
 | 
			
		||||
  And although  this is not  specifically assigning a  window to a  workspace, I
 | 
			
		||||
  also want to have the tenth workspace  assigned to a specific output in case I
 | 
			
		||||
  have  two screens  — and  since this  is the  case when  I am  using only  one
 | 
			
		||||
  computer, Marpa, I can make it a conditional thanks to yadm’s jinja2 syntax.
 | 
			
		||||
  computer,  Marpa, I  will  be using  some  EmacsLisp in  order  to generate  a
 | 
			
		||||
  different configuration file  from this org file depending on  the name of the
 | 
			
		||||
  machine.
 | 
			
		||||
  #+NAME: ws10-output-edp1
 | 
			
		||||
  #+BEGIN_SRC emacs-lisp :tangle no :exports code
 | 
			
		||||
    (if (string= system-name "Marpa")
 | 
			
		||||
        "workspace 10 output eDP-1")
 | 
			
		||||
  #+END_SRC
 | 
			
		||||
 | 
			
		||||
  Now I’ll call the above code as a noweb reference that should be executed.
 | 
			
		||||
  #+BEGIN_SRC conf
 | 
			
		||||
    {% if YADM_HOSTNAME == 'Marpa' -%}
 | 
			
		||||
    workspace 10 output eDP-1
 | 
			
		||||
    {% endif -%}
 | 
			
		||||
    <<ws10-output-edp1()>>
 | 
			
		||||
  #+END_SRC
 | 
			
		||||
 | 
			
		||||
* Shortcuts
 | 
			
		||||
@ -875,14 +880,19 @@
 | 
			
		||||
    :END:
 | 
			
		||||
    Additionally,  we have  a shortcut  for  entering presentation  mode on  the
 | 
			
		||||
    additional screen of the computer; on my main computer, Mila, the additional
 | 
			
		||||
    screen is  HDMI-1, while it  is VGA1 on my  travel laptop. We’ll  use yadm’s
 | 
			
		||||
    jinja2 syntax to manage that.
 | 
			
		||||
    #+BEGIN_SRC conf
 | 
			
		||||
      {% if YADM_HOSTNAME == 'Marpa' -%}
 | 
			
		||||
      bindsym $mod+Ctrl+p xrandr --output HDMI-1 --mode 1024x768 --right-of eDP-1
 | 
			
		||||
      {% else -%}
 | 
			
		||||
      bindsym $mod+Ctrl+p xrandr --output VGA1 --mode 1024x768 --right-of LVDS1
 | 
			
		||||
      {% endif -%}
 | 
			
		||||
    screen is  HDMI-1, while it  is VGA1 on my  travel laptop. We’ll use some
 | 
			
		||||
    Emacs Lisp to determine on the configuration file export which screens names
 | 
			
		||||
    to use.
 | 
			
		||||
    #+NAME: hostname-screen-management
 | 
			
		||||
    #+BEGIN_SRC emacs-lisp :tangle no :exports code
 | 
			
		||||
      (cond ((string= system-name "Marpa") "bindsym $mod+Ctrl+p xrandr --output HDMI-1 --mode 1024x768 --right-of eDP-1")
 | 
			
		||||
            ((string= system-name "Gampo") "bindsym $mod+Ctrl+p xrandr --output VGA1 --mode 1024x768 --right-of LVDS1"))
 | 
			
		||||
    #+END_SRC
 | 
			
		||||
 | 
			
		||||
    Now, we just have to call this Emacs Lisp code as a noweb reference and
 | 
			
		||||
    execute it.
 | 
			
		||||
    #+BEGIN_SRC conf :noweb yes
 | 
			
		||||
      <<hostname-screen-management()>>
 | 
			
		||||
    #+END_SRC
 | 
			
		||||
 | 
			
		||||
* Software autolaunch
 | 
			
		||||
@ -919,9 +929,14 @@
 | 
			
		||||
  My  travel  laptop  has  a  fingerprint   reader  which  can  be  used  as  an
 | 
			
		||||
  authentification  method when  the root  password is  asked. Let’s  launch our
 | 
			
		||||
  policy kit manager if that is the case:
 | 
			
		||||
  #+NAME: fingerprint-thinkpad
 | 
			
		||||
  #+BEGIN_SRC emacs-lisp :exports code
 | 
			
		||||
    (if (string= system-name "Gampo")
 | 
			
		||||
        "exec --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1"
 | 
			
		||||
      "")
 | 
			
		||||
  #+END_SRC
 | 
			
		||||
 | 
			
		||||
  #+BEGIN_SRC conf
 | 
			
		||||
    {% if YADM_HOSTNAME == 'Gampo' -%}
 | 
			
		||||
    exec --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
 | 
			
		||||
    {% endif -%}
 | 
			
		||||
    <<fingerprint-thinkpad()>>
 | 
			
		||||
    <<generate-autolaunch()>>
 | 
			
		||||
  #+END_SRC
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user