-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xvzc
committed
Jan 5, 2024
1 parent
092180a
commit 1fe6f50
Showing
3 changed files
with
30 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,9 @@ | ||
# dotfiles | ||
A repository for personal dotfiles. uses [chezmoi](https://github.com/twpayne/chezmoi) to manage cross platform environment. | ||
Personal dotfiles managed by [chezmoi](https://github.com/twpayne/chezmoi). | ||
|
||
# chezmoi init | ||
`chezmoi init https://github.com/xvzc/dotfiles` | ||
|
||
# Dependencies | ||
## Terminal environment | ||
``` | ||
zsh | ||
oh-my-zsh | ||
node | ||
packer | ||
tmux | ||
oh-my-tmux | ||
fzf | ||
ripgrep | ||
sdkman | ||
``` | ||
# install with curl | ||
`curl -fsSL https://dotfiles.xvzc.dev | bash` | ||
|
||
## Window manager environment (For Arch Linux) | ||
``` | ||
- bspwm # window manager | ||
- polybar # for top bar. | ||
- xorg, xorg-xinit # for keyborad input settings. | ||
- compton(picom) # A compositor that gives each window a buffer to render | ||
- nitrogen # Background image manager | ||
- ibus-hangul # korean input source | ||
- xdo # a utility that enables showing and hiding applications | ||
``` | ||
|
||
# Trouble shooting log | ||
## Make ALT_R work as ALT_R in Hangul layout (For Arch Linux) | ||
``` | ||
cd /usr/share/X11/xkb/symbols | ||
sudo vim kr | ||
``` | ||
find 'ralt_hangul' key, and then change the symbols to `symbols[Group1] = [ Alt_R, Meta_R ] };` | ||
|
||
## How to get .tmux.reset.conf | ||
```bash | ||
$ tmux -f /dev/null -L temp start-server \; list-keys > ./.tmux.reset.conf | ||
|
||
``` | ||
|
||
## Nerd Font issue with Alacritty on Mac OS Ventura >= 13.0 | ||
Open Font Book and right click All Fonts on the side bar, and then click `activate all fonts` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,47 @@ | ||
#!/usr/bin/env zsh | ||
|
||
CUR_OS=$(uname) | ||
|
||
darwin_batt() { | ||
cmd=$(pmset -g batt) | ||
amount=$(echo "$cmd" | grep -Eo "\d+%" | cut -d% -f1) | ||
label=$amount% | ||
|
||
if echo "$cmd" | grep -q "AC Power"; then | ||
label="AC" | ||
fi | ||
|
||
if (( $amount < 20 )) then | ||
echo "#[fg=$(get_color $amount),bg=default] $amount%"; | ||
} | ||
|
||
linux_batt() { | ||
echo "AC" | ||
} | ||
|
||
get_color() { | ||
if (( $1 < 22 )) then | ||
color="color9" | ||
elif (( $amount < 40 )) then | ||
elif (( $1 < 44 )) then | ||
color="color208" | ||
elif (( $amount < 60 )) then | ||
elif (( $1 < 66 )) then | ||
color="color214" | ||
elif (( $amount < 80 )) then | ||
color="color184" | ||
elif (( $1 < 88 )) then | ||
color="color186" | ||
else | ||
color="color148" | ||
fi | ||
|
||
echo "#[fg=black,bg=$color] $label"; | ||
echo $color | ||
} | ||
|
||
not_applicable() { | ||
echo "" | ||
} | ||
|
||
case $(uname -s) in | ||
Linux) | ||
echo "AC" | ||
;; | ||
Darwin) | ||
darwin_batt | ||
;; | ||
*) | ||
echo "N/A" | ||
Linux*) | ||
linux_batt | ||
;; | ||
Darwin*) | ||
darwin_batt | ||
;; | ||
*) | ||
not_applicable | ||
esac |