Change directories to lower case
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
4645e18f64
commit
ee60d3cb64
9 changed files with 57 additions and 43 deletions
38
install
38
install
|
@ -24,18 +24,22 @@ HOST="$(hostname)"
|
||||||
# Directories which should be created
|
# Directories which should be created
|
||||||
DIRECTORIES=(
|
DIRECTORIES=(
|
||||||
".local/log"
|
".local/log"
|
||||||
"Build"
|
"build"
|
||||||
"Downloads"
|
"documents"
|
||||||
|
"downloads"
|
||||||
".local/keys"
|
".local/keys"
|
||||||
"Music"
|
"music"
|
||||||
"Pictures"
|
"pictures"
|
||||||
"Projects"
|
"projects"
|
||||||
"Tasks"
|
"tasks"
|
||||||
"Videos"
|
"videos"
|
||||||
)
|
)
|
||||||
|
|
||||||
WORK_DIRECTORIES=(
|
WORK_DIRECTORIES=(
|
||||||
"Work"
|
"work"
|
||||||
|
".local/log"
|
||||||
|
"downloads"
|
||||||
|
".local/keys"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Files which should be symlinked in the home folder
|
# Files which should be symlinked in the home folder
|
||||||
|
@ -83,8 +87,8 @@ LINKED_FILES_HOME=(
|
||||||
# Symlinks which will be created
|
# Symlinks which will be created
|
||||||
declare -A LINKED_FILES
|
declare -A LINKED_FILES
|
||||||
LINKED_FILES=(
|
LINKED_FILES=(
|
||||||
["${HOME}/Music"]="${HOME}/Documents/Media/Music"
|
["${HOME}/music"]="${HOME}/documents/Media/Music"
|
||||||
["${HOME}/Pictures"]="${HOME}/Documents/Media/Pictures"
|
["${HOME}/pictures"]="${HOME}/documents/Media/Pictures"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Permissions to set for folders and files
|
# Permissions to set for folders and files
|
||||||
|
@ -106,7 +110,6 @@ SYSTEMD_SERVICES=(
|
||||||
"NetworkManager"
|
"NetworkManager"
|
||||||
"org.cups.cupsd"
|
"org.cups.cupsd"
|
||||||
"suspend"
|
"suspend"
|
||||||
"sxhkd"
|
|
||||||
"xboxdrv"
|
"xboxdrv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -142,19 +145,20 @@ yay -S --noconfirm --needed "$(cat "${PACKAGES_DIR}/packages.list")"
|
||||||
# Creating directories #
|
# Creating directories #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
print_section "Creating directories"
|
print_section "Creating directories"
|
||||||
for dir in "${DIRECTORIES[@]}"
|
|
||||||
do
|
|
||||||
print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
|
||||||
mkdir -p "${HOME}/${dir}"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${IS_WORK}" = "1" ]; then
|
if [ "${IS_WORK}" = "1" ]; then
|
||||||
print_section "Creating work directories"
|
|
||||||
for dir in "${WORK_DIRECTORIES[@]}"
|
for dir in "${WORK_DIRECTORIES[@]}"
|
||||||
do
|
do
|
||||||
print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
||||||
mkdir -p "${HOME}/${dir}"
|
mkdir -p "${HOME}/${dir}"
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
for dir in "${DIRECTORIES[@]}"
|
||||||
|
do
|
||||||
|
print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
||||||
|
mkdir -p "${HOME}/${dir}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
10
post-install
10
post-install
|
@ -36,9 +36,15 @@ RUST_COMPONENTS=(
|
||||||
# Main code
|
# Main code
|
||||||
#######################################
|
#######################################
|
||||||
print_section "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
|
||||||
|
|
||||||
|
print_section "Setup tasks directory"
|
||||||
|
if [ ! -d "${HOME}/tasks" ]
|
||||||
|
then
|
||||||
|
git clone gl:tasks "${HOME}/tasks"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_section "Installing global npm packages"
|
print_section "Installing global npm packages"
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# This file is loaded on boot by crontab.
|
# This file is loaded on boot by crontab.
|
||||||
|
|
||||||
# Synchronize Google Drive every 15 minutes
|
# Synchronize Google Drive every 15 minutes
|
||||||
*/15 * * * * 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 15 minutes
|
# Sync pacman databases every 15 minutes
|
||||||
*/15 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log
|
*/15 * * * * sudo $HOME/.local/bin/sync-packages >> $HOME/.local/log/cron.log
|
||||||
|
|
|
@ -26,14 +26,10 @@ alias grep="rg -n"
|
||||||
# Alias for using bat as cat replacement
|
# Alias for using bat as cat replacement
|
||||||
alias cat="bat"
|
alias cat="bat"
|
||||||
|
|
||||||
# Alias to get to my Projects folder
|
# Aliases to folders
|
||||||
alias pj="cd ~/Projects"
|
alias pj="cd ~/projects"
|
||||||
|
alias dl="cd ~/downloads"
|
||||||
# Alias to get to my Downloads folder
|
alias doc="cd ~/documents"
|
||||||
alias dl="cd ~/Downloads"
|
|
||||||
|
|
||||||
# Alias to get to my Documents folder
|
|
||||||
alias doc="cd ~/Documents"
|
|
||||||
|
|
||||||
# Alias for opening my code editor
|
# Alias for opening my code editor
|
||||||
alias e="code"
|
alias e="code"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
file:///home/severin/Documents Documents
|
file:///home/severin/documents Documents
|
||||||
file:///home/severin/Downloads Downloads
|
file:///home/severin/downloads Downloads
|
||||||
file:///home/severin/Videos Videos
|
file:///home/severin/videos Videos
|
||||||
file:///home/severin/Projects Projects
|
file:///home/severin/projects Projects
|
||||||
file:///home/severin/dotfiles dotfiles
|
file:///home/severin/dotfiles dotfiles
|
||||||
file:///home/severin/Notes Notes
|
file:///home/severin/notes Notes
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
# absolute path. No other format is supported.
|
# absolute path. No other format is supported.
|
||||||
#
|
#
|
||||||
XDG_DOCUMENTS_DIR="$HOME/Documents"
|
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||||
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||||
XDG_MUSIC_DIR="$HOME/Music"
|
XDG_MUSIC_DIR="$HOME/music"
|
||||||
XDG_PICTURES_DIR="$HOME/Pictures"
|
XDG_PICTURES_DIR="$HOME/pictures"
|
||||||
XDG_VIDEOS_DIR="$HOME/Videos"
|
XDG_VIDEOS_DIR="$HOME/videos"
|
||||||
XDG_DESKTOP_DIR="$HOME"
|
XDG_DESKTOP_DIR="$HOME"
|
||||||
XDG_TEMPLATES_DIR="$HOME"
|
XDG_TEMPLATES_DIR="$HOME"
|
||||||
XDG_PUBLICSHARE_DIR="$HOME"
|
XDG_PUBLICSHARE_DIR="$HOME"
|
||||||
|
|
|
@ -23,7 +23,7 @@ ACTIONS=(
|
||||||
"4: Selection (Clipboard)"
|
"4: Selection (Clipboard)"
|
||||||
)
|
)
|
||||||
|
|
||||||
FILENAME="${HOME}/Pictures/Screenshots/%Y-%m-%d-%H%M%S.png"
|
FILENAME="${HOME}/pictures/Screenshots/%Y-%m-%d-%H%M%S.png"
|
||||||
|
|
||||||
SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1)
|
SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1)
|
||||||
case "${SELECTION}" in
|
case "${SELECTION}" in
|
||||||
|
|
|
@ -13,9 +13,13 @@
|
||||||
# ./sync-notes
|
# ./sync-notes
|
||||||
. /home/severin/.local/bin/utils
|
. /home/severin/.local/bin/utils
|
||||||
|
|
||||||
|
if [ ! -d "/home/severin/notes" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
print_time_log "sync-notes" "Synchronizing notes"
|
print_time_log "sync-notes" "Synchronizing notes"
|
||||||
|
|
||||||
cd "/home/severin/Notes" || exit
|
cd "/home/severin/notes" || exit
|
||||||
git pull > /dev/null 2>&1
|
git pull > /dev/null 2>&1
|
||||||
git add --all > /dev/null 2>&1
|
git add --all > /dev/null 2>&1
|
||||||
git commit -s -m "Update notes" > /dev/null 2>&1
|
git commit -s -m "Update notes" > /dev/null 2>&1
|
||||||
|
|
|
@ -13,14 +13,18 @@
|
||||||
# ./sync-tasks
|
# ./sync-tasks
|
||||||
. /home/severin/.local/bin/utils
|
. /home/severin/.local/bin/utils
|
||||||
|
|
||||||
export TASKDATA="/home/severin/Tasks"
|
if [ ! -d "/home/severin/tasks" ]; then
|
||||||
export TASKRC="/home/severin/.config/task/taskrc"
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
print_time_log "sync-tasks" "Synchronizing tasks"
|
print_time_log "sync-tasks" "Synchronizing tasks"
|
||||||
|
|
||||||
|
export TASKDATA="/home/severin/tasks"
|
||||||
|
export TASKRC="/home/severin/.config/task/taskrc"
|
||||||
|
|
||||||
task sync
|
task sync
|
||||||
|
|
||||||
cd "/home/severin/Tasks" || exit
|
cd "/home/severin/tasks" || exit
|
||||||
git pull > /dev/null 2>&1
|
git pull > /dev/null 2>&1
|
||||||
git add --all > /dev/null 2>&1
|
git add --all > /dev/null 2>&1
|
||||||
git commit -s -m "Update tasks" > /dev/null 2>&1
|
git commit -s -m "Update tasks" > /dev/null 2>&1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue