Compare commits
1 Commits
master
...
dev/script
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e5c0dfedf |
@@ -1,58 +0,0 @@
|
|||||||
[font]
|
|
||||||
size = 12.0
|
|
||||||
|
|
||||||
[font.bold]
|
|
||||||
family = "UbuntuMono Nerd Font Mono"
|
|
||||||
style = "Bold"
|
|
||||||
|
|
||||||
[font.bold_italic]
|
|
||||||
family = "UbuntuMono Nerd Font Mono"
|
|
||||||
style = "Bold Italic"
|
|
||||||
|
|
||||||
[font.normal]
|
|
||||||
family = "UbuntuMono Nerd Font Mono"
|
|
||||||
style = "Regular"
|
|
||||||
|
|
||||||
[font.italic]
|
|
||||||
family = "UbuntuMono Nerd Font Mono"
|
|
||||||
style = "Italic"
|
|
||||||
|
|
||||||
[colors.primary]
|
|
||||||
foreground = "#C5C8C6"
|
|
||||||
background = "#282A2E"
|
|
||||||
|
|
||||||
[colors.cursor]
|
|
||||||
text = '#1d1f21'
|
|
||||||
cursor='#F6F6F6'
|
|
||||||
|
|
||||||
[colors.normal]
|
|
||||||
black= "#282A2E"
|
|
||||||
red= "#CC6666"
|
|
||||||
green= "#B5BD68"
|
|
||||||
yellow= "#F0C674"
|
|
||||||
blue= "#81A2BE"
|
|
||||||
magenta= "#B294BB"
|
|
||||||
cyan= "#8ABEB7"
|
|
||||||
white= "#969896"
|
|
||||||
|
|
||||||
[colors.bright]
|
|
||||||
black= "#373B41"
|
|
||||||
red= "#FF9999"
|
|
||||||
green= "#E5ED98"
|
|
||||||
yellow= "#FFF6A4"
|
|
||||||
blue= "#B1D2EE"
|
|
||||||
magenta= "#E2C4EB"
|
|
||||||
cyan= "#BAEEE7"
|
|
||||||
white= "#C5C8C6"
|
|
||||||
|
|
||||||
[keyboard]
|
|
||||||
bindings = [
|
|
||||||
{ key = "T", mods = "Control|Shift", action = "SpawnNewInstance" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[window]
|
|
||||||
decorations = "Full"
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# vc-follow-symlinks: t
|
|
||||||
# End:
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
complete -c arkedump -f -a "(GO_FLAGS_COMPLETION=1 arkedump (string split ' ' (commandline -cp)))"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
complete -c arkesend -f -a "(GO_FLAGS_COMPLETION=1 arkesend (string split ' ' (commandline -cp)))"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
complete -c leto-cli -f -a "(GO_FLAGS_COMPLETION=1 leto-cli (string split ' ' (commandline -cp)))"
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
complete -c zeus-cli -f -a "(GO_FLAGS_COMPLETION=1 zeus-cli (string split ' ' (commandline -cp)))"
|
|
||||||
@@ -12,11 +12,6 @@ end
|
|||||||
|
|
||||||
set fish_greeting ""
|
set fish_greeting ""
|
||||||
|
|
||||||
if test -x $HOME/.local/bin
|
|
||||||
set PATH $PATH $HOME/.local/bin
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# exa
|
# exa
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -33,7 +28,6 @@ end
|
|||||||
alias emacs="emacs -nw"
|
alias emacs="emacs -nw"
|
||||||
alias gemacs="/usr/bin/emacs"
|
alias gemacs="/usr/bin/emacs"
|
||||||
set -gx EDITOR "emacs"
|
set -gx EDITOR "emacs"
|
||||||
set -gx LSP_USE_PLISTS "true"
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Deb maintainer stuff
|
# Deb maintainer stuff
|
||||||
@@ -64,18 +58,16 @@ export MINICOM="-c on"
|
|||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Anaconda / Conda / Mambaforge
|
# Conda
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
set CONDA_PREFIXES mambaforge miniforge3 miniconda3 anaconda3
|
if test -x $HOME/miniconda3/bin/conda
|
||||||
for prefix in $CONDA_PREFIXES
|
# >>> conda initialize >>>
|
||||||
if test -x $HOME/$prefix/bin/conda
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
eval $HOME/$prefix/bin/conda "shell.fish" "hook" $argv | source
|
eval $HOME/miniconda3/bin/conda "shell.fish" "hook" $argv | source
|
||||||
break
|
# <<< conda initialize <<<
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# direnv
|
# direnv
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -88,22 +80,6 @@ direnv hook fish | source
|
|||||||
|
|
||||||
starship init fish | source
|
starship init fish | source
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# CUDA
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if test -d /usr/local/cuda
|
|
||||||
set PATH $PATH /usr/local/cuda/bin
|
|
||||||
end
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# RUST
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
if test -d $HOME/.cargo/bin
|
|
||||||
set PATH $PATH $HOME/.cargo/bin
|
|
||||||
end
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Colortest
|
# Colortest
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# This file contains fish universal variable definitions.
|
# This file contains fish universal variable definitions.
|
||||||
# VERSION: 3.0
|
# VERSION: 3.0
|
||||||
SETUVAR __fish_initialized:3400
|
SETUVAR __fish_initialized:3100
|
||||||
SETUVAR fish_color_autosuggestion:969896
|
SETUVAR fish_color_autosuggestion:969896
|
||||||
SETUVAR fish_color_cancel:\x2dr
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
SETUVAR fish_color_command:b294bb
|
SETUVAR fish_color_command:b294bb
|
||||||
@@ -30,4 +30,3 @@ SETUVAR fish_pager_color_completion:normal
|
|||||||
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
||||||
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
SETUVAR fish_pager_color_selected_background:\x2dr
|
|
||||||
|
|||||||
@@ -3,7 +3,3 @@
|
|||||||
email = alexandre.tuleu.2005@polytechnique.org
|
email = alexandre.tuleu.2005@polytechnique.org
|
||||||
[credential]
|
[credential]
|
||||||
helper = cache
|
helper = cache
|
||||||
[merge]
|
|
||||||
tool = meld
|
|
||||||
[init]
|
|
||||||
defaultBranch = main
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
*~
|
*~
|
||||||
.dir-locals.el
|
.dir-locals.el
|
||||||
.envrc
|
.envrc
|
||||||
.direnv
|
|
||||||
cover.out
|
|
||||||
.projectile
|
|
||||||
.clangd
|
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
package foreign-env
|
|
||||||
package nvm
|
|
||||||
theme bobthefish
|
theme bobthefish
|
||||||
theme default
|
theme default
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ disabled = true
|
|||||||
|
|
||||||
|
|
||||||
[character] # The name of the module we are configuring is "character"
|
[character] # The name of the module we are configuring is "character"
|
||||||
success_symbol = "[](#444444)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
success_symbol = "[◤](#444444)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||||
error_symbol = "[](red)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
error_symbol = "[◤](red)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||||
|
|
||||||
[username]
|
[username]
|
||||||
style_user="bold green"
|
style_user="bold green"
|
||||||
@@ -44,7 +44,7 @@ format="[$symbol$version]($style) "
|
|||||||
disabled = false
|
disabled = false
|
||||||
map_symbol = true
|
map_symbol = true
|
||||||
style="bg:#444444 red"
|
style="bg:#444444 red"
|
||||||
format = "[](#444444 bg:red)[$symbol $status ](bg:red)"
|
format = "[◤](#444444 bg:red)[$symbol $status ](bg:red)"
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
disabled = false
|
disabled = false
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ tmux_conf_theme_right_separator_sub='\uE0B3' # PowerlineSymbols.otf font, see
|
|||||||
# - #{username}
|
# - #{username}
|
||||||
# - #{username_ssh}
|
# - #{username_ssh}
|
||||||
tmux_conf_theme_status_left=" ❐ #S "
|
tmux_conf_theme_status_left=" ❐ #S "
|
||||||
tmux_conf_theme_status_right=" #{prefix}#{pairing}#{synchronized} ,#{?battery_status,#{battery_status},}#{?battery_vbar, #{battery_vbar},}#{?battery_percentage, #{battery_percentage}, } #{weather} #{cpu_fg_color} #{cpu_percentage} #{ram_fg_color} #{ram_percentage} #{cpu_temp_fg_color}#{cpu_temp_icon}#{cpu_temp} , %R , %d %b |#{root}"
|
tmux_conf_theme_status_right=" #{prefix}#{pairing}#{synchronized} ,#{?battery_status,#{battery_status},}#{?battery_vbar, #{battery_vbar},}#{?battery_percentage, #{battery_percentage}, } #{weather} #{cpu_fg_color} #{cpu_percentage} #{ram_fg_color} #{ram_percentage} #{cpu_temp_fg_color}#{cpu_temp_icon}#{cpu_temp} , %R , %d %b |#{root}"
|
||||||
|
|
||||||
# status left style
|
# status left style
|
||||||
tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8"
|
tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8"
|
||||||
@@ -341,11 +341,11 @@ tmux_conf_copy_to_os_clipboard=false
|
|||||||
#set -g mode-keys vi
|
#set -g mode-keys vi
|
||||||
|
|
||||||
# replace C-b by C-a instead of using both prefixes
|
# replace C-b by C-a instead of using both prefixes
|
||||||
set -gu prefix2
|
# set -gu prefix2
|
||||||
unbind C-a
|
# unbind C-a
|
||||||
unbind C-b
|
# unbind C-b
|
||||||
set -g prefix C-\\
|
# set -g prefix C-a
|
||||||
bind C-\\ send-prefix
|
# bind C-a send-prefix
|
||||||
|
|
||||||
# move status line to top
|
# move status line to top
|
||||||
#set -g status-position top
|
#set -g status-position top
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -1,24 +0,0 @@
|
|||||||
# Personnal configuration
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
You can install this configuration on a new system using
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -sSL https://git.tuleu.science/atuleu/home/raw/branch/master/update.sh | bash && $HOME/.home/update.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
## Keeping it synced
|
|
||||||
|
|
||||||
You can then update the configuration with:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$HOME/.home/update.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
On a GNOME environment you may want to:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$HOME/.home/update.sh --gnome
|
|
||||||
```
|
|
||||||
|
|
||||||
This will install necessary fonts and makes GNOME terminal actually looks good.
|
|
||||||
@@ -3,7 +3,7 @@ background-color='rgb(40,42,46)'
|
|||||||
background-transparency-percent=21
|
background-transparency-percent=21
|
||||||
bold-color-same-as-fg=true
|
bold-color-same-as-fg=true
|
||||||
custom-command='env TERM=xterm-direct /usr/bin/fish'
|
custom-command='env TERM=xterm-direct /usr/bin/fish'
|
||||||
font='UbuntuMono Nerd Font Mono 11'
|
font='UbuntuMono Nerd Font 11'
|
||||||
foreground-color='rgb(197,200,198)'
|
foreground-color='rgb(197,200,198)'
|
||||||
login-shell=false
|
login-shell=false
|
||||||
palette=['rgb(40,42,46)', 'rgb(204,102,102)', 'rgb(181,189,104)', 'rgb(240,198,116)', 'rgb(129,162,190)', 'rgb(178,148,187)', 'rgb(138,190,183)', 'rgb(150,152,150)', 'rgb(55,59,65)', 'rgb(255,153,153)', 'rgb(229,237,152)', 'rgb(255,246,164)', 'rgb(177,210,238)', 'rgb(226,196,235)', 'rgb(186,238,231)', 'rgb(197,200,198)']
|
palette=['rgb(40,42,46)', 'rgb(204,102,102)', 'rgb(181,189,104)', 'rgb(240,198,116)', 'rgb(129,162,190)', 'rgb(178,148,187)', 'rgb(138,190,183)', 'rgb(150,152,150)', 'rgb(55,59,65)', 'rgb(255,153,153)', 'rgb(229,237,152)', 'rgb(255,246,164)', 'rgb(177,210,238)', 'rgb(226,196,235)', 'rgb(186,238,231)', 'rgb(197,200,198)']
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
(
|
|
||||||
name: "Tomorrow Night - Tweeked",
|
|
||||||
foreground: "#C5C8C6",
|
|
||||||
background: "#282A2E",
|
|
||||||
cursor: "#F6F6F6",
|
|
||||||
dim_foreground: "#282A2E",
|
|
||||||
normal: (
|
|
||||||
black: "#282A2E",
|
|
||||||
red: "#CC6666",
|
|
||||||
green: "#B5BD68",
|
|
||||||
yellow: "#F0C674",
|
|
||||||
blue: "#81A2BE",
|
|
||||||
magenta: "#B294BB",
|
|
||||||
cyan: "#8ABEB7",
|
|
||||||
white: "#969896",
|
|
||||||
),
|
|
||||||
bright: (
|
|
||||||
black: "#373B41",
|
|
||||||
red: "#FF9999",
|
|
||||||
green: "#E5ED98",
|
|
||||||
yellow: "#FFF6A4",
|
|
||||||
blue: "#B1D2EE",
|
|
||||||
magenta: "#E2C4EB",
|
|
||||||
cyan: "#BAEEE7",
|
|
||||||
white: "#C5C8C6",
|
|
||||||
),
|
|
||||||
dim: (
|
|
||||||
black: "#1f1d21",
|
|
||||||
red: "#BB5555",
|
|
||||||
green: "#A4AC57",
|
|
||||||
yellow: "#DFB563",
|
|
||||||
blue: "#7091AD",
|
|
||||||
magenta: "#A183AA",
|
|
||||||
cyan: "#79ADA6",
|
|
||||||
white: "#858785",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
303
update.sh
303
update.sh
@@ -2,110 +2,13 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
function print_help() {
|
|
||||||
echo "usage .home/update.sh [-g/--gnome] [-h/--help] [-v/--berbose] [-d/--dry]
|
|
||||||
|
|
||||||
Installs and updates shared configuration on a system. Options are:
|
|
||||||
|
|
||||||
-h/--help : print this help
|
|
||||||
--reinstall : force reinstallation
|
|
||||||
-g/--gnome : system is intended to run in a GNOME environement, and
|
|
||||||
will setup gnome-terminal accordingly. Do not
|
|
||||||
activate on headless system.
|
|
||||||
--font : Installs font for gnome environment (selected if --gnome)
|
|
||||||
-v/--verbose : prints command before running them
|
|
||||||
-n/--dry : dry run, do not execute commands. Implies --verbose.
|
|
||||||
"
|
|
||||||
}
|
|
||||||
|
|
||||||
function exit_error() {
|
|
||||||
print_help
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
GNOME=false
|
|
||||||
FONT=false
|
|
||||||
VERBOSE=false
|
|
||||||
DRY=false
|
|
||||||
REINSTALL=false
|
|
||||||
|
|
||||||
function set_reinstall_on() {
|
|
||||||
REINSTALL=true
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_gnome_on() {
|
|
||||||
GNOME=true
|
|
||||||
FONT=true
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_font_on() {
|
|
||||||
FONT=true
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_verbose_on() {
|
|
||||||
VERBOSE=true
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_dry_on() {
|
|
||||||
DRY=true
|
|
||||||
VERBOSE=true
|
|
||||||
}
|
|
||||||
|
|
||||||
while getopts "vnhg-:" optchar
|
|
||||||
do
|
|
||||||
case "${optchar}" in
|
|
||||||
-)
|
|
||||||
case "${OPTARG}" in
|
|
||||||
reinstall)
|
|
||||||
set_reinstall_on
|
|
||||||
;;
|
|
||||||
gnome)
|
|
||||||
set_gnome_on
|
|
||||||
;;
|
|
||||||
verbose)
|
|
||||||
set_verbose_on
|
|
||||||
;;
|
|
||||||
font)
|
|
||||||
set_font_on
|
|
||||||
;;
|
|
||||||
dry)
|
|
||||||
set_dry_on
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "invalid argument --${OPTARG}"
|
|
||||||
exit_error
|
|
||||||
;;
|
|
||||||
esac;;
|
|
||||||
h)
|
|
||||||
print_help
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
g)
|
|
||||||
set_gnome_on
|
|
||||||
;;
|
|
||||||
n)
|
|
||||||
set_dry_on
|
|
||||||
;;
|
|
||||||
v)
|
|
||||||
set_verbose_on
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
exit_error
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
files=".config/fish \
|
files=".config/fish \
|
||||||
.config/git \
|
.config/git \
|
||||||
.config/omf \
|
.config/omf \
|
||||||
.config/starship.toml \
|
.config/starship.toml \
|
||||||
.local/share/omf \
|
.local/share/omf \
|
||||||
.emacs \
|
.emacs \
|
||||||
.tmux.conf.local \
|
.tmux.conf.local"
|
||||||
.config/alacritty.toml"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function this_script_root_dir() {
|
function this_script_root_dir() {
|
||||||
@@ -113,158 +16,15 @@ function this_script_root_dir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
if $VERBOSE
|
echo "$@"
|
||||||
then
|
|
||||||
echo "[$@]"
|
|
||||||
fi
|
|
||||||
if ! $DRY
|
|
||||||
then
|
|
||||||
$@
|
$@
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_git() {
|
|
||||||
if $VERBOSE
|
|
||||||
then
|
|
||||||
echo "[git $@] in $(this_script_root_dir)"
|
|
||||||
fi
|
|
||||||
if ! $DRY
|
|
||||||
then
|
|
||||||
pushd $(this_script_root_dir) 1>/dev/null
|
|
||||||
if $VERBOSE
|
|
||||||
then
|
|
||||||
git $@
|
|
||||||
else
|
|
||||||
git $@ 1>/dev/null
|
|
||||||
fi
|
|
||||||
popd 1>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function load_gnome_terminal_profiles() {
|
function load_gnome_terminal_profiles() {
|
||||||
echo "--- Installing GNOME terminal profile"
|
|
||||||
if which dconf 1>/dev/null
|
|
||||||
then
|
|
||||||
run dconf load /org/gnome/terminal/legacy/profiles:/ < $(this_script_root_dir)/gnome-terminal-profiles.dconf
|
run dconf load /org/gnome/terminal/legacy/profiles:/ < $(this_script_root_dir)/gnome-terminal-profiles.dconf
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_fish() {
|
function install_home() {
|
||||||
echo "--- Ensuring fish is current shell"
|
|
||||||
local fish_good=0
|
|
||||||
if ! which fish 1>/dev/null
|
|
||||||
then
|
|
||||||
fish_good=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
local current_version=$(fish --version | cut -d " " -f 3)
|
|
||||||
local current_version_test=$(cat <<EOF
|
|
||||||
${current_version}
|
|
||||||
3.4.0
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
if [ $(echo "${current_version_test}" | sort -n | head -1) != "3.4.0" ]
|
|
||||||
then
|
|
||||||
echo "Wrong version of fish ${current_version}"
|
|
||||||
fish_good=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $fish_good -eq 1 ]
|
|
||||||
then
|
|
||||||
echo "+++ Installing fish from PPA"
|
|
||||||
run sudo add-apt-repository -y ppa:fish-shell/release-3
|
|
||||||
run sudo apt update
|
|
||||||
run sudo apt install -y fish
|
|
||||||
else
|
|
||||||
echo "+++ Fish is installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fish=$(which fish)
|
|
||||||
current_shell=$(grep $USER /etc/passwd | cut -d ":" -f 7)
|
|
||||||
if [ $current_shell != $fish ]
|
|
||||||
then
|
|
||||||
echo "+++ Changing shell to $fish (you will be prompted for passwd)"
|
|
||||||
run chsh -s $fish
|
|
||||||
else
|
|
||||||
echo "+++ Default shell is $fish"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_direnv() {
|
|
||||||
echo "--- Ensuring direnv is installed"
|
|
||||||
if ! which direnv 1>/dev/null
|
|
||||||
then
|
|
||||||
echo "++ Installing direnv"
|
|
||||||
run sudo apt-get install -y direnv
|
|
||||||
else
|
|
||||||
echo "+++ direnv is installed"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function install_starship() {
|
|
||||||
echo "--- Ensuring starship is installed"
|
|
||||||
if which starship 1>/dev/null
|
|
||||||
then
|
|
||||||
echo "+++ Starship is installed"
|
|
||||||
if ! $REINSTALL
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
echo "+++ Reinstalling starship"
|
|
||||||
fi
|
|
||||||
echo "+++ Installing starship"
|
|
||||||
if $VERBOSE
|
|
||||||
then
|
|
||||||
echo "[curl -sS https://starship.rs/install.sh | sh -s -- --yes]"
|
|
||||||
fi
|
|
||||||
if ! $DRY
|
|
||||||
then
|
|
||||||
curl -sS https://starship.rs/install.sh | sh -s -- --yes
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_ubuntu_mono_nerd() {
|
|
||||||
echo "--- Ensuring Ubuntu Mono Nerd font is present"
|
|
||||||
if [ ! -e /usr/share/terminfo/x/xterm-direct ]
|
|
||||||
then
|
|
||||||
run sudo apt-get install -y ncurses-term
|
|
||||||
else
|
|
||||||
echo "+++ xterm-direct is in terminfo database"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if fc-list | grep "UbuntuMono Nerd Font" 1>/dev/null
|
|
||||||
then
|
|
||||||
echo "+++ UbuntuMono Nerd font is installed"
|
|
||||||
if ! $REINSTALL
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
echo "+++ Reinstalling UbuntuMono Nerd font"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "+++ Fetching UbuntuMono Nerd Font"
|
|
||||||
run mkdir -p ~/.local/share/fonts
|
|
||||||
pushd ~/.local/share/fonts
|
|
||||||
run curl -fL -o UbuntuMonoNerdFontMono-Regular.ttf https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/UbuntuMono/Regular/UbuntuMonoNerdFontMono-Regular.ttf
|
|
||||||
popd
|
|
||||||
run fc-cache -f
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_deps() {
|
|
||||||
install_fish
|
|
||||||
install_direnv
|
|
||||||
install_starship
|
|
||||||
if $FONT
|
|
||||||
then
|
|
||||||
install_ubuntu_mono_nerd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_files() {
|
|
||||||
echo "--- Ensuring symlinks to git file are present"
|
|
||||||
for f in $files
|
for f in $files
|
||||||
do
|
do
|
||||||
run rm -Rf $HOME/$f
|
run rm -Rf $HOME/$f
|
||||||
@@ -276,58 +36,13 @@ function install_files() {
|
|||||||
run ln -sf $(this_script_root_dir)/$f $HOME/$f
|
run ln -sf $(this_script_root_dir)/$f $HOME/$f
|
||||||
done
|
done
|
||||||
run ln -sf $(this_script_root_dir)/.tmux/.tmux.conf $HOME/.tmux.conf
|
run ln -sf $(this_script_root_dir)/.tmux/.tmux.conf $HOME/.tmux.conf
|
||||||
}
|
|
||||||
|
|
||||||
function update_oh_my_fish() {
|
|
||||||
echo "--- Updating Oh My Fish"
|
|
||||||
FISH=$(which fish)
|
|
||||||
if $VERBOSE
|
|
||||||
then
|
|
||||||
echo "[$FISH -c 'omf install']"
|
|
||||||
fi
|
|
||||||
if ! $DRY
|
|
||||||
then
|
|
||||||
if $VERBOSE
|
|
||||||
then
|
|
||||||
$FISH -c 'omf install'
|
|
||||||
else
|
|
||||||
$FISH -c 'omf install' 1>/dev/null
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function update_home() {
|
|
||||||
if $VERBOSE
|
|
||||||
then
|
|
||||||
echo "--- this_script_root_dir: $(this_script_root_dir)"
|
|
||||||
fi
|
|
||||||
update_repos
|
|
||||||
install_deps
|
|
||||||
install_files
|
|
||||||
update_oh_my_fish
|
|
||||||
if $GNOME
|
|
||||||
then
|
|
||||||
load_gnome_terminal_profiles
|
load_gnome_terminal_profiles
|
||||||
fi
|
|
||||||
if ! $DRY
|
|
||||||
then
|
|
||||||
echo "--- git.tuleu.science:atuleu/home.git updated and set"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_repos() {
|
|
||||||
echo "--- Updating git.tuleu.science:atuleu/home.git"
|
|
||||||
run_git pull
|
|
||||||
run_git submodule init
|
|
||||||
run_git submodule update
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -z $BASH_SOURCE ] && [ ! -d "$HOME/.home" ]
|
pushd $(this_script_root_dir)
|
||||||
then
|
git pull
|
||||||
echo "--- cloning git.tuleu.science:atuleu/home.git in $HOME/.home"
|
git submodule init
|
||||||
pushd $HOME 1>/dev/null
|
git submodule update
|
||||||
run_git clone https://git.tuleu.science/atuleu/home.git .home
|
popd
|
||||||
popd 1>/dev/null
|
install_home
|
||||||
else
|
|
||||||
update_home
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user