Compare commits

..

2 Commits

Author SHA1 Message Date
8cbf1c2b69 Adapting config to new machine. 2021-10-26 08:49:53 +02:00
d9265cbb18 Small change in settings. 2021-10-25 19:51:11 +02:00
8 changed files with 24 additions and 34 deletions

View File

@ -26,7 +26,7 @@ URxvt*saveLines: 65500
URxvt*loginShell: false URxvt*loginShell: false
!URxvt*termName: screen-256color !URxvt*termName: screen-256color
{{- if eq .chezmoi.hostname "zaptorjezus" }} {{- if (or (eq .chezmoi.hostname "jnielandt") (eq .chezmoi.hostname "zaptorjezus")) }}
URxvt.font: xft:Fura Code Nerd Font Mono:size=10:antialias=true URxvt.font: xft:Fura Code Nerd Font Mono:size=10:antialias=true
URxvt.boldfont: xft:Fura Code Nerd Font Mono:bold:size=10 URxvt.boldfont: xft:Fura Code Nerd Font Mono:bold:size=10
{{- else }} {{- else }}

View File

@ -103,7 +103,7 @@ bottom = false
;border-right-size = 16 ;border-right-size = 16
;unused modules - mpd xbacklight backlight-acpi alsa ;unused modules - mpd xbacklight backlight-acpi alsa
modules-left = i3 modules-left = i3
modules-center = temperature battery xkeyboard memory cpu filesystem updates-arch reboot-check xbacklight top-process modules-center = temperature battery xkeyboard memory cpu filesystem updates-aurhelper reboot-check xbacklight top-process
modules-right = net wifi0 vpn powermenu modules-right = net wifi0 vpn powermenu
; TRAY MANAGEMENT ; TRAY MANAGEMENT
@ -390,15 +390,10 @@ type = custom/script
exec = ~/.dotfiles/polybar/polybar-scripts/polybar-scripts/updates-pacman/updates-pacman.sh exec = ~/.dotfiles/polybar/polybar-scripts/polybar-scripts/updates-pacman/updates-pacman.sh
interval = 600 interval = 600
; this one was fased out, DEPRECATED [module/updates-aurhelper]
[module/updates-arch]
type = custom/script type = custom/script
exec = ~/.config/polybar/polybar-scripts/polybar-scripts/updates-arch/updates-arch.sh exec = ~/.dotfiles/polybar/polybar-scripts/polybar-scripts/updates-aurhelper/updates-aurhelper.sh
format-prefix = "ﮮ "
format-prefix-foreground = ${colors.bright_green}
;format-underline = ${colors.light3}
interval = 600 interval = 600
label = "%output%"
[module/reboot-check] [module/reboot-check]
type = custom/script type = custom/script

View File

@ -1,4 +0,0 @@
rofi.combi-modi: window,drun,ssh
rofi.font: Fura Code 12
rofi.modi: combi
rofi.theme: ~/.config/rofi/gruvbox-dark-mod.rasi

View File

@ -0,0 +1,6 @@
configuration {
combi-modi: "window,drun,ssh";
font: "Fura Code 12";
modi: "run,combi";
theme: "gruvbox-dark-mod.rasi";
}

View File

