From ce24cd5e38cc131bb2b05217e9aa03961f2dd243 Mon Sep 17 00:00:00 2001 From: jay Date: Sat, 4 Mar 2023 17:45:19 +0800 Subject: [PATCH] [feat] refactor --- .chezmoiroot | 1 + .chezmoi.toml.tmpl => home/.chezmoi.toml.tmpl | 0 .../run_once_after_10_install_zinit.sh | 4 ++++ .../run_once_after_20_install_vim_dep.sh | 0 .../.chezmoiscripts/run_once_before_10_check.sh | 0 .../run_once_before_20_install_dev_lang.sh.tmpl | 0 {bin => home/bin}/executable_get-volume.sh | 0 {bin => home/bin}/executable_screenshot | 0 {bin => home/bin}/executable_screenshot-monitor | 0 .../dot_config}/alacritty/alacritty.yml | 0 .../dot_config}/environment.d/wayland.conf | 0 {dot_config => home/dot_config}/nvim/init.vim.tmpl | 0 {dot_config => home/dot_config}/pgcli/config | 0 {dot_config => home/dot_config}/sway/bg.png | Bin {dot_config => home/dot_config}/sway/bg2.png | Bin {dot_config => home/dot_config}/sway/config | 1 + {dot_config => home/dot_config}/swaylock/bg.png | Bin .../dot_config}/systemd/user/sway-session.target | 0 {dot_config => home/dot_config}/waybar/config | 0 .../dot_config}/waybar/executable_launch.sh | 0 {dot_config => home/dot_config}/waybar/style.css | 0 {dot_config => home/dot_config}/wofi/config | 0 .../dot_config}/wofi/executable_wofi-power.sh | 0 {dot_config => home/dot_config}/wofi/style.css | 0 .../dot_config}/xdg-desktop-portal-wlr/config | 0 dot_ctags => home/dot_ctags | 0 dot_gitconfig.tmpl => home/dot_gitconfig.tmpl | 0 dot_tmux.conf => home/dot_tmux.conf | 0 dot_zprofile => home/dot_zprofile | 0 {dot_zsh => home/dot_zsh}/20_keybind.zsh | 0 {dot_zsh => home/dot_zsh}/30_alias.zsh | 0 {dot_zsh => home/dot_zsh}/50_setopt.zsh | 0 {dot_zsh => home/dot_zsh}/70_misc.zsh | 0 {dot_zsh => home/dot_zsh}/zsh.sh | 0 dot_zshrc.tmpl => home/dot_zshrc.tmpl | 0 {private_dot_ssh => home/private_dot_ssh}/config | 0 36 files changed, 6 insertions(+) create mode 100644 .chezmoiroot rename .chezmoi.toml.tmpl => home/.chezmoi.toml.tmpl (100%) rename {.chezmoiscripts => home/.chezmoiscripts}/run_once_after_10_install_zinit.sh (76%) rename .chezmoiscripts/run_after_20_install_vim_dep.sh => home/.chezmoiscripts/run_once_after_20_install_vim_dep.sh (100%) rename .chezmoiscripts/run_before_10_check.sh => home/.chezmoiscripts/run_once_before_10_check.sh (100%) rename .chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl => home/.chezmoiscripts/run_once_before_20_install_dev_lang.sh.tmpl (100%) rename {bin => home/bin}/executable_get-volume.sh (100%) rename {bin => home/bin}/executable_screenshot (100%) rename {bin => home/bin}/executable_screenshot-monitor (100%) rename {dot_config => home/dot_config}/alacritty/alacritty.yml (100%) rename {dot_config => home/dot_config}/environment.d/wayland.conf (100%) rename {dot_config => home/dot_config}/nvim/init.vim.tmpl (100%) rename {dot_config => home/dot_config}/pgcli/config (100%) rename {dot_config => home/dot_config}/sway/bg.png (100%) rename {dot_config => home/dot_config}/sway/bg2.png (100%) rename {dot_config => home/dot_config}/sway/config (99%) rename {dot_config => home/dot_config}/swaylock/bg.png (100%) rename {dot_config => home/dot_config}/systemd/user/sway-session.target (100%) rename {dot_config => home/dot_config}/waybar/config (100%) rename {dot_config => home/dot_config}/waybar/executable_launch.sh (100%) rename {dot_config => home/dot_config}/waybar/style.css (100%) rename {dot_config => home/dot_config}/wofi/config (100%) rename {dot_config => home/dot_config}/wofi/executable_wofi-power.sh (100%) rename {dot_config => home/dot_config}/wofi/style.css (100%) rename {dot_config => home/dot_config}/xdg-desktop-portal-wlr/config (100%) rename dot_ctags => home/dot_ctags (100%) rename dot_gitconfig.tmpl => home/dot_gitconfig.tmpl (100%) rename dot_tmux.conf => home/dot_tmux.conf (100%) rename dot_zprofile => home/dot_zprofile (100%) rename {dot_zsh => home/dot_zsh}/20_keybind.zsh (100%) rename {dot_zsh => home/dot_zsh}/30_alias.zsh (100%) rename {dot_zsh => home/dot_zsh}/50_setopt.zsh (100%) rename {dot_zsh => home/dot_zsh}/70_misc.zsh (100%) rename {dot_zsh => home/dot_zsh}/zsh.sh (100%) rename dot_zshrc.tmpl => home/dot_zshrc.tmpl (100%) rename {private_dot_ssh => home/private_dot_ssh}/config (100%) diff --git a/.chezmoiroot b/.chezmoiroot new file mode 100644 index 0000000..5e72f75 --- /dev/null +++ b/.chezmoiroot @@ -0,0 +1 @@ +home diff --git a/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl similarity index 100% rename from .chezmoi.toml.tmpl rename to home/.chezmoi.toml.tmpl diff --git a/.chezmoiscripts/run_once_after_10_install_zinit.sh b/home/.chezmoiscripts/run_once_after_10_install_zinit.sh similarity index 76% rename from .chezmoiscripts/run_once_after_10_install_zinit.sh rename to home/.chezmoiscripts/run_once_after_10_install_zinit.sh index 565d5aa..d5eec08 100644 --- a/.chezmoiscripts/run_once_after_10_install_zinit.sh +++ b/home/.chezmoiscripts/run_once_after_10_install_zinit.sh @@ -1,5 +1,9 @@ #!/bin/bash +if [ -d "$HOME/.zinit/bin" ]; then + exit 0 +fi + if ! git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin; then >&2 echo "clone zinit into ~/.zinit/bin failed" exit 1 diff --git a/.chezmoiscripts/run_after_20_install_vim_dep.sh b/home/.chezmoiscripts/run_once_after_20_install_vim_dep.sh similarity index 100% rename from .chezmoiscripts/run_after_20_install_vim_dep.sh rename to home/.chezmoiscripts/run_once_after_20_install_vim_dep.sh diff --git a/.chezmoiscripts/run_before_10_check.sh b/home/.chezmoiscripts/run_once_before_10_check.sh similarity index 100% rename from .chezmoiscripts/run_before_10_check.sh rename to home/.chezmoiscripts/run_once_before_10_check.sh diff --git a/.chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl b/home/.chezmoiscripts/run_once_before_20_install_dev_lang.sh.tmpl similarity index 100% rename from .chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl rename to home/.chezmoiscripts/run_once_before_20_install_dev_lang.sh.tmpl diff --git a/bin/executable_get-volume.sh b/home/bin/executable_get-volume.sh similarity index 100% rename from bin/executable_get-volume.sh rename to home/bin/executable_get-volume.sh diff --git a/bin/executable_screenshot b/home/bin/executable_screenshot similarity index 100% rename from bin/executable_screenshot rename to home/bin/executable_screenshot diff --git a/bin/executable_screenshot-monitor b/home/bin/executable_screenshot-monitor similarity index 100% rename from bin/executable_screenshot-monitor rename to home/bin/executable_screenshot-monitor diff --git a/dot_config/alacritty/alacritty.yml b/home/dot_config/alacritty/alacritty.yml similarity index 100% rename from dot_config/alacritty/alacritty.yml rename to home/dot_config/alacritty/alacritty.yml diff --git a/dot_config/environment.d/wayland.conf b/home/dot_config/environment.d/wayland.conf similarity index 100% rename from dot_config/environment.d/wayland.conf rename to home/dot_config/environment.d/wayland.conf diff --git a/dot_config/nvim/init.vim.tmpl b/home/dot_config/nvim/init.vim.tmpl similarity index 100% rename from dot_config/nvim/init.vim.tmpl rename to home/dot_config/nvim/init.vim.tmpl diff --git a/dot_config/pgcli/config b/home/dot_config/pgcli/config similarity index 100% rename from dot_config/pgcli/config rename to home/dot_config/pgcli/config diff --git a/dot_config/sway/bg.png b/home/dot_config/sway/bg.png similarity index 100% rename from dot_config/sway/bg.png rename to home/dot_config/sway/bg.png diff --git a/dot_config/sway/bg2.png b/home/dot_config/sway/bg2.png similarity index 100% rename from dot_config/sway/bg2.png rename to home/dot_config/sway/bg2.png diff --git a/dot_config/sway/config b/home/dot_config/sway/config similarity index 99% rename from dot_config/sway/config rename to home/dot_config/sway/config index 331ab8e..3137e54 100644 --- a/dot_config/sway/config +++ b/home/dot_config/sway/config @@ -39,6 +39,7 @@ output * bg ~/.config/sway/bg.png fill exec --no-startup-id dbus-update-activation-environment --all exec_always kanshi exec dex -a -e sway +exec nm-tray # for sway overview # exec_always rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov -t 100 diff --git a/dot_config/swaylock/bg.png b/home/dot_config/swaylock/bg.png similarity index 100% rename from dot_config/swaylock/bg.png rename to home/dot_config/swaylock/bg.png diff --git a/dot_config/systemd/user/sway-session.target b/home/dot_config/systemd/user/sway-session.target similarity index 100% rename from dot_config/systemd/user/sway-session.target rename to home/dot_config/systemd/user/sway-session.target diff --git a/dot_config/waybar/config b/home/dot_config/waybar/config similarity index 100% rename from dot_config/waybar/config rename to home/dot_config/waybar/config diff --git a/dot_config/waybar/executable_launch.sh b/home/dot_config/waybar/executable_launch.sh similarity index 100% rename from dot_config/waybar/executable_launch.sh rename to home/dot_config/waybar/executable_launch.sh diff --git a/dot_config/waybar/style.css b/home/dot_config/waybar/style.css similarity index 100% rename from dot_config/waybar/style.css rename to home/dot_config/waybar/style.css diff --git a/dot_config/wofi/config b/home/dot_config/wofi/config similarity index 100% rename from dot_config/wofi/config rename to home/dot_config/wofi/config diff --git a/dot_config/wofi/executable_wofi-power.sh b/home/dot_config/wofi/executable_wofi-power.sh similarity index 100% rename from dot_config/wofi/executable_wofi-power.sh rename to home/dot_config/wofi/executable_wofi-power.sh diff --git a/dot_config/wofi/style.css b/home/dot_config/wofi/style.css similarity index 100% rename from dot_config/wofi/style.css rename to home/dot_config/wofi/style.css diff --git a/dot_config/xdg-desktop-portal-wlr/config b/home/dot_config/xdg-desktop-portal-wlr/config similarity index 100% rename from dot_config/xdg-desktop-portal-wlr/config rename to home/dot_config/xdg-desktop-portal-wlr/config diff --git a/dot_ctags b/home/dot_ctags similarity index 100% rename from dot_ctags rename to home/dot_ctags diff --git a/dot_gitconfig.tmpl b/home/dot_gitconfig.tmpl similarity index 100% rename from dot_gitconfig.tmpl rename to home/dot_gitconfig.tmpl diff --git a/dot_tmux.conf b/home/dot_tmux.conf similarity index 100% rename from dot_tmux.conf rename to home/dot_tmux.conf diff --git a/dot_zprofile b/home/dot_zprofile similarity index 100% rename from dot_zprofile rename to home/dot_zprofile diff --git a/dot_zsh/20_keybind.zsh b/home/dot_zsh/20_keybind.zsh similarity index 100% rename from dot_zsh/20_keybind.zsh rename to home/dot_zsh/20_keybind.zsh diff --git a/dot_zsh/30_alias.zsh b/home/dot_zsh/30_alias.zsh similarity index 100% rename from dot_zsh/30_alias.zsh rename to home/dot_zsh/30_alias.zsh diff --git a/dot_zsh/50_setopt.zsh b/home/dot_zsh/50_setopt.zsh similarity index 100% rename from dot_zsh/50_setopt.zsh rename to home/dot_zsh/50_setopt.zsh diff --git a/dot_zsh/70_misc.zsh b/home/dot_zsh/70_misc.zsh similarity index 100% rename from dot_zsh/70_misc.zsh rename to home/dot_zsh/70_misc.zsh diff --git a/dot_zsh/zsh.sh b/home/dot_zsh/zsh.sh similarity index 100% rename from dot_zsh/zsh.sh rename to home/dot_zsh/zsh.sh diff --git a/dot_zshrc.tmpl b/home/dot_zshrc.tmpl similarity index 100% rename from dot_zshrc.tmpl rename to home/dot_zshrc.tmpl diff --git a/private_dot_ssh/config b/home/private_dot_ssh/config similarity index 100% rename from private_dot_ssh/config rename to home/private_dot_ssh/config