From 86440a8fae05a67501bba1343eead5b0c0bc590f Mon Sep 17 00:00:00 2001 From: ange Date: Tue, 5 Nov 2024 14:59:02 +0700 Subject: [PATCH] feat: WITA-WIB-CET time --- .config/bash/10-aliases.bash | 43 +++++++++++++----------- .config/bash/11-k8s.bash | 2 +- .config/newsraft/config | 2 +- .config/nvim/pack/plugins/opt/telescope | 2 +- .config/nvim/pack/plugins/opt/treesitter | 2 +- .local/bin/sbar | 2 +- .local/bin/updatetz | 6 ---- 7 files changed, 29 insertions(+), 30 deletions(-) delete mode 100755 .local/bin/updatetz diff --git a/.config/bash/10-aliases.bash b/.config/bash/10-aliases.bash index 54b9512..8e7bee3 100644 --- a/.config/bash/10-aliases.bash +++ b/.config/bash/10-aliases.bash @@ -1,3 +1,12 @@ +function bat() { + [ -z "$1" ] && return 1 + TERM='tty' $EDITOR --cmd "set lines=$(grep -c '' "$1")" +redraw +q "$1" +} + +function bd() { + echo "$@" | base64 -d; echo +} + function update() { $TERM --hold -e "$SHELL" -ic "pac -Syu && echo -e '\e[32mDONE'" & $TERM --hold -e "$SHELL" -ic "flatpak update && echo -e '\e[32mDONE'" & @@ -8,37 +17,33 @@ function tmp() { cd "$(mktemp -d --tmpdir "$1"XXX)" || return } -function bd() { - echo "$@" | base64 -d; echo -} - alias ...='../..' \ ....='../../..' \ .....='../../../..' \ ......='../../../../..' \ + c='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ cp='cp -vi' \ - mv='mv -vi' \ - rm='rm -vI' \ - mkdir='mkdir -v' \ - rsync='rsync -P' \ - ls='ls --color' \ - ll='ls -lh' \ + diff='diff --color' \ + feh='feh --auto-zoom --scale-down' \ + g=git \ + grep='grep --color --exclude-dir={.cache,.git,.idea,.venv,.vscode,node_modules}' \ l='ll -a' \ la='ll -A' \ - diff='diff --color' \ - grep='grep --color --exclude-dir={.cache,.git,.idea,.venv,.vscode,node_modules}' \ - pac='sudo pacman' \ - g=git \ - neofetch=fastfetch \ + ll='ls -lh' \ + ls='ls --color' \ mail=aerc \ - rss=newsraft \ - vi='$EDITOR' \ + mkdir='mkdir -v' \ + mv='mv -vi' \ + neofetch=fastfetch \ + pac='sudo pacman' \ qcp='qcp -o tabsize=4' \ qmv='qmv -o tabsize=4' \ - c='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ + rm='rm -vI' \ + rss=newsraft \ + rsync='rsync -P' \ ssh='TERM=xterm-256color ssh' \ sudo='sudo ' \ + vi='$EDITOR' \ watch='watch -c ' \ xargs='xargs ' \ - feh='feh --auto-zoom --scale-down' \ xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --trusted-daemon --log-file=/tmp/monero-wallet-cli.log --wallet-file /home/ange/.config/monero/ange' diff --git a/.config/bash/11-k8s.bash b/.config/bash/11-k8s.bash index af931a4..e1ff006 100644 --- a/.config/bash/11-k8s.bash +++ b/.config/bash/11-k8s.bash @@ -146,7 +146,7 @@ compalias k=kubectl \ kgsvconame='kubectl get service -o name' \ kgsvcowide='kubectl get service -o wide' \ kgsvcoyaml='kubectl get service -o yaml' \ - klo='kubectl logs' \ + klo='kubectl logs -f' \ kpf='kubectl port-forward' \ krm='kubectl delete' \ krmcj='kubectl delete cronjob' \ diff --git a/.config/newsraft/config b/.config/newsraft/config index 0e29aa0..12fb239 100644 --- a/.config/newsraft/config +++ b/.config/newsraft/config @@ -2,6 +2,6 @@ set menu-feed-sorting unread-desc set menu-item-sorting unread-desc set notification-command '' -bind v exec mpv "%l" +bind V exec mpv "%l" bind q quit-hard unbind ^D diff --git a/.config/nvim/pack/plugins/opt/telescope b/.config/nvim/pack/plugins/opt/telescope index df534c3..85922dd 160000 --- a/.config/nvim/pack/plugins/opt/telescope +++ b/.config/nvim/pack/plugins/opt/telescope @@ -1 +1 @@ -Subproject commit df534c3042572fb958586facd02841e10186707c +Subproject commit 85922dde3767e01d42a08e750a773effbffaea3e diff --git a/.config/nvim/pack/plugins/opt/treesitter b/.config/nvim/pack/plugins/opt/treesitter index bab7b0f..9565149 160000 --- a/.config/nvim/pack/plugins/opt/treesitter +++ b/.config/nvim/pack/plugins/opt/treesitter @@ -1 +1 @@ -Subproject commit bab7b0f20bd3e805b77231a77f516c7d69382693 +Subproject commit 9565149634ec5e0fc9e740f4edb6cab26bf7fb6f diff --git a/.local/bin/sbar b/.local/bin/sbar index 719c410..323b3aa 100755 --- a/.local/bin/sbar +++ b/.local/bin/sbar @@ -77,7 +77,7 @@ function update_net() { } function update_time() { - time="$(date '+%a %m-%d %R')" + time="$(TZ=Asia/Makassar date '+%a %m-%d %R %Z'); $(TZ=Asia/Jakarta date '+%R %Z'); $(TZ=Europe/Paris date '+%R %Z')" } function reload() { diff --git a/.local/bin/updatetz b/.local/bin/updatetz deleted file mode 100755 index 6126d84..0000000 --- a/.local/bin/updatetz +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -tz="$(curl -Ssf https://ipapi.co/timezone)" - -sudo timedatectl set-timezone "$tz" -echo "$tz"