diff --git a/project.el b/project.el
index 55ee334..9b98333 100644
--- a/project.el
+++ b/project.el
@@ -54,14 +54,14 @@
(concat
"
"
(menu '("
↓ bottom ↓"))
- "
"
- (format "%s" (car (plist-get info :title)))
- "
"
(when-let ((date (plist-get info :date)))
(format "
%s"
(format-time-string "%Y-%m-%d"
(org-timestamp-to-time
(car date)))))
+ "
"
+ (format "%s" (car (plist-get info :title)))
+ "
"
(when-let ((subtitle (car (plist-get info :subtitle))))
(format "
%s
" subtitle))
"
"))
diff --git a/project.el.sig b/project.el.sig
index 1594060..24e5852 100644
Binary files a/project.el.sig and b/project.el.sig differ
diff --git a/src/css/minimalist.css b/src/css/minimalist.css
index d5aeae2..b619f28 100644
--- a/src/css/minimalist.css
+++ b/src/css/minimalist.css
@@ -766,7 +766,7 @@ blockquote:after, .main blockquote:after {
pre span.org-builtin {color:var(--cyan);}
pre span.org-string {color:var(--green);}
pre span.org-doc {color:var(--green);}
-pre span.org-keyword {color:var(--blue);}
+pre span.org-keyword {color:var(--green);}
pre span.org-variable-name {color:var(--blue);}
pre span.org-function-name {color:var(--blue);}
pre span.org-type {color:var(--yellow);}
diff --git a/src/posts/0007-switch-iterm-profile-catalina/index.org b/src/posts/0007-switch-iterm-profile-catalina/index.org
index ea28281..d582329 100644
--- a/src/posts/0007-switch-iterm-profile-catalina/index.org
+++ b/src/posts/0007-switch-iterm-profile-catalina/index.org
@@ -6,6 +6,10 @@
#+DESCRIPTION: Small script to change the profile of iTerm in sync with macOS preferences
#+OPTIONS: auto-id:t toc:t
+#+begin_notes
+How to have dark/light profile selected when opening a new iTerm.
+#+end_notes
+
* The script
:PROPERTIES:
:CUSTOM_ID: the-script
@@ -21,50 +25,46 @@ I use =fish= but you can easily adapt that in your =.bashrc=,
Here is what I have in my =~/.config/fish/config.fish=:
#+begin_src fish
- function setItermProfile
- echo -ne "\033]50;SetProfile=$argv\a"
- end
+function setItermProfile
+ echo -ne "\033]50;SetProfile=$argv\a"
+end
- function sync_appearance
+function sync_appearance
- set -x MacOSThemeAutoSwitch \
- (defaults read -g AppleInterfaceStyleSwitchesAutomatically 2>/dev/null)
- test -z $MacOSThemeAutoSwitch; and set -x MacOSThemeAutoSwitch 0
+ set -x MacOSThemeAutoSwitch \
+ (defaults read -g AppleInterfaceStyleSwitchesAutomatically 2>/dev/null)
+ test -z $MacOSThemeAutoSwitch; and set -x MacOSThemeAutoSwitch 0
- set -x MacOSTheme (defaults read -g AppleInterfaceStyle 2>/dev/null)
- test -z $MacOSTheme; and set -x MacOSTheme 'nil'
+ set -x MacOSTheme (defaults read -g AppleInterfaceStyle 2>/dev/null)
+ test -z $MacOSTheme; and set -x MacOSTheme 'nil'
- # for debug purpose only
- # echo $MacOSThemeAutoSwitch
- # echo $MacOSTheme
+ if test -n $ITERM_PROFILE # check if we are using iTerm2
+ switch $MacOSThemeAutoSwitch
+ case 1 # autoswitch on
+ switch $MacOSTheme
+ case 'nil'
+ setItermProfile Light
+ case '*'
+ setItermProfile Dark
+ end
+ case 0 # autoswitch off
+ switch $MacOSTheme
+ case 'Dark'
+ setItermProfile Dark
+ case 'Light'
+ setItermProfile Light
+ case 'nil'
+ setItermProfile Light
+ end
+ end
+ end
+end
- if test -n $ITERM_PROFILE # check if we are using iTerm2
- switch $MacOSThemeAutoSwitch
- case 1
- switch $MacOSTheme
- case 'nil'
- setItermProfile Light
- case '*'
- setItermProfile Dark
- end
- case 0
- switch $MacOSTheme
- case 'Dark'
- setItermProfile Dark
- case 'Light'
- setItermProfile Light
- case 'nil'
- setItermProfile Light
- end
- end
- end
- end
-
- if status --is-login
- if status --is-interactive
- sync_appearance
- end
- end
+if status --is-login
+ if status --is-interactive
+ sync_appearance
+ end
+end
#+end_src
If the appearance change, you can call =sync_appearance= function in your