misc
This commit is contained in:
parent
4f55e2393b
commit
20efd24530
24
user/bin/sm
Executable file
24
user/bin/sm
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# string multiply
|
||||||
|
|
||||||
|
if [ $# -le 1 ]; then
|
||||||
|
echo "Usage: ${0##*/} <str> <n>" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
s="$1"
|
||||||
|
shift 1
|
||||||
|
while [ $# -gt 1 ]; do
|
||||||
|
s="$s $1"
|
||||||
|
shift 1
|
||||||
|
done
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
''|*[!0-9]*) echo "$2 is not a valid number" >&2; exit 2 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
i=0
|
||||||
|
while [ $i -lt $1 ]; do
|
||||||
|
printf "%s" "$s"
|
||||||
|
: $((i += 1))
|
||||||
|
done
|
||||||
|
|
@ -85,6 +85,7 @@ alias fonts='fc-list | awk -F: "{ print \$2 }" | sort | uniq | fzf'
|
||||||
alias hz='xrandr --output DisplayPort-1 --mode 1920x1080 --rate'
|
alias hz='xrandr --output DisplayPort-1 --mode 1920x1080 --rate'
|
||||||
alias ns='nix-shell'
|
alias ns='nix-shell'
|
||||||
alias zn='cd ~/.local/nixos'
|
alias zn='cd ~/.local/nixos'
|
||||||
|
alias znn='cd ~/.local/nixos/hosts/$(hostname)/users/$(whoami)'
|
||||||
npo() {
|
npo() {
|
||||||
nix path-info "nixpkgs#$1" 2> /dev/null
|
nix path-info "nixpkgs#$1" 2> /dev/null
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ if [[ "$TERM" != "linux" ]]; then
|
||||||
# check if still in .bashrc
|
# check if still in .bashrc
|
||||||
if declare -F _bashrc_main > /dev/null; then
|
if declare -F _bashrc_main > /dev/null; then
|
||||||
return
|
return
|
||||||
elif [[ "$@" != @("starship_precmd"|""|"__fzf_history__"|"history -a"|"__zoxide_hook") ]]; then
|
elif [[ "$@" != @("starship_precmd"|""|"__fzf_history__"|"fzf-file-widget"|"history -a"|"__zoxide_hook") ]]; then
|
||||||
printf "\e]0;%s | %s | %s\a" "$(dirs +0)" "$@" "$(date +"%H:%M:%S")"
|
printf "\e]0;%s | %s | %s\a" "$(dirs +0)" "$@" "$(date +"%H:%M:%S")"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,9 @@ unbind d
|
||||||
bind d run 'sh-tmux -d'
|
bind d run 'sh-tmux -d'
|
||||||
set -g update-environment SH_TMUX_PID
|
set -g update-environment SH_TMUX_PID
|
||||||
|
|
||||||
|
bind C-u copy-mode \; send C-u
|
||||||
|
bind -T copy-mode-vi C-w send -X scroll-up
|
||||||
|
bind -T copy-mode-vi C-d send -X scroll-down
|
||||||
|
|
||||||
### settings
|
### settings
|
||||||
set -g default-terminal "xterm-256color"
|
set -g default-terminal "xterm-256color"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue