From 1033f4b8edbeecd6f463d71585eb5c738141cdbb Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 18 Sep 2022 21:17:18 +0100 Subject: [PATCH 1/7] Use history-search-end in zsh --- roles/home-cli/files/profile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index b354b25..ae721a6 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -81,15 +81,18 @@ then elif [ -n "$ZSH_VERSION" ] then autoload -Uz compinit && compinit + autoload -Uz history-search-end zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' + zle -N history-beginning-search-backward-end history-search-end + zle -N history-beginning-search-forward-end history-search-end bindkey -e bindkey "^[[1;5C" forward-word bindkey "^[[1;5D" backward-word bindkey "^[[3~" delete-char - bindkey "^[[A" history-beginning-search-backward - bindkey "^[[B" history-beginning-search-forward - bindkey "^[OA" history-beginning-search-backward - bindkey "^[OB" history-beginning-search-forward + bindkey "^[[A" history-beginning-search-backward-end + bindkey "^[[B" history-beginning-search-forward-end + bindkey "^[OA" history-beginning-search-backward-end + bindkey "^[OB" history-beginning-search-forward-end PS1="%B%n@%m%#%b " From 6f7c54d8f715c678df290c357517860050ca63b3 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 18 Sep 2022 21:20:44 +0100 Subject: [PATCH 2/7] Use /usr/bin/env for bash and zsh files --- roles/home-cli/files/bash_profile | 2 +- roles/home-cli/files/bashrc | 2 +- roles/home-cli/files/zprofile | 2 +- roles/home-cli/files/zshrc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/home-cli/files/bash_profile b/roles/home-cli/files/bash_profile index 5821b13..86281ac 100644 --- a/roles/home-cli/files/bash_profile +++ b/roles/home-cli/files/bash_profile @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -r "$HOME/.profile" ] then . "$HOME/.profile" diff --git a/roles/home-cli/files/bashrc b/roles/home-cli/files/bashrc index 6b405f6..aa9417c 100644 --- a/roles/home-cli/files/bashrc +++ b/roles/home-cli/files/bashrc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -r "$HOME/.shrc" ] then . "$HOME/.shrc" diff --git a/roles/home-cli/files/zprofile b/roles/home-cli/files/zprofile index 822f8fb..87914f0 100644 --- a/roles/home-cli/files/zprofile +++ b/roles/home-cli/files/zprofile @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/usr/bin/env zsh if [ -r "$HOME/.profile" ] then emulate sh -c '. "$HOME/.profile"' diff --git a/roles/home-cli/files/zshrc b/roles/home-cli/files/zshrc index b429de3..e5d7f01 100644 --- a/roles/home-cli/files/zshrc +++ b/roles/home-cli/files/zshrc @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/usr/bin/env zsh if [ -r "$HOME/.shrc" ] then emulate sh -c '. "$HOME/.shrc"' From ddb9f465ddc77a071d3203b69f15f417e56e2590 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 19 Sep 2022 10:30:22 +0100 Subject: [PATCH 3/7] Stop removing .hushlogin --- roles/home-cli/tasks/dotfiles.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/roles/home-cli/tasks/dotfiles.yml b/roles/home-cli/tasks/dotfiles.yml index 1142fda..4b19fa4 100644 --- a/roles/home-cli/tasks/dotfiles.yml +++ b/roles/home-cli/tasks/dotfiles.yml @@ -17,10 +17,6 @@ ansible.builtin.copy: src: gemrc dest: "{{ ansible_env.HOME }}/.gemrc" -- name: Remove $HOME/.hushlogin - ansible.builtin.file: - path: "{{ ansible_env.HOME }}/.hushlogin" - state: absent - name: Create $HOME/.tmux.conf ansible.builtin.copy: src: tmux.conf From a97c00ab2c9863ec9058af930a1674e8fb87295d Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 19 Sep 2022 11:23:35 +0100 Subject: [PATCH 4/7] Check uname to decide which inventory to use --- console.sh | 10 ++++++++-- desktop.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/console.sh b/console.sh index 1764777..702dedd 100755 --- a/console.sh +++ b/console.sh @@ -1,3 +1,9 @@ #!/bin/sh -. ./roles/home-cli/files/bash_profile -./user-cli.yml -i ./local.ini +. ./roles/home-cli/files/profile +if [ $(uname -s) = FreeBSD ] +then + INVENTORY=./inventories/local-freebsd.ini +else + INVENTORY=./inventories/local-linux.ini +fi +./user-cli.yml -i $INVENTORY diff --git a/desktop.sh b/desktop.sh index f5806dc..f2a9205 100755 --- a/desktop.sh +++ b/desktop.sh @@ -1,3 +1,9 @@ #!/bin/sh -. ./roles/home-cli/files/bash_profile -./user-gui.yml -i ./local.ini +. ./roles/home-cli/files/profile +if [ $(uname -s) = FreeBSD ] +then + INVENTORY=./inventories/local-freebsd.ini +else + INVENTORY=./inventories/local-linux.ini +fi +./user-gui.yml -i $INVENTORY From 3d05da3c57d2eb929868bb2293eaf53f7d3b6b79 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 19 Sep 2022 13:14:30 +0100 Subject: [PATCH 5/7] Add C.UTF-8 locale alias --- roles/home-cli/files/profile | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index ae721a6..ec03ec9 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -203,6 +203,7 @@ alias zlu="zypper list-updates" # Language aliases. ## Fedora/RHEL/CentOS: dnf install glibc-langpack-{en,fr} +alias C="LANG=C.UTF-8" alias en="LANG=en_GB.UTF-8" alias fr="LANG=fr_FR.UTF-8" From 681400f0d25bf07899895923b6ed718ac47be003 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 19 Sep 2022 14:28:06 +0100 Subject: [PATCH 6/7] Remove stray inventory file --- freebsd-local.ini | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 freebsd-local.ini diff --git a/freebsd-local.ini b/freebsd-local.ini deleted file mode 100644 index 0492a16..0000000 --- a/freebsd-local.ini +++ /dev/null @@ -1,7 +0,0 @@ -[all] -localhost - -[all:vars] -ansible_connection=local -ansible_python_interpreter=/usr/local/bin/python3.9 -ansible_become_method=su From 4e8bce5324c799766482e23acdc5ed7a471b79d6 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Tue, 20 Sep 2022 19:28:02 +0100 Subject: [PATCH 7/7] Use Iosevka Term Extended if it is available --- roles/home-gui/files/fonts.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home-gui/files/fonts.conf b/roles/home-gui/files/fonts.conf index 34573da..f21cfb4 100644 --- a/roles/home-gui/files/fonts.conf +++ b/roles/home-gui/files/fonts.conf @@ -86,6 +86,7 @@ monospace + Iosevka Term Extended Iosevka Term Noto Sans Mono DejaVu Sans Mono