diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-01 10:40:01 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-01 10:40:01 +0200 |
commit | e7ebdcd1ed66f9833906fbf154607cdbd46fdae2 (patch) | |
tree | d857f3a5a219a038a77113d8d412c824b225e56d | |
parent | e0fab4836639db0c9b4719551aa24cc26850b358 (diff) | |
parent | b3e19b6a7c1ab3ea8fefc60352ace64a560b46cd (diff) |
Merge branch 'main' of db:dotfiles
-rw-r--r-- | .gitignore | 3 | ||||
-rwxr-xr-x | bin/menuscripts/mpass | 2 | ||||
-rwxr-xr-x | bin/menuscripts/mpdf | 11 | ||||
-rwxr-xr-x | bin/menuscripts/mvid | 9 | ||||
-rw-r--r-- | config/X/dunst/dunstrc | 12 | ||||
-rw-r--r-- | config/essentials/nvim/after/plugin/autoclose.lua | 2 | ||||
-rw-r--r-- | config/essentials/nvim/after/plugin/luasnip.lua | 10 | ||||
-rw-r--r-- | config/essentials/nvim/lua/user/packer.lua | 1 | ||||
-rw-r--r-- | config/essentials/nvim/lua/user/remap.lua | 1 | ||||
-rw-r--r-- | config/essentials/nvim/lua/user/zk.lua | 5 | ||||
-rw-r--r-- | config/essentials/zsh/.zshrc | 30 | ||||
-rw-r--r-- | config/essentials/zsh/aliases.zsh | 24 | ||||
-rw-r--r-- | config/essentials/zsh/functions.zsh | 16 | ||||
-rw-r--r-- | config/extra/mutt/configs/raymaekers.luca@gmail.com | 2 | ||||
-rw-r--r-- | config/extra/mutt/configs/tlast.hirende@gmail.com | 2 | ||||
-rw-r--r-- | config/extra/mutt/configs/tlast723@gmail.com | 2 | ||||
-rw-r--r-- | config/extra/mutt/configs/tlast@murena.io | 2 | ||||
-rw-r--r-- | config/home/.zshenv | 1 | ||||
-rw-r--r-- | config/hyprland/hypr/hyprland.conf | 4 | ||||
-rwxr-xr-x | config/hyprland/hypr/startup.sh | 5 | ||||
-rw-r--r-- | config/theme/user-dirs.dirs | 8 | ||||
-rwxr-xr-x | stowdots | 26 |
22 files changed, 127 insertions, 51 deletions
@@ -9,9 +9,10 @@ config/essentials/gnupg/* config/essentials/nvim/lua/.luarc.json config/essentials/nvim/plugin/ config/essentials/nvim/spell/ -config/essentials/zsh/.zcompdump config/essentials/zsh/histfile +config/essentials/zsh/.zcompdump config/extra/jftui/settings +config/extra/jftui/watch_later/* config/extra/mutt/muttrc config/extra/pikaur.conf config/hyprland/foot/colors diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index 01c40e3..87559e9 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -1,5 +1,5 @@ #!/usr/bin/env sh -store="$HOME/.password-store" +store="${PASSWORD_STORE_DIR:-$HOME/.password-store}" lscmd="ls --group-directories-first" if [ "$MENUCMD" = "tofi" ] then diff --git a/bin/menuscripts/mpdf b/bin/menuscripts/mpdf index d26c841..d67fdae 100755 --- a/bin/menuscripts/mpdf +++ b/bin/menuscripts/mpdf @@ -12,14 +12,11 @@ fi tmp="/tmp/dmpdf" find ${1:-$HOME/docs $HOME/dl} 2> /dev/null | grep -E ".+\.pdf" | sort > "$tmp" -choice="$(\ - sed 's|^/home/aluc|\~| ; s|\([^/]\)[^/]*/|\1/|g' "$tmp" | +choice="$(sed "s|^$HOME|\~| ; s|\([^/]\)[^/]*/|\1/|g" "$tmp" | awk '{printf "%s %s\n", NR ":", $0}' | $menucmd | - grep -oE "^[0-9]+:" | - cut -f1 -d:)" -if [ -z "$choice" ]; then - exit -fi + grep -o "^[0-9]\+:" | + cut -f 1 -d :)" +test -z "$choice" && exit 1 file="$(sed -n "${choice}p" "$tmp")" zathura "$file" & diff --git a/bin/menuscripts/mvid b/bin/menuscripts/mvid index 8d14c4b..ca309fb 100755 --- a/bin/menuscripts/mvid +++ b/bin/menuscripts/mvid @@ -1,10 +1,11 @@ #!/usr/bin/env sh +tmpfile="/tmp/dmvids" + dirs="${1:-$HOME/vids $HOME/dl}" find -L $dirs 2> /dev/null | grep ".\+\.\(webm\|mp4\|mpeg\|mkv\)$" | - sort > /tmp/dmvids -cat /tmp/dmvids + sort > "$tmpfile" if [ "$MENUCMD" = "tofi" ] then @@ -16,11 +17,11 @@ else menucmd="fzf" fi -choice="$(sed 's|^/home/aluc|\~| ; s|\([^/]\)[^/]*/|\1/|g' /tmp/dmvids | +choice="$(sed "s|^$HOME|\~| ; s|\([^/]\)[^/]*/|\1/|g" "$tmpfile" | awk '{printf "%s %s\n", NR ":", $0}' | $menucmd | cut -f 1 -d ':')" test -z "$choice" && exit 1 -mpv "$(sed -n "${choice}p" /tmp/dmvids)" +mpv "$(sed -n "${choice}p" "$tmpfile")" diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc index f4d3a29..71998b9 100644 --- a/config/X/dunst/dunstrc +++ b/config/X/dunst/dunstrc @@ -33,7 +33,7 @@ origin = top-center # Offset from the origin - offset = 10x26 + offset = 0x10 # Scale factor. It is auto-detected if value is 0. scale = 0 @@ -90,7 +90,7 @@ frame_width = 1 # Defines color of the frame around the notification window. - frame_color = "#00000" + frame_color = "#969B95" # Size of gap to display between notifications - requires a compositor. # If value is greater than 0, separator_height will be ignored and a border @@ -212,7 +212,7 @@ max_icon_size = 32 # Paths to default icons (only neccesary when not using recursive icon lookup) - icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + icon_path = /usr/share/icons/ ### History ### @@ -316,9 +316,9 @@ timeout = 6 [urgency_normal] - background = "#393d4b" - foreground = "#80a0c0" - frame_color = "#81a1c1" + background = "#b48ead" + foreground = "#2e3440" + frame_color = "#2e3440" timeout = 5 # Icon for notifications with normal urgency, uncomment to enable #default_icon = /path/to/icon diff --git a/config/essentials/nvim/after/plugin/autoclose.lua b/config/essentials/nvim/after/plugin/autoclose.lua index 9dffb8a..89078ef 100644 --- a/config/essentials/nvim/after/plugin/autoclose.lua +++ b/config/essentials/nvim/after/plugin/autoclose.lua @@ -14,7 +14,7 @@ require("autoclose").setup({ ["`"] = { escape = true, close = true, pair = "``"}, }, options = { - disabled_filetypes = { "text", "telekasten", "diff", "gitcommit", "fugitive" }, + disabled_filetypes = { "text", "telekasten", "groff", "diff", "gitcommit", "fugitive" }, disable_when_touch = true, }, }) diff --git a/config/essentials/nvim/after/plugin/luasnip.lua b/config/essentials/nvim/after/plugin/luasnip.lua index eabc0be..d1da9b3 100644 --- a/config/essentials/nvim/after/plugin/luasnip.lua +++ b/config/essentials/nvim/after/plugin/luasnip.lua @@ -72,6 +72,11 @@ ls.add_snippets("html", { </html> ]], {i(1, "title"), i(2), i(3, "Header"), i(0)})), + s("sty", fmt( + [[ + <link rel="stylesheet" type="text/css" href="{}">{} + ]], + { i(1), i(0) })), }) ls.add_snippets("java", { @@ -183,6 +188,11 @@ ls.add_snippets("javascript", { ]], { i(1), i(2, "res.send(\"Hello world!\")"), i(0) })), s("cerr", t "console.error('Error:', err);"), + s("gel", fmt( + [[ + let {} = document.getElementById('{}');{} + ]], + { i(1), rep(1), i(0) })), }) ls.add_snippets("telekasten", { diff --git a/config/essentials/nvim/lua/user/packer.lua b/config/essentials/nvim/lua/user/packer.lua index 3933838..c9e27a2 100644 --- a/config/essentials/nvim/lua/user/packer.lua +++ b/config/essentials/nvim/lua/user/packer.lua @@ -40,6 +40,7 @@ return require('packer').startup(function(use) use('ojroques/vim-oscyank', {branch = "main"}) use("potamides/pantran.nvim") use('alx741/vinfo') + use('github/copilot.vim') -- objects use('michaeljsmith/vim-indent-object') diff --git a/config/essentials/nvim/lua/user/remap.lua b/config/essentials/nvim/lua/user/remap.lua index 25052f7..0fe4164 100644 --- a/config/essentials/nvim/lua/user/remap.lua +++ b/config/essentials/nvim/lua/user/remap.lua @@ -64,6 +64,7 @@ vim.keymap.set("n", "<Leader>x", "<cmd>!chmod +x %<cr>", { noremap = true, silen -- replace vim.keymap.set("n", "<Leader>sf", [[:%s/\<<C-r><C-w>\>/<C-r><C-w><C-w>/gI<Left><Left><Left>]]) vim.keymap.set("n", "<Leader>sl", [[:s/\<<C-r><C-w>\>/<C-r><C-w><C-w>/gI<Left><Left><Left>]]) +vim.keymap.set("n", "<LocalLeader>f", "<cmd>.!fold -w 80 -s<cr>") -- write vim.keymap.set("n", "<LocalLeader>w", "<cmd>write<cr>", { noremap = true }) diff --git a/config/essentials/nvim/lua/user/zk.lua b/config/essentials/nvim/lua/user/zk.lua index e70b9cc..a5e06d8 100644 --- a/config/essentials/nvim/lua/user/zk.lua +++ b/config/essentials/nvim/lua/user/zk.lua @@ -45,6 +45,11 @@ require('telekasten').setup({ template_new_note = home .. "/" .. "templates/new_note.md", new_note_filename = "title", }, + SoftwareDesign = { + home = home .. "/" .. "SoftwareDesign", + template_new_note = home .. "/" .. "templates/new_note.md", + new_note_filename = "title", + }, businessIT = { home = home .. "/" .. "businessIT", template_new_note = home .. "/" .. "templates/new_note.md", diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 8ba4ece..83da0f6 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -28,7 +28,7 @@ zle -N add-surround surround zle -N change-surround surround compinit -if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null +if grep -qi "debian\|ubuntu" /etc/os-release 2>/dev/null then sfiles=( /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh @@ -65,6 +65,21 @@ bindkey "^Xe" edit-command-line bindkey "^[." insert-last-word bindkey "^['" quote-line +isTextFile() +{ + if [ ! -f "$1" ] + then + return 1 + fi + + file_type=$(file -b --mime-type "$1") + if [[ "$file_type" == text/* ]] + then + return + fi + return 1 +} + # rehash hook zshcache_time="$(date +%s%N)" autoload -Uz add-zsh-hook @@ -97,7 +112,18 @@ function osc7 { print -n "\e]7;file://${HOSTNAME}${uri}\e\\" } add-zsh-hook -Uz chpwd osc7 - +command_not_found_handler () { + isTextFile "$1" || + echo "zsh: command not found: $1" >&2 +} +# open file with file name +open_file() { + if [ ${1:0:2} != "./" ] && isTextFile "$1" + then + "$EDITOR" "$1" + fi +} +add-zsh-hook -Uz preexec open_file # prompt PS1=' %B%(#.%F{1}.%F{13})[%n%b%f@%B%F{6}%m]%b%f %3~ ' diff --git a/config/essentials/zsh/aliases.zsh b/config/essentials/zsh/aliases.zsh index ad0fbd9..ae29c35 100644 --- a/config/essentials/zsh/aliases.zsh +++ b/config/essentials/zsh/aliases.zsh @@ -1,7 +1,7 @@ #!/bin/zsh # s/alias \([^-]\)/alias -g \1 -if grep -qi "debian\|ubuntu" /etc/os-release +if grep -qi "debian\|ubuntu" /etc/os-release 2> /dev/null then alias aptup='apt update && apt upgrade -y' fi @@ -19,6 +19,7 @@ else alias -g clipp='xclip -selection clipboard -r' alias -g clipo='xclip -o -selection clipboard -r' fi +alias clipic='clipo > /tmp/pic.png' # Programs alias vi='nvim' @@ -53,7 +54,7 @@ alias lst3='ls --tree -L3' alias ls.='ls -dl .*' which exa >/dev/null 2>&1 && alias ls='exa --sort extension --group-directories-first' || - alias ls='ls --color --group-directories-fist --sort=extension' + alias ls='ls --color --group-directories-first --sort=extension' # pacman aliases alias pac='pacman' @@ -118,6 +119,7 @@ alias vidlen='ffprobe -show_entries format=duration -v quiet -of csv="p=0" -i' alias whatsmyip='curl -s "ifconfig.co"' alias icognito='unset HISTFILE' alias webcam='v4l2-ctl --set-fmt-video=width=1280,height=720; mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0 --profile=low-latency --untimed --no-resume-playback' +alias capture='echo "Y" | wf-recorder -o "$(hyprctl -j monitors | jq -r '\''.[].name'\'' | fzf)" --codec=vp8_vaapi --device=/dev/dri/renderD128 -f output.webm -D' alias qrclipo='qrencode -s 16 "$(clipo)" -o - | imv -w "imv - $(clipo)" -' alias airpods='bluetoothctl connect 60:93:16:24:00:10' alias hotpsot='nmcli dev wifi hotspot ifname wlan0 ssid wiefie password "peepeepoopoo"' @@ -130,23 +132,27 @@ xargs -I {} ln -sf "$HOME/.config/mutt/configs/{}" $HOME/.config/mutt/muttrc' alias fusephone='sshfs myphone: /media/phone' alias ttyper='ttyper -l english1000 -w 100' +alias wgup='doas wg-quick up wg0' +alias wgdown='doas wg-quick down wg0' + # NPM alias npi="npm init --yes" # Python alias penv='python3 -m venv env' +alias phttp='python3 -m http.server' alias pipreq='pip install -r requirements.txt' alias -g '...'='../..' alias -g '....'='../../..' alias -g bg='&; disown' -alias -g cx='chmod +x' -alias -g ch='chown ${USER}:${USER} -R' +alias cx='chmod +x' +alias ch='chown ${USER}:${USER} -R' alias -g hl='--help |& less -r' alias kll='killall' alias pi='ping archlinux.org -c4' -alias -g sba='source env/bin/activate || source bin/activate' -alias -g smc='systemctl' +alias sba='source env/bin/activate || source bin/activate' +alias smc='systemctl' alias ssc='doas smc' alias smcu='smc --user' alias zsr='source ${ZDOTDIR:-$HOME}/.zshrc && rehash' @@ -197,6 +203,7 @@ alias cdd='cd $HOME/dl' alias cdp='cd $HOME/pics' alias cdrs='cd /srv/' alias cdng='cd /etc/nginx' +alias czo='cd $HOME/zot/' # googoo aliases alias o.='o .' @@ -218,10 +225,6 @@ alias fzps='ps aux | tail +2 | fzf --bind \ alias asf='alias | fzf' alias fzh="tac $HISTFILE | fzf | tee /dev/stderr | clipp" -alias -s conf="$EDITOR" -alias -s txt="$EDITOR" -alias -s c="$EDITOR" -alias -s z80="$EDITOR" alias -s zip='unzip -l' alias -s tar='tar tf' @@ -229,6 +232,7 @@ alias dcb='docker build' alias dcbt='docker build -t' alias dce='docker exec' alias dcet='docker exec -it' +alias dcmp='docker compose up -d' alias cfg='git --git-dir=$HOME/src/dotfiles/.git --work-tree=$HOME/src/dotfiles' # oh-my-zsh git aliases diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 3243750..5c4d609 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -29,7 +29,7 @@ nvf() { fi if test -f "$match" then - vim "$match" && return + $EDITOR "$match" && return else die "no match." && return 1 fi @@ -103,10 +103,10 @@ esc () { } delfile () { - curl "${2:-https://up.kallipso.be/delete/$1}" + curl "${2:-https://upfast.cronyakatsuki.xyz/delete/$1}" } upfile () { - curl -F "file=@\"$1\"" ${2:-http://0x0.st} + curl -F "file=@\"$1\"" ${2:-https://upfast.cronyakatsuki.xyz} } sgd () { @@ -250,3 +250,13 @@ fpass () { fzf | xargs pass show -c } + +oclip () +{ + printf "\033]52;c;$(echo -n "$@" | base64)\a" +} + +sms () +{ + ssh phone sendmsg "$1" "'$2'" +} diff --git a/config/extra/mutt/configs/raymaekers.luca@gmail.com b/config/extra/mutt/configs/raymaekers.luca@gmail.com index 5dded3d..ffb7003 100644 --- a/config/extra/mutt/configs/raymaekers.luca@gmail.com +++ b/config/extra/mutt/configs/raymaekers.luca@gmail.com @@ -1,6 +1,6 @@ set from = "raymaekers.luca@gmail.com" set realname = "Raymaekers Luca" -set my_pass = "`pass tokens/raymaekers.luca@gmail.com`" +set my_pass = "`pass keys/tokens/gmail/raymaekers.luca@gmail.com`" # IMAP settings set imap_user = "raymaekers.luca@gmail.com" diff --git a/config/extra/mutt/configs/tlast.hirende@gmail.com b/config/extra/mutt/configs/tlast.hirende@gmail.com index c33d04a..14dac98 100644 --- a/config/extra/mutt/configs/tlast.hirende@gmail.com +++ b/config/extra/mutt/configs/tlast.hirende@gmail.com @@ -1,6 +1,6 @@ set from = "tlast.hirende@gmail.com" set realname = "Raymaekers Luca" -set my_pass = "`pass tokens/tlast.hirende@gmail.com`" +set my_pass = "`pass keys/tokens/gmail/tlast.hirende@gmail.com`" # IMAP settings set imap_user = "tlast.hirende@gmail.com" diff --git a/config/extra/mutt/configs/tlast723@gmail.com b/config/extra/mutt/configs/tlast723@gmail.com index d646673..44d68ea 100644 --- a/config/extra/mutt/configs/tlast723@gmail.com +++ b/config/extra/mutt/configs/tlast723@gmail.com @@ -1,6 +1,6 @@ set from = "tlast723@gmail.com" set realname = "Raymaekers Luca" -set my_pass = "`pass tokens/tlast723@gmail.com`" +set my_pass = "`pass keys/tokens/gmail/tlast723@gmail.com`" # IMAP settings set imap_user = "tlast723@gmail.com" diff --git a/config/extra/mutt/configs/tlast@murena.io b/config/extra/mutt/configs/tlast@murena.io index 1f59296..a1db524 100644 --- a/config/extra/mutt/configs/tlast@murena.io +++ b/config/extra/mutt/configs/tlast@murena.io @@ -1,5 +1,5 @@ set my_user = "tlast@murena.io" -set my_pass = "`pass tokens/tlast@murena.io`" +set my_pass = "`pass keys/tokens/tlast@murena.io`" set smtp_url = "smtp://$my_user:$my_pass@mail.ecloud.global:587/" set imap_user = $my_user diff --git a/config/home/.zshenv b/config/home/.zshenv index ab0d6bc..d1cd73a 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -42,6 +42,7 @@ export QT_QPA_PLATFORMTHEME="qt5ct" # export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java # export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on' +export PASSWORD_STORE_DIR="$HOME/src/password-store" export PASSWORD_STORE_CLIP_TIME=5 # old diff --git a/config/hyprland/hypr/hyprland.conf b/config/hyprland/hypr/hyprland.conf index 36f85a5..8aa437e 100644 --- a/config/hyprland/hypr/hyprland.conf +++ b/config/hyprland/hypr/hyprland.conf @@ -4,9 +4,7 @@ monitor=,preferred,auto,1 source = ./env.conf -exec-once = gammastep & waybar -exec-once = swaybg -i ~/pics/wallpaper -exec-once = wl-paste --watch cliphist store +exec-once = $HOME/.config/hypr/startup.sh input { kb_layout = us diff --git a/config/hyprland/hypr/startup.sh b/config/hyprland/hypr/startup.sh new file mode 100755 index 0000000..ab0e48b --- /dev/null +++ b/config/hyprland/hypr/startup.sh @@ -0,0 +1,5 @@ +#!/bin/sh +swaybg -i ~/pics/wallpaper & +waybar & +gammastep & +wl-paste --watch cliphist store & diff --git a/config/theme/user-dirs.dirs b/config/theme/user-dirs.dirs new file mode 100644 index 0000000..d5389fd --- /dev/null +++ b/config/theme/user-dirs.dirs @@ -0,0 +1,8 @@ +XDG_DOCUMENTS_DIR="$HOME/docs" +XDG_DOWNLOAD_DIR="$HOME/dl" +XDG_MUSIC_DIR="$HOME/music" +XDG_PICTURES_DIR="$HOME/pics" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/vids" +XDG_DESKTOP_DIR="$HOME/" +XDG_TEMPLATES_DIR="$HOME/" @@ -1,20 +1,28 @@ #!/bin/sh -trap "echo -ne '\nbye'; exit 1" EXIT +trap "echo -e '\nbye'; exit 1" EXIT + +die () { + echo "$@" 1>&2 +} if ! stow --version > /dev/null 2>&1 then - echo "E: stow not installed or not found" 1>&2 - exit 1 + die "stow not installed or not found." + die "install stow?" + die -n ">" + test "y" = "$(head -n 1)" && + doas pacman -Sy stow || + exit 1 fi if [ -n "${MACH:=$1}" ] then - echo "I: stowing for $MACH" + die "I: stowing for $MACH" else - echo "E: MACH not set" 1>&2 - echo "Enter valid value for 'MACH'" - echo "d(esktop) | s(erver) | l(aptop)" - echo -n ">" + die "E: MACH not set" >&2 + die "Enter valid value for 'MACH'" + die "d(esktop) | s(erver) | l(aptop)" + echo -n ">" >&2 read MACH fi @@ -34,6 +42,6 @@ case "$MACH" in stow -d config/ -t "$HOME/" -R home ;; *) - echo "E: invalid value for 'MACH'" 1>&2 + die "E: invalid value for 'MACH'" break esac |