Skip to content

Commit 9bdf25e

Browse files
committed
add termux
1 parent 71f652b commit 9bdf25e

8 files changed

Lines changed: 92 additions & 14 deletions

File tree

bw.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ case "$cmd" in
144144

145145
rm -f "$tmp_local" "$tmp_remote"
146146
trap - EXIT
147+
chmod 0400 ~/.ssh/id_rsa
147148
done
148149
;;
149150

conf/alacritty/alacritty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ import = [
3030
bindings = [
3131
{ key = "C", mods = "Alt", action = "Copy" },
3232
{ key = "V", mods = "Alt", action = "Paste" },
33+
{ key = "V", mods = "Control", action = "Paste" },
3334
]

conf/vimrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set incsearch
2424
set expandtab
2525
set smarttab
2626
set tabstop=4
27-
set backspace="indent,eol,start"
27+
set backspace=indent,eol,start
2828
set shiftwidth=4
2929
set scrolloff=4
3030
set cmdheight=2

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

init_pkg.sh

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
#!/usr/bin/env bash
22
set -xe
33

4+
_fonts() {
5+
FONT_VERSION="v3.4.0"
6+
FONT_DIR="$HOME/.local/share/fonts"
7+
8+
FONT_NAMES=("FiraCode" "Hack" "JetBrainsMono" "RobotoMono" "SourceCodePro" "NotoMono")
9+
10+
echo "Downloading and installing Nerd Fonts..."
11+
12+
mkdir -p "$FONT_DIR"
13+
14+
for FONT_NAME in "${FONT_NAMES[@]}"; do
15+
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/download/$FONT_VERSION/$FONT_NAME.zip"
16+
17+
wget -q --show-progress "$FONT_URL" -O "$HOME/$FONT_NAME.zip"
18+
if [[ $? -ne 0 ]]; then
19+
echo "Download failed for $FONT_NAME. Please check your network connection or font name!"
20+
continue
21+
fi
22+
23+
unzip -o "$HOME/$FONT_NAME.zip" -d "$FONT_DIR"
24+
rm -f "$HOME/$FONT_NAME.zip"
25+
26+
echo "$FONT_NAME font installed to $FONT_DIR."
27+
done
28+
29+
fc-cache -fv
30+
echo "All Nerd Fonts installation completed!"
31+
}
32+
433
_deepin() {
534
PACKAGE_FILE="deepin.list"
635
if [[ ! -f "package/$PACKAGE_FILE" ]]; then
@@ -9,7 +38,7 @@ _deepin() {
938
fi
1039
echo "deb https://pro-store-packages.uniontech.com/appstore eagle-pro appstore" | sudo tee /etc/apt/sources.list.d/appstoreuos.list
1140
sudo apt update
12-
xargs -a "$PACKAGE_FILE" -r sudo apt install -y
41+
cat "package/$PACKAGE_FILE" | grep -vE '^\s*#' | grep -vE '^\s*$' | xargs -r sudo apt install -y
1342
}
1443

1544
_arch() {
@@ -18,8 +47,19 @@ _arch() {
1847
echo "error:$PACKAGE_FILE not exsit!"
1948
exit 1
2049
fi
21-
paru -Syu --noconfirm
22-
xargs -a "package/$PACKAGE_FILE" -r paru -Sy --noconfirm
50+
sudo paru -Syu --noconfirm
51+
cat "package/$PACKAGE_FILE" | grep -vE '^\s*#' | grep -vE '^\s*$' | xargs -r sudo paru -Sy --noconfirm
52+
}
53+
54+
_termux() {
55+
PACKAGE_FILE="termux.list"
56+
if [[ ! -f "package/$PACKAGE_FILE" ]]; then
57+
echo "error:$PACKAGE_FILE not exsit!"
58+
exit 1
59+
fi
60+
pkg update
61+
cat "package/$PACKAGE_FILE" | grep -vE '^\s*#' | grep -vE '^\s*$' | xargs -r pkg i -y
62+
vs start sshd
2363
}
2464

2565
case $1 in
@@ -29,8 +69,13 @@ deepin)
2969
arch)
3070
_arch
3171
;;
72+
termux)
73+
_termux
74+
;;
3275
esac
76+
_fonts
3377

78+
ln -sfn $HOME/dotfiles/conf/vimrc $HOME/.vimrc
3479
ln -sfn $HOME/dotfiles/conf/alacritty $HOME/.config/alacritty
3580
ln -sfn $HOME/dotfiles/conf/ghostty/ $HOME/.config/ghostty
3681
ln -sfn $HOME/dotfiles/conf/kanata $HOME/.config/kanata

modules/app.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
imv
99
emacs
1010
alacritty
11-
nekoray
1211
wezterm
1312
];
1413

modules/tools.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
psmisc
66
atool
77
bc
8+
bitwarden-cli
89
dos2unix
910
tree
1011
vivid

package/termux.list

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
alacritty
2+
# ghostty
3+
fastfetch
4+
firefox
5+
codelldb
6+
vsix-package-codelldb
7+
vlc
8+
chromium
9+
syncthing
10+
# triliumnext-bin
11+
# fcitx5
12+
# fcitx5-rime
13+
# fcitx5-configtool
14+
kdenlive
15+
# krita
16+
gimp
17+
openscad
18+
vim
19+
mesa
20+
mesa-vulkan-ice-freedreno
21+
proot
22+
proot-distro
23+
openssh
24+
termux-x11-nightly
25+
termux-tools
26+
termux-services
27+
tree
28+
zip
29+
unzip
30+
wget
31+
xfce4

0 commit comments

Comments
 (0)