diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..88c7d8a --- /dev/null +++ b/.bash_profile @@ -0,0 +1,13 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +if [[ -z $DISPLAY && $(tty) == /dev/tty1 ]] ; then + sway & +fi + +bash .config/genavbackgroundcolor.sh +bash .config/updatecolors.sh + diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..482dccf --- /dev/null +++ b/.bashrc @@ -0,0 +1,185 @@ +# +# ~/.bashrc +# + +[[ $- != *i* ]] && return + +colors() { + local fgc bgc vals seq0 + + printf "Color escapes are %s\n" '\e[${value};...;${value}m' + printf "Values 30..37 are \e[33mforeground colors\e[m\n" + printf "Values 40..47 are \e[43mbackground colors\e[m\n" + printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" + + # foreground colors + for fgc in {30..37}; do + # background colors + for bgc in {40..47}; do + fgc=${fgc#37} # white + bgc=${bgc#40} # black + + vals="${fgc:+$fgc;}${bgc}" + vals=${vals%%;} + + seq0="${vals:+\e[${vals}m}" + printf " %-9s" "${seq0:-(default)}" + printf " ${seq0}TEXT\e[m" + printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" + done + echo; echo + done +} + +[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion + +# Change the window title of X terminals +case ${TERM} in + xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' + ;; + screen*) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' + ;; +esac + +use_color=true + +# Set colorful PS1 only on colorful terminals. +# dircolors --print-database uses its own built-in database +# instead of using /etc/DIR_COLORS. Try to use the external file +# first to take advantage of user additions. Use internal bash +# globbing instead of external grep binary. +safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM +match_lhs="" +[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" +[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ + && match_lhs=$(dircolors --print-database) +[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true + +if ${use_color} ; then + # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 + if type -P dircolors >/dev/null ; then + if [[ -f ~/.dir_colors ]] ; then + eval $(dircolors -b ~/.dir_colors) + elif [[ -f /etc/DIR_COLORS ]] ; then + eval $(dircolors -b /etc/DIR_COLORS) + fi + fi + + if [[ ${EUID} == 0 ]] ; then + PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' + else + PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' + fi + + alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' +else + if [[ ${EUID} == 0 ]] ; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' + fi +fi + +unset use_color safe_term match_lhs sh + +alias cp="cp -i" # confirm before overwriting something +alias df='df -h' # human-readable sizes +alias free='free -m' # show sizes in MB +alias np='nano -w PKGBUILD' +alias more=less +alias hg='history | grep' +alias psql='psql -U postgres' +alias rmou='rclone mount OneDriveUGent: ~/Documents/OneDriveUGent/' +alias rmop='rclone mount OneDrivePersonal: ~/Documents/OneDrivePersonal' +alias helios='ssh tdpeuter@helios.ugent.be' +alias resblue='systemctl restart bluetooth' +alias sysconfdr='cd ~/Documents/OneDrivePersonal/_PERSOONLIJK/_OTHER/Code/sysconfig/' +alias Personal='cd ~/Documents/OneDrivePersonal/_PERSOONLIJK' +alias UGent='cd ~/Documents/OneDriveUGent/Informatica\ J1\ 2021-2022/' + +xhost +local:root > /dev/null 2>&1 + +# Personal cpdir function, that creates a directory if necessary +cpdir () { + + # Check arguments + if [[ $# == 2 ]] ; then + from=$(dirname $1) + fromfile=$(basename $1) + to=$(dirname $2) + tofile=$(basename $2) + else + echo "cpdir: Not enough arguments" + echo "cpdir: Syntaxis: cpdir " + return + fi + + # Check file + if [[ ! -f $1 ]] ; then + echo "cpdir: Source does not exist: $1" + return + fi + + echo "Move ${fromfile} from ${from} to ${to} as ${tofile}?" + echo -n "y/n > " + read answer + + if [[ ${answer} == "y" ]] ; then + mkdir -pv $to + cp $1 $2 + echo "Done" + elif [[ ${answer} == "n" ]] ; then + echo "Not copying..." + else + echo "Invalid option" + return + fi + +} + +# Bash won't get SIGWINCH if another process is in the foreground. +# Enable checkwinsize so that bash will check the terminal size when +# it regains control. #65623 +# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) +shopt -s checkwinsize + +shopt -s expand_aliases + +# export QT_SELECT=4 + +# Enable history appending instead of overwriting. #139609 +shopt -s histappend + +# +# # ex - archive extractor +# # usage: ex +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + diff --git a/.config/OneDrivePersonal/.config.backup b/.config/OneDrivePersonal/.config.backup new file mode 100644 index 0000000..79fa4bc --- /dev/null +++ b/.config/OneDrivePersonal/.config.backup @@ -0,0 +1,3 @@ +sync_dir = "~/Documents/OneDrivePersonal" +skip_file = ".~*|*~" +log_dir = "/var/log/OneDrivePersonal/" diff --git a/.config/OneDrivePersonal/.config.hash b/.config/OneDrivePersonal/.config.hash new file mode 100644 index 0000000..048e2af --- /dev/null +++ b/.config/OneDrivePersonal/.config.hash @@ -0,0 +1 @@ +N+ciawxBzBnRa8kEaUxmJ/QDbiQ= \ No newline at end of file diff --git a/.config/OneDrivePersonal/config b/.config/OneDrivePersonal/config index 48fcbb4..79fa4bc 100644 --- a/.config/OneDrivePersonal/config +++ b/.config/OneDrivePersonal/config @@ -1,4 +1,3 @@ -# Directory where the files will be synced sync_dir = "~/Documents/OneDrivePersonal" -# Skip files and directories that match this pattern skip_file = ".~*|*~" +log_dir = "/var/log/OneDrivePersonal/" diff --git a/.config/OneDrivePersonal/items.sqlite3 b/.config/OneDrivePersonal/items.sqlite3 new file mode 100644 index 0000000..f83e2ba Binary files /dev/null and b/.config/OneDrivePersonal/items.sqlite3 differ diff --git a/.config/OneDrivePersonal/refresh_token b/.config/OneDrivePersonal/refresh_token new file mode 100644 index 0000000..0b161da --- /dev/null +++ b/.config/OneDrivePersonal/refresh_token @@ -0,0 +1 @@ +M.R3_BL2.-Cfgpauy9JaZ!1TfoyfMl8idX8MnQYUd1kPDzfkUg8z8DSZBVsqvdX5rqjvuCP3moHoMX*1R6cIeWH!oV57AcXc6U28cGYTkpNNPUXg1ahfL0tww9AFpRsNjssZWAyRTC3hbGxA7JsIV99Mzg5XS2XG7MrlqctXit7gOnhqrX76OZsdM3e!!xuL!6hC9dGwhI4Byl8yKaPfJLpBkxjb8kPmZABgt9YkbLGRMm3fYGY*y3COHZUy6by7sdjfVFHln6DcCnLmuLcSAWqxtQpRLvAlc0c*bSk3oqFLUtvWOVEEZx0NmiYI3OVZ1wSzI6UwIyswP7YnAJTLSZXIMnr!52*cc$ \ No newline at end of file diff --git a/.config/OneDriveUGent/.config.backup b/.config/OneDriveUGent/.config.backup new file mode 100644 index 0000000..786bf22 --- /dev/null +++ b/.config/OneDriveUGent/.config.backup @@ -0,0 +1,4 @@ +sync_dir = "~/Documents/OneDriveUGent" +skip_file = ".~*|~*" +log_dir = "/var/log/OneDriveUGent/" +enable_logging = "true" diff --git a/.config/OneDriveUGent/.config.hash b/.config/OneDriveUGent/.config.hash new file mode 100644 index 0000000..36d19e1 --- /dev/null +++ b/.config/OneDriveUGent/.config.hash @@ -0,0 +1 @@ +MeoUuqbaIuENcD7dea821HR7xB0= \ No newline at end of file diff --git a/.config/OneDriveUGent/config b/.config/OneDriveUGent/config index 9a4905a..786bf22 100644 --- a/.config/OneDriveUGent/config +++ b/.config/OneDriveUGent/config @@ -1,4 +1,4 @@ -# Directory where the files will be synced sync_dir = "~/Documents/OneDriveUGent" -# Skip files and directories that match this pattern -skip_file = ".~*|*~" +skip_file = ".~*|~*" +log_dir = "/var/log/OneDriveUGent/" +enable_logging = "true" diff --git a/.config/OneDriveUGent/items.sqlite3 b/.config/OneDriveUGent/items.sqlite3 new file mode 100644 index 0000000..f675ab6 Binary files /dev/null and b/.config/OneDriveUGent/items.sqlite3 differ diff --git a/.config/OneDriveUGent/refresh_token b/.config/OneDriveUGent/refresh_token new file mode 100644 index 0000000..c585911 --- /dev/null +++ b/.config/OneDriveUGent/refresh_token @@ -0,0 +1 @@ +0.AUgA3hyB1-_sbEmPkaF4YkG5nECnDNU_yBtNthYSxRk4TwxIADA.AgABAAAAAAD--DLA3VO7QrddgJg7WevrAgDs_wQA9P-eyEX0afxnVhDKvW3e_EqUuDQqPkd5DbxZ_U6nxFK59RAmtqquvdDIyJ5WyDPsaPVCUqkifIYMA-1Dwtlt_lT8CGc7kClmOUZDwNgCSLgS9-Nug89HbSPDZVydc1YMI1DDXDRz0F2rkSEG1zJ-jNOquBgy3PYjDPuEZMnJMxkDPJoARSsbwUcXuy18bUqjLafjPrEXhVXTxZRNYKf3UpDF6bsklx0SkaDPOlUE8RD4BbulCZexKIvl7RrnZpEGmiN0TQ-0zZQRmhYymziMBbCqBqVT84ahwF6u_P5NNP_b4cWkZAvOnYupG_yWUyYu_7i1ED5M32AMcSAED6T5uO7PQW1daL-40Hb-tx4J3YClLX2JTDsPv2ExMgRG9i3Px31_TI_rmn5jQZs7wMYlLDkqof0d8hY7ZUuusI1Gxc_2DlMUii-K9fok8gZyNgpe2Br8mBuckUp94FHRLlqWYQSMnwelO_C_94h6sloqYa8hYETHPo9wobJeF2mFGYJSeNI_41eY27ei3FdJ9JVXL1pJyyMftFk0XjSsyQK_bZrxZJYZhzlXFlU22yGvk3k_S_pr-U6AS_lJ-cJbPVLqXasMZog8H8qRzPGKDAk9oVZJs10BN8753_SWH1wmj12_dPsv-F8EU-JHyZ6PlLr24eTjr_kUW_MhahhbuO210K3XoNVfFyMVVbJEf7gUMnTqKVaPQvrhc8cV8hTkXP5B5F8zDoU6e1WSYyk1E-mnOhAmywrWvn-rRDYFUZCBHspkDis5TIXUdjB1DCYE158ILM5EVJLuia4hsqWJ-AAHrgSWAbCPOybqLx0R4eIy-NFNXk7Q4pkBQdUh315YRBqsD5OWMJwXpVc3hBF267CXjJIgsjeumDuQTVvD_7HgWkvS8CKC61LY7R7vpJEDoVOxbvXNKzKudJA0r6nY6j8HYsOjg1K-SbrjA-6JMbO9wsTKQPpVmowQB9kIIC23bs6rghJVxYmozl8tDCn0Wg5eFYoFoqPedMcUX1RBA8LY4M4L6Hags54pBwjDqALWuTOkS2wQMMXmIAHoBSWu82GfrPPmEF7On6Jxe0ptSzwUAkBL9ty9t1-SNt8p2qs0TC0C24ANsULjGeA \ No newline at end of file diff --git a/.config/mimeapps.list b/.config/mimeapps.list new file mode 100644 index 0000000..dedb1e3 --- /dev/null +++ b/.config/mimeapps.list @@ -0,0 +1,5 @@ + +[Default Applications] +text/markdown=marktext.desktop +x-scheme-handler/jetbrains=jetbrains-toolbox.desktop +x-scheme-handler/mailspring=Mailspring.desktop diff --git a/.scripts/wlsunset.sh b/.scripts/wlsunset.sh new file mode 100755 index 0000000..125a9c4 --- /dev/null +++ b/.scripts/wlsunset.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Script to disable for an hour or immediately continue wlsunset. 'Toggle' + +# Check if wlsunset is still running +pid=$(pgrep wlsunset) + +if [[ -z ${pid} ]] ; then + # Start wlsunset right away. + wlsunset -l 50 -L 4 -t 2500 & +else + # Currently stop wlsunset but restart in an hour. + kill ${pid} + notify-send 'Stopping sunset, restarting in an hour' + at now +1 hours -f ~/.scripts/wlsunset.sh +fi diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..cfabf7a --- /dev/null +++ b/.vimrc @@ -0,0 +1,29 @@ +" +" ~/.vimrc +" + +filetype on +filetype plugin on +filetype indent on +set expandtab +set incsearch +set number +set showmatch +set title +set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx +syntax on + +" PLUGINS --------------------------------------------------------------- {{{ + +call plug#begin('~/.vim/plugged') + +Plug 'dense-analysis/ale' + +call plug#end() + +" }}} + +if has("autocmd") + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + endif + diff --git a/.Xresources b/OLD/.Xresources similarity index 100% rename from .Xresources rename to OLD/.Xresources diff --git a/OLD/.config/OneDrivePersonal/config b/OLD/.config/OneDrivePersonal/config new file mode 100644 index 0000000..48fcbb4 --- /dev/null +++ b/OLD/.config/OneDrivePersonal/config @@ -0,0 +1,4 @@ +# Directory where the files will be synced +sync_dir = "~/Documents/OneDrivePersonal" +# Skip files and directories that match this pattern +skip_file = ".~*|*~" diff --git a/OLD/.config/OneDriveUGent/config b/OLD/.config/OneDriveUGent/config new file mode 100644 index 0000000..9a4905a --- /dev/null +++ b/OLD/.config/OneDriveUGent/config @@ -0,0 +1,4 @@ +# Directory where the files will be synced +sync_dir = "~/Documents/OneDriveUGent" +# Skip files and directories that match this pattern +skip_file = ".~*|*~" diff --git a/.config/i3/config b/OLD/.config/i3/config similarity index 100% rename from .config/i3/config rename to OLD/.config/i3/config diff --git a/OLD/.config/i3/i3status.conf b/OLD/.config/i3/i3status.conf new file mode 100644 index 0000000..0e075b0 --- /dev/null +++ b/OLD/.config/i3/i3status.conf @@ -0,0 +1,48 @@ +# i3status configuration file +# see "man i3status" for documentation + +general { + interval = 5 + colors = true + color_good="#FFFFFF" + color_degraded="#ffd75f" + color_bad="#d75f5f" +} + +order += "cpu_temperature 0" +order += "memory" +order += "ethernet _first_" +order += "volume master" +order += "battery 0" +order += "tztime local" + +cpu_temperature 0 { + format = "%degrees °C" +} + +tztime local { + format = "%d/%m/%Y %H:%M |" +} + +volume master { + format = "VOL %volume" + format_muted = "VOL %volume" + device = "default" + mixer = "Master" + mixer_idx = 0 +} + +battery 0 { + integer_battery_capacity = true + format = " %status %percentage " + format_down = "???" + status_chr = "CHARGING" + status_bat = "PKCELL" + status_unk = "UNKNOWN" + status_full = "FULL" + path = "/sys/class/power_supply/BAT%d/uevent" +} + +memory { + format = "MEM %used" +} diff --git a/.config/i3/scripts/background.sh b/OLD/.config/i3/scripts/background.sh similarity index 100% rename from .config/i3/scripts/background.sh rename to OLD/.config/i3/scripts/background.sh diff --git a/.config/i3/scripts/lock.sh b/OLD/.config/i3/scripts/lock.sh similarity index 100% rename from .config/i3/scripts/lock.sh rename to OLD/.config/i3/scripts/lock.sh diff --git a/.config/i3/scripts/notify.sh b/OLD/.config/i3/scripts/notify.sh similarity index 100% rename from .config/i3/scripts/notify.sh rename to OLD/.config/i3/scripts/notify.sh diff --git a/GuideOLD.md b/OLD/GuideOLD.md similarity index 100% rename from GuideOLD.md rename to OLD/GuideOLD.md