-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.debian.sh
More file actions
executable file
·92 lines (74 loc) · 2.32 KB
/
install.debian.sh
File metadata and controls
executable file
·92 lines (74 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash
set -euo pipefail
# shellcheck disable=SC2154
trap 's=$?; echo >&2 "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
cd "$(dirname "$0")"
# shellcheck disable=SC2016
: '
Getting started:
If on Ubuntu, search for Software & Updates settings, then make sure all the
boxes at the top are checked, especially the "universe" one
(https://askubuntu.com/a/148645).
# First, run:
sudo apt update
# Install git.
sudo apt install git
# Authenticate with git.
# The easiest way might be with gh (https://github.com/cli/cli/blob/trunk/docs/install_linux.md)
gh auth login
mkdir -p ~/prog && \
git clone --depth=1 https://github.com/AjaiKN/dotfiles.git ~/prog/dotfiles && \
cd ~/prog/dotfiles/ && \
./install.linux.sh
'
./submodules-update.sh
sudo apt update
INSTALL="sudo apt-get install"
installcmd() {
if ! hash "$1" 2>/dev/null; then
$INSTALL "$1"
fi
}
installcmd stow
./install-files.sh
# (not required)
installcmd curl
installcmd xclip
# INSTALL="sudo snap install --classic" installcmd nvim
if ! hash "nvim" 2>/dev/null; then
installcmd neovim
fi
# recommended for doom emacs
if ! hash "fdfind" 2>/dev/null; then
installcmd fd-find
# https://github.com/sharkdp/fd?tab=readme-ov-file#on-ubuntu
mkdir -p ~/.local/bin/
ln -s "$(which fdfind)" ~/.local/bin/fd || :
fi
if hash "fdfind" 2>/dev/null && ! hash "fd" 2>/dev/null; then
# https://github.com/sharkdp/fd?tab=readme-ov-file#on-ubuntu
mkdir -p ~/.local/bin/
ln -s "$(which fdfind)" ~/.local/bin/fd || :
fi
# for compiling emacs vterm
installcmd make
installcmd cmake
# for emacs editorconfig (not required, but it's super small, and the native
# elisp version is slower)
installcmd editorconfig
if command -v gsettings >/dev/null 2>&1; then
# disable pressing command key to go to Activity Overview in GNOME
# https://github.com/utmapp/UTM/issues/5411
# https://askubuntu.com/a/1280308
# https://askubuntu.com/a/1121073
gsettings set org.gnome.mutter overlay-key '' || :
gsettings set org.gnome.shell.keybindings toggle-overview "['<Super>s']" || :
# gsettings reset org.gnome.mutter overlay-key
# gsettings reset org.gnome.shell.keybindings toggle-overview
fi
# zsh (optional)
if ! hash zsh 2>/dev/null; then
$INSTALL zsh
fi
chsh -s "$(command -v zsh)" "$USER" || echo "unable to change default shell to zsh"
exec zsh # MUST BE LAST THING IN THIS SCRIPT