@ -145,7 +145,7 @@ __fzf_generic_path_completion() {
leftover=${leftover/#\/} leftover=${leftover/#\/}
[ -z "$dir" ] && dir='.' [ -z "$dir" ] && dir='.'
[ "$dir" != "/" ] && dir="${dir/%\//}" [ "$dir" != "/" ] && dir="${dir/%\//}"
matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" | while read item; do matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" | while read item; do
echo -n "${(q)item}$suffix " echo -n "${(q)item}$suffix "
done) done)
matches=${matches% } matches=${matches% }
@ -207,11 +207,10 @@ _fzf_complete() {
type $post > /dev/null 2>&1 || post=cat type $post > /dev/null 2>&1 || post=cat
_fzf_feed_fifo "$fifo" _fzf_feed_fifo "$fifo"
matches=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $str_arg" __fzf_comprun "$cmd" "${args[@]}" -q "${(Q)prefix}" < "$fifo" | $post | tr '\n' ' ') matches=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $str_arg" __fzf_comprun "$cmd" "${args[@]}" -q "${(Q)prefix}" < "$fifo" | $post | tr '\n' ' ')
if [ -n "$matches" ]; then if [ -n "$matches" ]; then
LBUFFER="$lbuf$matches" LBUFFER="$lbuf$matches"
fi fi
zle reset-prompt
command rm -f "$fifo" command rm -f "$fifo"
} }
@ -225,7 +224,7 @@ _fzf_complete_telnet() {
_fzf_complete_ssh() { _fzf_complete_ssh() {
_fzf_complete +m -- "$@" < <( _fzf_complete +m -- "$@" < <(
setopt localoptions nonomatch setopt localoptions nonomatch
command cat <(cat ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?]') \ command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?]') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \ <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') | <(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
awk '{if (length($2) > 0) {print $2}}' | sort -u awk '{if (length($2) > 0) {print $2}}' | sort -u
@ -302,6 +301,7 @@ fzf-completion() {
if eval "type _fzf_complete_${cmd} > /dev/null"; then if eval "type _fzf_complete_${cmd} > /dev/null"; then
prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf} prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf}
zle reset-prompt
elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then
_fzf_dir_completion "$prefix" "$lbuf" _fzf_dir_completion "$prefix" "$lbuf"
else else

View File

@ -45,7 +45,8 @@ __fsel() {
-o -type d -print \ -o -type d -print \
-o -type l -print 2> /dev/null | cut -b3-"}" -o -type l -print 2> /dev/null | cut -b3-"}"
setopt localoptions pipefail no_aliases 2> /dev/null setopt localoptions pipefail no_aliases 2> /dev/null
eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do local item
eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do
echo -n "${(q)item} " echo -n "${(q)item} "
done done
local ret=$? local ret=$?
@ -67,30 +68,22 @@ fzf-file-widget() {
zle -N fzf-file-widget zle -N fzf-file-widget
bindkey '^T' fzf-file-widget bindkey '^T' fzf-file-widget
# Ensure precmds are run after cd
fzf-redraw-prompt() {
local precmd
for precmd in $precmd_functions; do
$precmd
done
zle reset-prompt
}
zle -N fzf-redraw-prompt
# ALT-C - cd into the selected directory # ALT-C - cd into the selected directory
fzf-cd-widget() { fzf-cd-widget() {
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | cut -b3-"}" -o -type d -print 2> /dev/null | cut -b3-"}"
setopt localoptions pipefail no_aliases 2> /dev/null setopt localoptions pipefail no_aliases 2> /dev/null
local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)" local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)"
if [[ -z "$dir" ]]; then if [[ -z "$dir" ]]; then
zle redisplay zle redisplay
return 0 return 0
fi fi
cd "$dir" zle push-line # Clear buffer. Auto-restored on next prompt.
unset dir # ensure this doesn't end up appearing in prompt expansion BUFFER="cd ${(q)dir}"
zle accept-line
local ret=$? local ret=$?
zle fzf-redraw-prompt unset dir # ensure this doesn't end up appearing in prompt expansion
zle reset-prompt
return $ret return $ret
} }
zle -N fzf-cd-widget zle -N fzf-cd-widget
@ -100,8 +93,8 @@ bindkey '\ec' fzf-cd-widget
fzf-history-widget() { fzf-history-widget() {
local selected num local selected num
setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null
selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\s+(.*)/, $1)}++' | selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++' |
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) )
local ret=$? local ret=$?
if [ -n "$selected" ]; then if [ -n "$selected" ]; then
num=$selected[1] num=$selected[1]