removed generated i3 config, which now does not rely on yadm

This commit is contained in:
2020-01-25 01:49:21 +01:00
parent 2bd06d9558
commit 6466dca44b
2 changed files with 33 additions and 244 deletions

View File

@@ -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 yadms 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 Ill 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. Well use yadms
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. Well 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. Lets 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