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 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 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/profile b/roles/home-cli/files/profile index b354b25..ec03ec9 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 " @@ -200,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" 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"' 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 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