Multiple updates
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
c7b67a084b
commit
dac6042f52
15 changed files with 66 additions and 51 deletions
25
install
25
install
|
@ -93,16 +93,16 @@ SYSTEMD_SERVICES=(
|
||||||
#######################################
|
#######################################
|
||||||
# Main code
|
# Main code
|
||||||
#######################################
|
#######################################
|
||||||
print_header "Installing requirements"
|
print_section "Installing requirements"
|
||||||
sudo pacman -S git base-devel --noconfirm --needed
|
sudo pacman -S git base-devel --noconfirm --needed
|
||||||
|
|
||||||
print_header "Creating directories"
|
print_section "Creating directories"
|
||||||
for dir in "${DIRECTORIES[@]}"
|
for dir in "${DIRECTORIES[@]}"
|
||||||
do
|
do
|
||||||
create_directory "${dir}"
|
create_directory "${dir}"
|
||||||
done
|
done
|
||||||
|
|
||||||
print_header "Installing yay"
|
print_section "Installing yay"
|
||||||
is_yay_installed=$(command -v yay)
|
is_yay_installed=$(command -v yay)
|
||||||
|
|
||||||
# Install yay if not already installed
|
# Install yay if not already installed
|
||||||
|
@ -118,13 +118,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
print_header "Installing packages"
|
print_section "Installing packages"
|
||||||
package_count=$(< "${PACKAGES_DIR}/packages.list" wc -l)
|
package_count=$(< "${PACKAGES_DIR}/packages.list" wc -l)
|
||||||
print_log "Installing ${package_count} packages"
|
print_log "Installing ${package_count} packages"
|
||||||
# Install packages
|
# Install packages
|
||||||
#yay -S --noconfirm $(cat "${PACKAGES_DIR}/packages.list")
|
#yay -S --noconfirm $(cat "${PACKAGES_DIR}/packages.list")
|
||||||
|
|
||||||
print_header "Creating symlinks"
|
print_section "Creating symlinks"
|
||||||
for file in "${LINKED_FILES_HOME[@]}";
|
for file in "${LINKED_FILES_HOME[@]}";
|
||||||
do
|
do
|
||||||
create_link "${file}"
|
create_link "${file}"
|
||||||
|
@ -136,41 +136,42 @@ for file in "${!LINKED_FILES[@]}"; do
|
||||||
ln -fs "${LINKED_FILES[${file}]}" "${file}"
|
ln -fs "${LINKED_FILES[${file}]}" "${file}"
|
||||||
done
|
done
|
||||||
|
|
||||||
print_header "Give permissions"
|
print_section "Give permissions"
|
||||||
for permission in "${!PERMISSIONS[@]}"; do
|
for permission in "${!PERMISSIONS[@]}"; do
|
||||||
set_permission "${USER}" "${PERMISSIONS[${permission}]}" "${permission}"
|
set_permission "${USER}" "${PERMISSIONS[${permission}]}" "${permission}"
|
||||||
done
|
done
|
||||||
|
|
||||||
print_header "Add user to groups"
|
print_section "Add user to groups"
|
||||||
for group in "${ADD_GROUPS[@]}"
|
for group in "${ADD_GROUPS[@]}"
|
||||||
do
|
do
|
||||||
add_to_group "${USER}" "${group}"
|
add_to_group "${USER}" "${group}"
|
||||||
done
|
done
|
||||||
|
|
||||||
print_header "Enabling systemd services"
|
print_section "Enabling systemd services"
|
||||||
for service in "${SYSTEMD_SERVICES[@]}"
|
for service in "${SYSTEMD_SERVICES[@]}"
|
||||||
do
|
do
|
||||||
enable_service "${service}"
|
enable_service "${service}"
|
||||||
done
|
done
|
||||||
|
|
||||||
print_header "Copy custom udev rules"
|
print_section "Copy custom udev rules"
|
||||||
for file in "${SYSTEM_DIR}/etc/udev/rules.d/"*.rules
|
for file in "${SYSTEM_DIR}/etc/udev/rules.d/"*.rules
|
||||||
do
|
do
|
||||||
copy_udev_rule "${file}"
|
copy_udev_rule "${file}"
|
||||||
done
|
done
|
||||||
sudo udevadm control --reload-rules
|
sudo udevadm control --reload-rules
|
||||||
|
|
||||||
print_header "Copy sudoers content"
|
print_section "Copy sudoers content"
|
||||||
for file in "${SYSTEM_DIR}/etc/sudoers.d/"*
|
for file in "${SYSTEM_DIR}/etc/sudoers.d/"*
|
||||||
do
|
do
|
||||||
copy_sudoers_content "${file}"
|
copy_sudoers_content "${file}"
|
||||||
done
|
done
|
||||||
|
|
||||||
print_header "Create issue file"
|
print_section "Create issue file"
|
||||||
{
|
{
|
||||||
echo '\e{red}';
|
echo '\e{red}';
|
||||||
< "/etc/hostname" tr '[:lower:]' '[:upper:]' | figlet -f big | sed "s/\\\\/\\\\\\\/g";
|
< "/etc/hostname" tr '[:lower:]' '[:upper:]' | figlet -f big | sed "s/\\\\/\\\\\\\/g";
|
||||||
echo -e "\\\r";
|
echo -e "\\\r";
|
||||||
echo '\e{reset}';
|
echo '\e{reset}';
|
||||||
} >> "/tmp/issue"
|
} >> "/tmp/issue"
|
||||||
sudo mv "/tmp/issue" "/etc/issue"
|
sudo mv "/tmp/issue" "/etc/issue"
|
||||||
|
print_log "Issue file created"
|
|
@ -35,16 +35,16 @@ RUST_COMPONENTS=(
|
||||||
#######################################
|
#######################################
|
||||||
# Main code
|
# Main code
|
||||||
#######################################
|
#######################################
|
||||||
print_header "Setup notes directory"
|
print_section "Setup notes directory"
|
||||||
if [ ! -d "${HOME}/Notes" ]
|
if [ ! -d "${HOME}/Notes" ]
|
||||||
then
|
then
|
||||||
git clone gl:notes "${HOME}/Notes"
|
git clone gl:notes "${HOME}/Notes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "Installing global npm packages"
|
print_section "Installing global npm packages"
|
||||||
npm i -g "${NPM_PACKAGES[@]}"
|
npm i -g "${NPM_PACKAGES[@]}"
|
||||||
|
|
||||||
print_header "Install Rust toolchain and components"
|
print_section "Install Rust toolchain and components"
|
||||||
rustup toolchain install beta
|
rustup toolchain install beta
|
||||||
rustup default beta
|
rustup default beta
|
||||||
rustup component add "${RUST_COMPONENTS[@]}"
|
rustup component add "${RUST_COMPONENTS[@]}"
|
|
@ -12,10 +12,10 @@
|
||||||
"interfaceType": "XRecord",
|
"interfaceType": "XRecord",
|
||||||
"undoUsingBackspace": true,
|
"undoUsingBackspace": true,
|
||||||
"windowDefaultSize": [
|
"windowDefaultSize": [
|
||||||
1872,
|
924,
|
||||||
962
|
962
|
||||||
],
|
],
|
||||||
"hPanePosition": 472,
|
"hPanePosition": 233,
|
||||||
"columnWidths": [
|
"columnWidths": [
|
||||||
150,
|
150,
|
||||||
50,
|
50,
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
"interfaceType": "XRecord",
|
"interfaceType": "XRecord",
|
||||||
"undoUsingBackspace": true,
|
"undoUsingBackspace": true,
|
||||||
"windowDefaultSize": [
|
"windowDefaultSize": [
|
||||||
1872,
|
924,
|
||||||
962
|
962
|
||||||
],
|
],
|
||||||
"hPanePosition": 472,
|
"hPanePosition": 233,
|
||||||
"columnWidths": [
|
"columnWidths": [
|
||||||
150,
|
150,
|
||||||
50,
|
50,
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
{
|
{
|
||||||
"type": "folder",
|
"type": "folder",
|
||||||
"title": "Phrases",
|
"title": "Phrases",
|
||||||
"modes": [
|
"modes": [],
|
||||||
3
|
|
||||||
],
|
|
||||||
"usageCount": 4,
|
"usageCount": 4,
|
||||||
"showInTrayMenu": false,
|
"showInTrayMenu": false,
|
||||||
"abbreviation": {
|
"abbreviation": {
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
# USAGE:
|
# USAGE:
|
||||||
# This file is loaded on boot by crontab.
|
# This file is loaded on boot by crontab.
|
||||||
|
|
||||||
# Synchronize Google Drive every 30 minutes
|
# Synchronize Google Drive every 15 minutes
|
||||||
*/30 * * * * grive -d -p $HOME/Documents/ >> $HOME/.local/log/cron.log
|
*/15 * * * * grive -d -p $HOME/Documents/ >> $HOME/.local/log/cron.log
|
||||||
|
|
||||||
# Sync pacman databases every 30 minutes
|
# Sync pacman databases every 15 minutes
|
||||||
*/30 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log
|
*/15 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log
|
||||||
|
|
||||||
# Synchronize notes every 5 minutes
|
# Synchronize notes every 15 minutes
|
||||||
*/5 * * * * $HOME/.local/bin/sync-notes >> $HOME/.local/log/cron.log
|
*/15 * * * * $HOME/.local/bin/sync-notes >> $HOME/.local/log/cron.log
|
||||||
|
|
||||||
# Synchronize rss feeds every 10 minutes
|
# Synchronize rss feeds every 10 minutes
|
||||||
*/10 * * * * $HOME/.local/bin/rss-sync >> $HOME/.local/log/cron.log
|
*/10 * * * * $HOME/.local/bin/rss-sync >> $HOME/.local/log/cron.log
|
||||||
|
|
|
@ -48,4 +48,7 @@ alias svn='svn --config-dir "${XDG_CONFIG_HOME}/subversion"'
|
||||||
alias gpg2='gpg2 --homedir "${XDG_DATA_HOME}/gnupg"'
|
alias gpg2='gpg2 --homedir "${XDG_DATA_HOME}/gnupg"'
|
||||||
|
|
||||||
# Alias for nvidia-settings to use XDG directories
|
# Alias for nvidia-settings to use XDG directories
|
||||||
alias nvidia-settings='optirun -b primus nvidia-settings --config="${XDG_CONFIG_HOME}/nvidia/settings" -c :8'
|
alias nvidia-settings='optirun -b primus nvidia-settings --config="${XDG_CONFIG_HOME}/nvidia/settings" -c :8'
|
||||||
|
|
||||||
|
# Alias for sqlite3 to use XDG directories
|
||||||
|
alias sqlite3='sqlite3 -init "${XDG_CONFIG_HOME}/sqlite3/sqliterc"'
|
|
@ -35,6 +35,7 @@ export GEM_HOME="${XDG_DATA_HOME}/gem"
|
||||||
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}/gem/specs"
|
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}/gem/specs"
|
||||||
mkdir -p "${XDG_DATA_HOME}/wine/prefixes"
|
mkdir -p "${XDG_DATA_HOME}/wine/prefixes"
|
||||||
export WINEPREFIX="${XDG_DATA_HOME}/wine/prefixes/default"
|
export WINEPREFIX="${XDG_DATA_HOME}/wine/prefixes/default"
|
||||||
|
export SQLITE_HISTORY="${XDG_DATA_HOME}/sqlite_history"
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
mkdir -p "${XDG_DATA_HOME}/python"
|
mkdir -p "${XDG_DATA_HOME}/python"
|
||||||
|
@ -130,9 +131,4 @@ export PS1="${PS1}%F{blue}"'$(folder_size)'"%f"
|
||||||
export PS1="${PS1}%F{red}"'$(current_branch)'"%f"
|
export PS1="${PS1}%F{red}"'$(current_branch)'"%f"
|
||||||
export PS1="${PS1}─┐"
|
export PS1="${PS1}─┐"
|
||||||
export PS1="${PS1}${NEWLINE}└─╼ "
|
export PS1="${PS1}${NEWLINE}└─╼ "
|
||||||
|
export RPROMPT="╾─┘"
|
||||||
|
|
||||||
export RPROMPT="╾─┘"
|
|
||||||
|
|
||||||
|
|
||||||
#PS1="\n\[\e[30;1m\]\[\016\]l\[\017\](\[\e[34;1m\]\u@\h\[\e[30;1m\])-(\[\e[34;1m\]\j\[\e[30;1m\])-(\[\e[34;1m\]\@ \d\[\e[30;1m\])->\[\e[30;1m\]\n\[\016\]m\[\017\]-(\[\[\e[32;1m\]\w\[\e[30;1m\])-(\[\e[32;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\e[30;1m\])--> \[\e[0m\]"
|
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# USAGE:
|
# USAGE:
|
||||||
# ./update-count
|
# ./update-count
|
||||||
UPDATES=$(pacman -Qu | wc -l)
|
UPDATES=$(yay -Qu | wc -l)
|
||||||
AUR_UPDATES=$(yay -Qua --devel | wc -l)
|
AUR_UPDATES=$(yay -Qua --devel | wc -l)
|
||||||
|
|
||||||
echo "${UPDATES} / ${AUR_UPDATES}"
|
echo "${UPDATES} / ${AUR_UPDATES}"
|
|
@ -20,7 +20,7 @@ allow_bold = true
|
||||||
dynamic_title = true
|
dynamic_title = true
|
||||||
urgent_on_bell = false
|
urgent_on_bell = false
|
||||||
clickable_url = true
|
clickable_url = true
|
||||||
font = Hack 11
|
font = Hack 10
|
||||||
scrollback_lines = 1000
|
scrollback_lines = 1000
|
||||||
search_wrap = true
|
search_wrap = true
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
" SCRIPT NAME:
|
" SCRIPT NAME:
|
||||||
" .vimrc
|
" vimrc
|
||||||
"
|
"
|
||||||
" AUTHOR:
|
" AUTHOR:
|
||||||
" Severin Kaderli <severin@kaderli.dev>
|
" Severin Kaderli <severin@kaderli.dev>
|
||||||
|
@ -10,18 +10,45 @@
|
||||||
" USAGE:
|
" USAGE:
|
||||||
" This file is automatically used by Vim.
|
" This file is automatically used by Vim.
|
||||||
|
|
||||||
" Directory configurations
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Directories "
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
set undodir=$XDG_CACHE_HOME/vim/undo
|
set undodir=$XDG_CACHE_HOME/vim/undo
|
||||||
set directory=$XDG_CACHE_HOME/vim/swap
|
set directory=$XDG_CACHE_HOME/vim/swap
|
||||||
set backupdir=$XDG_CACHE_HOME/vim/backup
|
set backupdir=$XDG_CACHE_HOME/vim/backup
|
||||||
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
|
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
|
||||||
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
|
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
|
||||||
|
|
||||||
|
" Enable syntax highlighting
|
||||||
syntax on
|
syntax on
|
||||||
|
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set virtualedit=onemore
|
set virtualedit=onemore
|
||||||
|
|
||||||
|
" Space settings
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set expandtab
|
||||||
|
|
||||||
|
|
||||||
|
" Enable line numbers
|
||||||
set number
|
set number
|
||||||
|
|
||||||
|
" Show command in bottom bar
|
||||||
|
set showcmd
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Search "
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Search while characters are entered
|
||||||
|
set incsearch
|
||||||
|
|
||||||
|
" Highlight search results"
|
||||||
|
" set hlsearch
|
||||||
|
|
||||||
|
" Highlight the current line
|
||||||
|
" set cursorline
|
||||||
|
|
||||||
filetype on
|
filetype on
|
||||||
filetype indent on
|
filetype indent on
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
|
|
1
system/.config/zathura/zathurarc
Normal file
1
system/.config/zathura/zathurarc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
set selection-clipboard clipboard
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
START_DIR=$(pwd)
|
START_DIR=$(pwd)
|
||||||
|
|
||||||
print_header "Updating submodules"
|
|
||||||
|
|
||||||
while IFS= read -r -d '' dir
|
while IFS= read -r -d '' dir
|
||||||
do
|
do
|
||||||
cd "$dir" || exit 1
|
cd "$dir" || exit 1
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
# ./upgrade
|
# ./upgrade
|
||||||
. utils
|
. utils
|
||||||
|
|
||||||
print_header "Upgrading system"
|
|
||||||
print_section "Update arch packages"
|
print_section "Update arch packages"
|
||||||
yay -Syu --devel
|
yay -Syu --devel
|
||||||
|
|
||||||
|
|
|
@ -31,14 +31,6 @@ YELLOW='\033[33m'
|
||||||
#######################################
|
#######################################
|
||||||
# Helper functions
|
# Helper functions
|
||||||
#######################################
|
#######################################
|
||||||
# Function to display fancy headers
|
|
||||||
# USAGE: print_header TITLE
|
|
||||||
function print_header() {
|
|
||||||
echo -e "\n${GREEN}╔══════════════════════════════════════════════════════════════════════════════╗"
|
|
||||||
echo -e "║ $(printf "%-77s" "${1}")║"
|
|
||||||
echo -e "╚══════════════════════════════════════════════════════════════════════════════╝${RESET}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to print out a log entry together with the current date and time.
|
# Function to print out a log entry together with the current date and time.
|
||||||
# USAGE: print_time_log SCRIPT MESSAGE
|
# USAGE: print_time_log SCRIPT MESSAGE
|
||||||
function print_time_log() {
|
function print_time_log() {
|
||||||
|
@ -62,7 +54,7 @@ function print_section() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_log() {
|
function print_log() {
|
||||||
echo -e "• $1"
|
echo -e " • $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Creates the given directory in the home directory
|
# Creates the given directory in the home directory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue