Multiple updates

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2019-03-17 23:22:54 +01:00
parent c7b67a084b
commit dac6042f52
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
15 changed files with 66 additions and 51 deletions

23
install
View file

@ -93,16 +93,16 @@ SYSTEMD_SERVICES=(
#######################################
# Main code
#######################################
print_header "Installing requirements"
print_section "Installing requirements"
sudo pacman -S git base-devel --noconfirm --needed
print_header "Creating directories"
print_section "Creating directories"
for dir in "${DIRECTORIES[@]}"
do
create_directory "${dir}"
done
print_header "Installing yay"
print_section "Installing yay"
is_yay_installed=$(command -v yay)
# Install yay if not already installed
@ -118,13 +118,13 @@ else
fi
print_header "Installing packages"
print_section "Installing packages"
package_count=$(< "${PACKAGES_DIR}/packages.list" wc -l)
print_log "Installing ${package_count} packages"
# Install packages
#yay -S --noconfirm $(cat "${PACKAGES_DIR}/packages.list")
print_header "Creating symlinks"
print_section "Creating symlinks"
for file in "${LINKED_FILES_HOME[@]}";
do
create_link "${file}"
@ -136,37 +136,37 @@ for file in "${!LINKED_FILES[@]}"; do
ln -fs "${LINKED_FILES[${file}]}" "${file}"
done
print_header "Give permissions"
print_section "Give permissions"
for permission in "${!PERMISSIONS[@]}"; do
set_permission "${USER}" "${PERMISSIONS[${permission}]}" "${permission}"
done
print_header "Add user to groups"
print_section "Add user to groups"
for group in "${ADD_GROUPS[@]}"
do
add_to_group "${USER}" "${group}"
done
print_header "Enabling systemd services"
print_section "Enabling systemd services"
for service in "${SYSTEMD_SERVICES[@]}"
do
enable_service "${service}"
done
print_header "Copy custom udev rules"
print_section "Copy custom udev rules"
for file in "${SYSTEM_DIR}/etc/udev/rules.d/"*.rules
do
copy_udev_rule "${file}"
done
sudo udevadm control --reload-rules
print_header "Copy sudoers content"
print_section "Copy sudoers content"
for file in "${SYSTEM_DIR}/etc/sudoers.d/"*
do
copy_sudoers_content "${file}"
done
print_header "Create issue file"
print_section "Create issue file"
{
echo '\e{red}';
< "/etc/hostname" tr '[:lower:]' '[:upper:]' | figlet -f big | sed "s/\\\\/\\\\\\\/g";
@ -174,3 +174,4 @@ echo -e "\\\r";
echo '\e{reset}';
} >> "/tmp/issue"
sudo mv "/tmp/issue" "/etc/issue"
print_log "Issue file created"

View file

@ -35,16 +35,16 @@ RUST_COMPONENTS=(
#######################################
# Main code
#######################################
print_header "Setup notes directory"
print_section "Setup notes directory"
if [ ! -d "${HOME}/Notes" ]
then
git clone gl:notes "${HOME}/Notes"
fi
print_header "Installing global npm packages"
print_section "Installing global 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 default beta
rustup component add "${RUST_COMPONENTS[@]}"

View file

@ -12,10 +12,10 @@
"interfaceType": "XRecord",
"undoUsingBackspace": true,
"windowDefaultSize": [
1872,
924,
962
],
"hPanePosition": 472,
"hPanePosition": 233,
"columnWidths": [
150,
50,

View file

@ -12,10 +12,10 @@
"interfaceType": "XRecord",
"undoUsingBackspace": true,
"windowDefaultSize": [
1872,
924,
962
],
"hPanePosition": 472,
"hPanePosition": 233,
"columnWidths": [
150,
50,

View file

@ -1,9 +1,7 @@
{
"type": "folder",
"title": "Phrases",
"modes": [
3
],
"modes": [],
"usageCount": 4,
"showInTrayMenu": false,
"abbreviation": {

View file

@ -10,14 +10,14 @@
# USAGE:
# This file is loaded on boot by crontab.
# Synchronize Google Drive every 30 minutes
*/30 * * * * grive -d -p $HOME/Documents/ >> $HOME/.local/log/cron.log
# Synchronize Google Drive every 15 minutes
*/15 * * * * grive -d -p $HOME/Documents/ >> $HOME/.local/log/cron.log
# Sync pacman databases every 30 minutes
*/30 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log
# Sync pacman databases every 15 minutes
*/15 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log
# Synchronize notes every 5 minutes
*/5 * * * * $HOME/.local/bin/sync-notes >> $HOME/.local/log/cron.log
# Synchronize notes every 15 minutes
*/15 * * * * $HOME/.local/bin/sync-notes >> $HOME/.local/log/cron.log
# Synchronize rss feeds every 10 minutes
*/10 * * * * $HOME/.local/bin/rss-sync >> $HOME/.local/log/cron.log

View file

@ -49,3 +49,6 @@ alias gpg2='gpg2 --homedir "${XDG_DATA_HOME}/gnupg"'
# 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 for sqlite3 to use XDG directories
alias sqlite3='sqlite3 -init "${XDG_CONFIG_HOME}/sqlite3/sqliterc"'

View file

@ -35,6 +35,7 @@ export GEM_HOME="${XDG_DATA_HOME}/gem"
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}/gem/specs"
mkdir -p "${XDG_DATA_HOME}/wine/prefixes"
export WINEPREFIX="${XDG_DATA_HOME}/wine/prefixes/default"
export SQLITE_HISTORY="${XDG_DATA_HOME}/sqlite_history"
# 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}─┐"
export PS1="${PS1}${NEWLINE}└─╼ "
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\]"

View file

@ -11,7 +11,7 @@
#
# USAGE:
# ./update-count
UPDATES=$(pacman -Qu | wc -l)
UPDATES=$(yay -Qu | wc -l)
AUR_UPDATES=$(yay -Qua --devel | wc -l)
echo "${UPDATES} / ${AUR_UPDATES}"

View file

@ -20,7 +20,7 @@ allow_bold = true
dynamic_title = true
urgent_on_bell = false
clickable_url = true
font = Hack 11
font = Hack 10
scrollback_lines = 1000
search_wrap = true

View file

@ -1,5 +1,5 @@
" SCRIPT NAME:
" .vimrc
" vimrc
"
" AUTHOR:
" Severin Kaderli <severin@kaderli.dev>
@ -10,18 +10,45 @@
" USAGE:
" This file is automatically used by Vim.
" Directory configurations
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Directories "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set undodir=$XDG_CACHE_HOME/vim/undo
set directory=$XDG_CACHE_HOME/vim/swap
set backupdir=$XDG_CACHE_HOME/vim/backup
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
" Enable syntax highlighting
syntax on
set encoding=utf-8
set virtualedit=onemore
" Space settings
set tabstop=4
set softtabstop=4
set expandtab
" Enable line numbers
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 indent on
filetype plugin on

View file

@ -0,0 +1 @@
set selection-clipboard clipboard

View file

@ -16,8 +16,6 @@
START_DIR=$(pwd)
print_header "Updating submodules"
while IFS= read -r -d '' dir
do
cd "$dir" || exit 1

View file

@ -14,7 +14,6 @@
# ./upgrade
. utils
print_header "Upgrading system"
print_section "Update arch packages"
yay -Syu --devel

View file

@ -31,14 +31,6 @@ YELLOW='\033[33m'
#######################################
# 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.
# USAGE: print_time_log SCRIPT MESSAGE
function print_time_log() {