diff --git a/install b/install index 1c4ff75..c3e3b7b 100755 --- a/install +++ b/install @@ -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,41 +136,42 @@ 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"; echo -e "\\\r"; echo '\e{reset}'; } >> "/tmp/issue" -sudo mv "/tmp/issue" "/etc/issue" \ No newline at end of file +sudo mv "/tmp/issue" "/etc/issue" +print_log "Issue file created" \ No newline at end of file diff --git a/post-install b/post-install index 0ee8788..321d7d7 100755 --- a/post-install +++ b/post-install @@ -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[@]}" \ No newline at end of file diff --git a/system/.config/autokey/autokey.json b/system/.config/autokey/autokey.json index d783290..88c716f 100644 --- a/system/.config/autokey/autokey.json +++ b/system/.config/autokey/autokey.json @@ -12,10 +12,10 @@ "interfaceType": "XRecord", "undoUsingBackspace": true, "windowDefaultSize": [ - 1872, + 924, 962 ], - "hPanePosition": 472, + "hPanePosition": 233, "columnWidths": [ 150, 50, diff --git a/system/.config/autokey/autokey.json~ b/system/.config/autokey/autokey.json~ index d783290..88c716f 100644 --- a/system/.config/autokey/autokey.json~ +++ b/system/.config/autokey/autokey.json~ @@ -12,10 +12,10 @@ "interfaceType": "XRecord", "undoUsingBackspace": true, "windowDefaultSize": [ - 1872, + 924, 962 ], - "hPanePosition": 472, + "hPanePosition": 233, "columnWidths": [ 150, 50, diff --git a/system/.config/autokey/data/Phrases/.folder.json b/system/.config/autokey/data/Phrases/.folder.json index 665e926..ad9e312 100644 --- a/system/.config/autokey/data/Phrases/.folder.json +++ b/system/.config/autokey/data/Phrases/.folder.json @@ -1,9 +1,7 @@ { "type": "folder", "title": "Phrases", - "modes": [ - 3 - ], + "modes": [], "usageCount": 4, "showInTrayMenu": false, "abbreviation": { diff --git a/system/.config/cron/crontab b/system/.config/cron/crontab index 9256c18..56bf574 100644 --- a/system/.config/cron/crontab +++ b/system/.config/cron/crontab @@ -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 diff --git a/system/.config/custom/aliases b/system/.config/custom/aliases index 2550236..4b5b66a 100644 --- a/system/.config/custom/aliases +++ b/system/.config/custom/aliases @@ -48,4 +48,7 @@ alias svn='svn --config-dir "${XDG_CONFIG_HOME}/subversion"' 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' \ No newline at end of file +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"' \ No newline at end of file diff --git a/system/.config/custom/env b/system/.config/custom/env index 7da1e24..2ac6478 100644 --- a/system/.config/custom/env +++ b/system/.config/custom/env @@ -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\]" \ No newline at end of file +export RPROMPT="╾─┘" \ No newline at end of file diff --git a/system/.config/polybar/scripts/update-count b/system/.config/polybar/scripts/update-count index 35d5dde..b078687 100755 --- a/system/.config/polybar/scripts/update-count +++ b/system/.config/polybar/scripts/update-count @@ -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}" \ No newline at end of file diff --git a/system/.config/termite/config b/system/.config/termite/config index 1493a7b..99b591a 100644 --- a/system/.config/termite/config +++ b/system/.config/termite/config @@ -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 diff --git a/system/.config/vim/vimrc b/system/.config/vim/vimrc index c68b652..e09ef16 100644 --- a/system/.config/vim/vimrc +++ b/system/.config/vim/vimrc @@ -1,5 +1,5 @@ " SCRIPT NAME: -" .vimrc +" vimrc " " AUTHOR: " Severin Kaderli @@ -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 diff --git a/system/.config/zathura/zathurarc b/system/.config/zathura/zathurarc new file mode 100644 index 0000000..253954a --- /dev/null +++ b/system/.config/zathura/zathurarc @@ -0,0 +1 @@ +set selection-clipboard clipboard \ No newline at end of file diff --git a/system/.local/bin/submodule-update b/system/.local/bin/submodule-update index fb2a28d..ea2646e 100755 --- a/system/.local/bin/submodule-update +++ b/system/.local/bin/submodule-update @@ -16,8 +16,6 @@ START_DIR=$(pwd) -print_header "Updating submodules" - while IFS= read -r -d '' dir do cd "$dir" || exit 1 diff --git a/system/.local/bin/upgrade b/system/.local/bin/upgrade index 090f249..bbf3f47 100755 --- a/system/.local/bin/upgrade +++ b/system/.local/bin/upgrade @@ -14,7 +14,6 @@ # ./upgrade . utils -print_header "Upgrading system" print_section "Update arch packages" yay -Syu --devel diff --git a/system/.local/bin/utils b/system/.local/bin/utils index 0423eb5..57c3430 100755 --- a/system/.local/bin/utils +++ b/system/.local/bin/utils @@ -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() { @@ -62,7 +54,7 @@ function print_section() { } function print_log() { - echo -e "• $1" + echo -e " • $1" } # Creates the given directory in the home directory