summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@orange.com>2025-09-10 09:04:29 +0200
committerHugues Hiegel <hugues.hiegel@orange.com>2025-09-10 09:04:29 +0200
commit16ece8277b08a6d643f854d2e231da5e97b1a641 (patch)
treeb26de41a8c75bf2f931208610ebb128cd8c54e36
parent663f69fcd282113f46c8c93c0342fc222de1ebb3 (diff)
Gros commit dégueulasse.orange
-rw-r--r--00_Sanity.zsh2
-rw-r--r--10_Environment.zsh2
-rw-r--r--11_Colors.zsh5
-rw-r--r--12_Prompts.zsh2
-rw-r--r--19_Buildroot.zsh2
-rw-r--r--user:hugues/Aliases.zsh19
-rw-r--r--user:hugues/Environment.zsh2
-rw-r--r--user:hugues/GusBindings.zsh39
8 files changed, 36 insertions, 37 deletions
diff --git a/00_Sanity.zsh b/00_Sanity.zsh
index 9d19963..f1ac9f8 100644
--- a/00_Sanity.zsh
+++ b/00_Sanity.zsh
@@ -12,7 +12,7 @@
ulimit -c 0
# No dangerous world-writeable files & folders
-umask 0022
+umask 0026
# sanity
[[ -t 0 ]] && /bin/stty erase "^H" intr "^C" susp "^Z" dsusp "^Y" stop "^S" start "^Q" kill "^U" >& /dev/null
diff --git a/10_Environment.zsh b/10_Environment.zsh
index 63009a9..e3eff4a 100644
--- a/10_Environment.zsh
+++ b/10_Environment.zsh
@@ -26,6 +26,8 @@ _c=m
C_="%{$c_"
_C="$_c%}"
+PROMPT_ESC="%{]133;A\\%}"
+
unset _has_tcaps
case "$( _process_tree )" in
*":: SCREEN ::"*)
diff --git a/11_Colors.zsh b/11_Colors.zsh
index 9448f53..5cdaa0c 100644
--- a/11_Colors.zsh
+++ b/11_Colors.zsh
@@ -8,7 +8,7 @@
## these files with or without this notice.
##
-typeset -A _prompt_colors _gcl_colors _mail_colors _correct_colors _battery_colors _date_colors _agent_colors _guilt_colors
+typeset -A _prompt_colors _gcl_colors _mail_colors _correct_colors _battery_colors _date_colors _agent_colors _guilt_colors _dropbox_status
_correct_colors[error]="$color[red];$color[bold]"
_correct_colors[suggest]="$color[blue];$color[bold]"
@@ -102,5 +102,8 @@ __set_prompt_colors ()
_guilt_colors[applied]=$_gcl_colors[cached]
_guilt_colors[unapplied]=$color[black]
+
+ _dropbox_status[sync]=$_gcl_colors[changed]
+ _dropbox_status[uptodate]=$_gcl_colors[uptodate]
}
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 2094680..12514fa 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -393,7 +393,7 @@ __two_lines_prompt ()
__debug "-----------------> extra..."
PS1_+=$(__ps1_extrainfo)
__debug "-----------------> PS1..."
- PS1=$PS1_" "$C_$_prompt_colors[dies]$_C"%#"$C_$_prompt_colors[cmd]$_C" "
+ PS1=$PS1_" "$C_$_prompt_colors[dies]$_C"%#"$C_$_prompt_colors[cmd]$_C" "$PROMPT_ESC
__debug "-----------------> PS2..."
local lastline="$(__expand_text $PS1 | tail -n1)"
diff --git a/19_Buildroot.zsh b/19_Buildroot.zsh
index 914b81d..23ecf58 100644
--- a/19_Buildroot.zsh
+++ b/19_Buildroot.zsh
@@ -3,7 +3,7 @@ _defconfig() {
local cfg=.config
if [ -f $cfg -a -r $cfg ]
then
- local _defconfig="$(basename $(grep BR2_DEFCONFIG $cfg | tr -d '"') | sed 's/_defconfig//')"
+ local _defconfig="$(basename "$(grep BR2_DEFCONFIG $cfg | tr -d '"')" | sed 's/_defconfig//')"
fi
[ -z "${_defconfig}" ] && return
diff --git a/user:hugues/Aliases.zsh b/user:hugues/Aliases.zsh
index 773e2f9..a5e00b9 100644
--- a/user:hugues/Aliases.zsh
+++ b/user:hugues/Aliases.zsh
@@ -10,20 +10,10 @@
a -g ¬ISO='LC_ALL=fr_FR'
a -g ¬UTF='LC_ALL=fr_FR.UTF-8'
-a -g ...=../..
-a -g ....=../../..
-a -g .....=../../../..
-a -g ......=../../../../..
-a -g .......=../../../../../..
-a -g ........=../../../../../../..
-a -g .........=../../../../../../../..
-a -g ..........=../../../../../../../../..
-a -g ...........=../../../../../../../../../..
-a -g ............=../../../../../../../../../../..
-a -g .............=../../../../../../../../../../../..
-a -g ..............=../../../../../../../../../../../../..
-a -g ...............=../../../../../../../../../../../../../..
-a -g ................=../../../../../../../../../../../../../../..
+for updir in {2..5}
+do
+ a -g ${(l:$updir::.:)}.=${(l:$(( ($updir - 1) * 3 ))::../:)}..
+done
a -g STDBUF="stdbuf -i0 -oL"
@@ -57,6 +47,7 @@ where() { cd $(dirname $(readlink -f $(which $1))) }
__normal_user && __cmd_exists apt-get && a apt-get='sudo apt-get'
__normal_user && __cmd_exists apt && a apt='sudo apt'
+__normal_user && __cmd_exists nala && a nala='sudo nala'
__normal_user && __cmd_exists pacman && a pacman='sudo pacman'
__normal_user && __cmd_exists yum && a yum='sudo yum'
diff --git a/user:hugues/Environment.zsh b/user:hugues/Environment.zsh
index b7561df..5cf163c 100644
--- a/user:hugues/Environment.zsh
+++ b/user:hugues/Environment.zsh
@@ -45,7 +45,7 @@ do
[ -d /usr/$i/git-core ] && export PATH=$PATH:/usr/$i/git-core
done
-[ -d ~/.local/bin ] && PATH=$PATH:~/.local/bin
+[ -d ~/.local/bin ] && PATH=~/.local/bin:$PATH
# Couleurs pour grep --color=auto
export GREP_COLOR=$color[yellow]\;$color[bold]
diff --git a/user:hugues/GusBindings.zsh b/user:hugues/GusBindings.zsh
index 1d29f50..7f00197 100644
--- a/user:hugues/GusBindings.zsh
+++ b/user:hugues/GusBindings.zsh
@@ -201,31 +201,33 @@ for keymap in viins vicmd emacs
do
bindkey -M $keymap '^[r' _rehash
- if ( __cmd_exists when )
- then
- bindkey -M $keymap -s '^[w' '^[Q when\n'
- fi
-
- if ( __cmd_exists tickets )
- then
- bindkey -M $keymap -s '^[t' '^[Q tickets\n'
- bindkey -M $keymap -s '^[T' '^[Q !?tickets\n'
- elif ( __cmd_exists todo )
- then
- bindkey -M $keymap -s '^[t' '^[Q todo\n'
- bindkey -M $keymap -s '^[T' '^[Q todo all -c\n'
- fi
-
alias configure="[ ! -e configure ] && ( ./autogen.sh && ./configure ) || ./configure"
bindkey -M $keymap -s '^[c' '^[Q configure\n'
bindkey -M $keymap -s '^[©' '^[Q !?configure\n'
- alias MAKE="[ ! -e Makefile -a ! -e GNUmakefile ] && ( [ ! -e configure ] && [ -e autogen.sh ] && ./autogen.sh || [ -e configure.ac ] && autoreconf --install ; ./configure && make ) || make"
+ MAKE() {
+ if [ ! -e Makefile -a ! -e GNUmakefile ]
+ then
+ if ( [ ! -e configure ] && [ -e autogen.sh ] )
+ then
+ ./autogen.sh
+ elif [ -e configure.ac ]
+ then
+ autoreconf --install
+ if [ -e ./configure ]
+ then
+ ./configure
+ fi
+ fi
+ fi
+ [ -e Makefile -o -e GNUmakefile ] \
+ && make
+ }
bindkey -M $keymap -s '^[m' '^[Q MAKE\n'
bindkey -M $keymap -s '^[M' '^[Q make\n'
bindkey -M $keymap -s '^[l' '^[Q l\n'
-
+ bindkey -M $keymap -s '^[-' '^[Q cd -\n'
bindkey -M $keymap -s '^[ ' '\\ '
bindkey -M $keymap -s '^[g' '^[Q git st .\n'
@@ -235,7 +237,8 @@ do
bindkey -M $keymap -s '^[S' '^[Q sudo !!'
- bindkey -M $keymap -s '^[X' '^[Q kill -USR1 $$\n'
+ bindkey -M $keymap -s '^[x' '^[Q kill -USR1 $$\n'
+ bindkey -M $keymap -s '^[X' '^[Q pkill -USR1 ${SHELL}\n'
bindkey -M $keymap -s '^[^[OA' 'up-line-or-history'
bindkey -M $keymap -s '^[^[OB' 'down-line-or-history'