From bb16f75dc386c117f2bf5ecefeae7b175659e1ed Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:56:46 +0200 Subject: removed window module --- config/hyprland/waybar/config.jsonc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index d2bad38..86938db 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -1,7 +1,7 @@ { "layer": "top", - "modules-left": ["battery", "clock", "hyprland/workspaces", "mpd"], - "modules-center": ["hyprland/window"], + "modules-left": ["battery", "hyprland/workspaces", "mpd"], + "modules-center": ["clock"], "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"], "hyprland/workspaces": { "format": "{icon}", @@ -78,8 +78,8 @@ "restart-interval": 3, }, "clock": { - "format": "{:%H:%M}", - "format-alt": "{:(%R) %A %d %B}", + "format": "{:%R}", + "format-alt": "{:(%T) %A %d %B}", "interval": 1, }, "tray": { -- cgit v1.2.3 From e9f233edd96fe850037244c0d80bec67a8b2077f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:57:01 +0200 Subject: removed 1xsearch --- bin/extra/1xsearch | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100755 bin/extra/1xsearch diff --git a/bin/extra/1xsearch b/bin/extra/1xsearch deleted file mode 100755 index a248d38..0000000 --- a/bin/extra/1xsearch +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# dependencies -which pup > /dev/null || - exit 1 - -test -z "${query:=$1}" && - query="$(cat /dev/stdin)" - -url="https://1337x.to" -query="$(echo "$query" | tr ' ' '+' )" -result="$(curl -s "$url/search/$query/1/" | - pup -p 'a attr{href}' | - grep "^/torrent" | - head -n 1)" -# result contains / as first char -curl -s "$url$result" | - pup -p 'a attr{href}' | - grep "^magnet:" | - head -n 1 -- cgit v1.2.3 From d22b27180eb394f9443860ccdf2656d2fdef56ed Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:57:14 +0200 Subject: updated notify-send command --- bin/guiscripts/keyadd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/guiscripts/keyadd b/bin/guiscripts/keyadd index 96d6d03..1df8896 100755 --- a/bin/guiscripts/keyadd +++ b/bin/guiscripts/keyadd @@ -43,16 +43,16 @@ die "HOST: $HOST" if [ "$1" = "-d" ] then ssh-add -d - < "$SSHFOLDER"/$key.pub && - notify-send "$0" "deleted $key" || - notify-send "$0" "could not delete." + notify-send "keyadd" "deleted $key" || + notify-send "keyadd" "could not delete." elif ! ssh-add -l | grep -q "$(ssh-keygen -lf "$SSHFOLDER"/$key)" then die "adding: $key" export PASSWORD="keys/$HOST/ssh/$key" export SSH_ASKPASS="$0" ssh-add - < "$SSHFOLDER"/$key && - notify-send "$0" "added $key" + notify-send "keyadd" "added $key" else die "key already added." - notify-send "$0" "key already added." + notify-send "keyadd" "key already added." fi -- cgit v1.2.3 From 171c1f519b902e1654e17bd33cb129569478f7f7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:57:37 +0200 Subject: don't create temp file --- bin/menuscripts/mhelp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/bin/menuscripts/mhelp b/bin/menuscripts/mhelp index e03222b..5963a88 100755 --- a/bin/menuscripts/mhelp +++ b/bin/menuscripts/mhelp @@ -1,5 +1,4 @@ #!/usr/bin/env sh -OPTIONS="/tmp/dmh_options.txt" if [ "$MENUCMD" = "tofi" ] then @@ -16,18 +15,15 @@ fi test -z "$program" && exit 1 -if $program --help > "$OPTIONS" -then - option="$(grep "^ *-[-a-zA-Z0-9]* " "$OPTIONS" | - tr -s ' ' | - sort | - uniq | - column -l 2 -t | - $menucmd | - awk '{print $1}')" -fi +option="$($program --help | + # Parse options + grep "^ *-[-a-zA-Z0-9]* " | + tr -s ' ' | + sort | uniq | + column -l 2 -t | + $menucmd | + awk '{print $1}')" test -z "$option" && exit 1 -rm -f "$OPTIONS" setsid $program $option -- cgit v1.2.3 From 545067daecbe08061d6e02760dc1d6889cfb5900 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:57:57 +0200 Subject: [dunstrc] changed style --- config/X/dunst/dunstrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc index 71998b9..3ab0f3d 100644 --- a/config/X/dunst/dunstrc +++ b/config/X/dunst/dunstrc @@ -158,7 +158,7 @@ # %n progress value if set without any extra characters # %% Literal % # Markup is allowed - format = "%b" + format = "[%s]\n%b" # Alignment of message text. # Possible values are "left", "center" and "right". @@ -310,13 +310,13 @@ # Otherwise the "#" and following would be interpreted as a comment. # Icon for notifications with low urgency, uncomment to enable #default_icon = /path/to/icon - background = "#d08770" - foreground = "#2E3541" + background = "#b48ead" + foreground = "#2e3440" frame_color = "#81a1c1" timeout = 6 [urgency_normal] - background = "#b48ead" + background = "#81a1c1" foreground = "#2e3440" frame_color = "#2e3440" timeout = 5 @@ -324,9 +324,10 @@ #default_icon = /path/to/icon [urgency_critical] - background = "#b48ead" - foreground = "#d8dee9" + background = "#d08770" + foreground = "#2e3440" frame_color = "#81a1c1" + format = "[%s]\n%b" timeout = 0 # Icon for notifications with critical urgency, uncomment to enable #default_icon = /path/to/icon -- cgit v1.2.3 From 61b2b53547359ae6e3f2f8934456ec6eb62139a8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:58:14 +0200 Subject: [zshenv] added paths for xdg base dir --- config/home/.zshenv | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/home/.zshenv b/config/home/.zshenv index d1cd73a..9a8206c 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -19,11 +19,16 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0 export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc -export NVM_DIR="$XDG_DATA_HOME/nvm" +export NVM_DIR="$XDG_DATA_HOME"/nvm export W3M_DIR="$XDG_STATE_HOME"/w3m export GOPATH="$XDG_DATA_HOME"/go export GOMODCACHE="$XDG_CACHE_HOME"/go/mod export TNS_ADMIN=/opt/oracle/instantclient_21_9/network/admin +export WGETRC="$XDG_CONFIG_HOME"/wgetrc +export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages +export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel +export MYSQL_HISTFILE="$XDG_DATA_HOME"/mysql_history +export RANDFILE="$XDG_CACHE_HOME"/rnd export XINITRC="$XDG_CONFIG_HOME/x11"/xinitrc export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority -- cgit v1.2.3 From 320ed288a5d68c22e0d3d399df77f31f123ea88c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:58:30 +0200 Subject: [nvim] added one buffer keymap --- config/essentials/nvim/lua/user/remap.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/essentials/nvim/lua/user/remap.lua b/config/essentials/nvim/lua/user/remap.lua index 7c6d87f..e59b81a 100644 --- a/config/essentials/nvim/lua/user/remap.lua +++ b/config/essentials/nvim/lua/user/remap.lua @@ -15,6 +15,8 @@ vim.keymap.set("i", "\\\\", "\\", { noremap = true }) vim.keymap.set("n", "gb", "buffers:buffer", { noremap = true }) vim.keymap.set("n", "q", "q!", { noremap = true }) vim.keymap.set("n", "Q", "qa!", { noremap = true }) +-- close all except focused buffer +vim.keymap.set("n", "1", "%bd|e#", { noremap = true }) -- Windows vim.keymap.set("n", "", "h", { noremap = true }) -- cgit v1.2.3 From 5fa4e064dc48450f371a8f4ef42f58e5a437c60f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 6 Aug 2023 14:58:44 +0200 Subject: [ytclipo] changed resolution and template --- bin/common/ytclipo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 263f1b3..7e7b9cc 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -19,8 +19,8 @@ notify-send "ytclipo" "downloading $inp" yt-dlp "$inp" \ --restrict-filenames \ -f "b" \ - -S "res:720" \ + -S "res:1080" \ -P "$HOME/vids/youtube/" \ - -o "%(title)s.%(ext)s" + -o "%(channel)s - %(title)s.%(ext)s" notify-send "ytclipo" "ytclipo
finished downloading." echo "$inp" >> /tmp/ytclipo_history -- cgit v1.2.3 From cb110575144beb4125fd1d8204c8204e6bca280f Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 7 Aug 2023 18:59:08 +0200 Subject: [goo] added option to give search query as second paramater I noticed by mistake sometimes I would type the query already. --- bin/common/goo | 9 +++++++-- config/essentials/zsh/functions.zsh | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/common/goo b/bin/common/goo index cfd03ec..2a5faad 100755 --- a/bin/common/goo +++ b/bin/common/goo @@ -15,9 +15,14 @@ VisualParadigm intellij arduino15" +if [ -n "$2" ] +then + [ -d "$2" ] && dest="$2" || opt="-q $2" +fi + for dir in $exclude; do dirs="$dirs -name \"$dir\" -o " done -cmd="find ${2:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" +cmd="find ${dest:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" -eval "$cmd" 2>/dev/null +eval "$cmd" 2>/dev/null | fzf $opt diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 671e6fb..053ce8e 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -39,9 +39,9 @@ nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit } ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit } # googoo aliases -ff () { goo f "$1" | fzf } -fd () { goo d "$1" | fzf } -fdf () { goo f "$1" | fzf | xargs -I {} dirname "{}" } +ff () { goo f "$1" } +fd () { goo d "$1" } +fdf () { goo f "$1" | xargs -I {} dirname "{}" } o () { f="$(ff $1)" -- cgit v1.2.3 From 557b4e5d5bb85919c6dc0f87d27d7df07616f7fd Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 7 Aug 2023 19:00:29 +0200 Subject: [aliases] updated the gdate alias --- config/essentials/zsh/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 3df6234..b1d4a50 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -181,7 +181,7 @@ alias wf='doas wipefs -a' alias dmci="doas make clean install" alias rmd='rm -f *.{orig,rej}' alias cdzot='mkdir -p /tmp/zottesite && cd /tmp/zottesite' -alias gdate="date +%y%m%d_%H%M%S" +alias gdate='date +%y_%m_%d-%T' alias tpid='tail -f /dev/null --pid' alias vbm='vboxmanage' -- cgit v1.2.3 From ffb6d1aaedaa3882e356d7d58a5734b6f6a653e7 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 11 Aug 2023 18:21:47 +0200 Subject: [mpass] added notification --- bin/menuscripts/mpass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index a50f0fb..8153dc6 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -20,6 +20,8 @@ done test -z "$file" && exit 1 pass show -c "$file" && if [ -n "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null -then - cliphist list | head -n 1 | cliphist delete -fi + then + cliphist list | head -n 1 | cliphist delete + fi || + exit 1 +notify-send "mpass" "copied $choice" -- cgit v1.2.3 From cdf1c6fba147580ce7226a4547d00a7a2142d232 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 11 Aug 2023 18:22:11 +0200 Subject: [dunstrc] set frame width to 0 --- config/X/dunst/dunstrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc index 3ab0f3d..28fa68e 100644 --- a/config/X/dunst/dunstrc +++ b/config/X/dunst/dunstrc @@ -87,7 +87,7 @@ # Defines width in pixels of frame around the notification window. # Set to 0 to disable. - frame_width = 1 + frame_width = 0 # Defines color of the frame around the notification window. frame_color = "#969B95" -- cgit v1.2.3 From 124910d7e8c08f358b00d7ef7ff7fd83fc77d349 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 11 Aug 2023 18:22:38 +0200 Subject: [mpv] set screenshots directory --- config/common/mpv/mpv.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/common/mpv/mpv.conf b/config/common/mpv/mpv.conf index 4f5e251..7d9d1fe 100755 --- a/config/common/mpv/mpv.conf +++ b/config/common/mpv/mpv.conf @@ -26,3 +26,5 @@ force-seekable=yes slang=eng, en, english alang=jpn + +screenshot-directory=~/pics/screenshots -- cgit v1.2.3 From 2e0971fa8ab391849287bf9b8e76676115886539 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 11 Aug 2023 18:22:52 +0200 Subject: [ncmpcpp] changed bindings for home and end --- config/common/ncmpcpp/bindings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/common/ncmpcpp/bindings b/config/common/ncmpcpp/bindings index d2a5eb6..b7921e7 100644 --- a/config/common/ncmpcpp/bindings +++ b/config/common/ncmpcpp/bindings @@ -194,9 +194,9 @@ def_key "p" def_key "P" play -def_key "H" +def_key "g" move_home -def_key "L" +def_key "G" move_end def_key "ctrl-u" -- cgit v1.2.3 From 229b7702133999850aa37803a26a2f14282094db Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 11 Aug 2023 18:23:12 +0200 Subject: [tridactylrc] added modeindactor settings --- config/extra/tridactyl/tridactylrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/extra/tridactyl/tridactylrc b/config/extra/tridactyl/tridactylrc index 2de07b4..f7e1935 100644 --- a/config/extra/tridactyl/tridactylrc +++ b/config/extra/tridactyl/tridactylrc @@ -60,3 +60,11 @@ bind gpdy tabopen http://debuc.com:9010 " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl " vim: set filetype=tridactyl + +modeindicatormodes.normal true +set modeindicatormodes.insert true +set modeindicatormodes.input true +set modeindicatormodes.ignore false +set modeindicatormodes.ex true +set modeindicatormodes.hint true +set modeindicatormodes.visual true -- cgit v1.2.3 From 8a2272e0f5f4b43f7ba3fa11f5887880299573b3 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 01:53:23 +0200 Subject: [mpass] added notify function --- bin/guiscripts/keyadd | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/bin/guiscripts/keyadd b/bin/guiscripts/keyadd index 1df8896..4613b8f 100755 --- a/bin/guiscripts/keyadd +++ b/bin/guiscripts/keyadd @@ -22,6 +22,13 @@ die () echo "$1" >&2 } +notify () +{ + notify-send -t 1000 "keyadd" "$1" + die "$1" +} + + SSHFOLDER="$HOME/.ssh" if test -z "${key:=$1}" @@ -42,17 +49,19 @@ die "HOST: $HOST" if [ "$1" = "-d" ] then - ssh-add -d - < "$SSHFOLDER"/$key.pub && - notify-send "keyadd" "deleted $key" || - notify-send "keyadd" "could not delete." -elif ! ssh-add -l | grep -q "$(ssh-keygen -lf "$SSHFOLDER"/$key)" + if ssh-add -d - < "$SSHFOLDER"/"$key".pub + then + notify "deleted $key" + else + notify "could not delete." + fi +# check if key is already added +elif ssh-add -l | grep -q "$(ssh-keygen -lf "$SSHFOLDER"/"$key")" then - die "adding: $key" + notify "key already added." +else export PASSWORD="keys/$HOST/ssh/$key" export SSH_ASKPASS="$0" - ssh-add - < "$SSHFOLDER"/$key && - notify-send "keyadd" "added $key" -else - die "key already added." - notify-send "keyadd" "key already added." + ssh-add - < "$SSHFOLDER"/"$key" && + notify "added $key" fi -- cgit v1.2.3 From 396e509716ae5b334f4d588a9b425476770577ea Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 01:57:30 +0200 Subject: [mpass] added test for connecting to agent --- bin/guiscripts/keyadd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/guiscripts/keyadd b/bin/guiscripts/keyadd index 4613b8f..e0a1661 100755 --- a/bin/guiscripts/keyadd +++ b/bin/guiscripts/keyadd @@ -31,7 +31,15 @@ notify () SSHFOLDER="$HOME/.ssh" -if test -z "${key:=$1}" +# Test if can connect to ssh-agent +ssh-add -l > /dev/null 2>&1 +if [ $? -gt 1 ] # ignore if there are no identities +then + notify "could not connect to agent." + exit 1 +fi + +if [ -z "${key:=$1}" ] then key="$(find "$SSHFOLDER" -iname "*.pub" | sed "s,$SSHFOLDER/,," | # Clean -- cgit v1.2.3 From 6738d30a91961fa37f99ab16df4c1f58937748c5 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 02:01:02 +0200 Subject: [mpass] cleanup of messages and commands --- bin/guiscripts/keyadd | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/guiscripts/keyadd b/bin/guiscripts/keyadd index e0a1661..cb81efe 100755 --- a/bin/guiscripts/keyadd +++ b/bin/guiscripts/keyadd @@ -35,7 +35,7 @@ SSHFOLDER="$HOME/.ssh" ssh-add -l > /dev/null 2>&1 if [ $? -gt 1 ] # ignore if there are no identities then - notify "could not connect to agent." + notify "Could not connect to agent." exit 1 fi @@ -50,26 +50,26 @@ else fi die "key: $key" -test ! -f "$SSHFOLDER/$key" && exit 1 +[ ! -f "$SSHFOLDER/$key" ] && exit 1 -HOST=$(hostnamectl hostname | sed 's/forlure/fl/;s/montecristo/mc/') -die "HOST: $HOST" +HOST=$(hostnamectl hostname) +die "host: $HOST" if [ "$1" = "-d" ] then - if ssh-add -d - < "$SSHFOLDER"/"$key".pub + if ssh-add -q -d - < "$SSHFOLDER"/"$key".pub 2> /dev/null then - notify "deleted $key" + notify "Deleted $key" else - notify "could not delete." + notify "Could not delete." fi # check if key is already added elif ssh-add -l | grep -q "$(ssh-keygen -lf "$SSHFOLDER"/"$key")" then - notify "key already added." + notify "Key already added." else export PASSWORD="keys/$HOST/ssh/$key" export SSH_ASKPASS="$0" - ssh-add - < "$SSHFOLDER"/"$key" && - notify "added $key" + ssh-add -q - < "$SSHFOLDER"/"$key" && + notify "Added $key." fi -- cgit v1.2.3 From f7e3dc17c1692c8099ca4b80814db49d9da2c74c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 02:01:02 +0200 Subject: [mpass] cleanup of messages and commands --- bin/guiscripts/keyadd | 20 ++++++++++---------- bin/menuscripts/mpass | 16 ++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bin/guiscripts/keyadd b/bin/guiscripts/keyadd index e0a1661..cb81efe 100755 --- a/bin/guiscripts/keyadd +++ b/bin/guiscripts/keyadd @@ -35,7 +35,7 @@ SSHFOLDER="$HOME/.ssh" ssh-add -l > /dev/null 2>&1 if [ $? -gt 1 ] # ignore if there are no identities then - notify "could not connect to agent." + notify "Could not connect to agent." exit 1 fi @@ -50,26 +50,26 @@ else fi die "key: $key" -test ! -f "$SSHFOLDER/$key" && exit 1 +[ ! -f "$SSHFOLDER/$key" ] && exit 1 -HOST=$(hostnamectl hostname | sed 's/forlure/fl/;s/montecristo/mc/') -die "HOST: $HOST" +HOST=$(hostnamectl hostname) +die "host: $HOST" if [ "$1" = "-d" ] then - if ssh-add -d - < "$SSHFOLDER"/"$key".pub + if ssh-add -q -d - < "$SSHFOLDER"/"$key".pub 2> /dev/null then - notify "deleted $key" + notify "Deleted $key" else - notify "could not delete." + notify "Could not delete." fi # check if key is already added elif ssh-add -l | grep -q "$(ssh-keygen -lf "$SSHFOLDER"/"$key")" then - notify "key already added." + notify "Key already added." else export PASSWORD="keys/$HOST/ssh/$key" export SSH_ASKPASS="$0" - ssh-add - < "$SSHFOLDER"/"$key" && - notify "added $key" + ssh-add -q - < "$SSHFOLDER"/"$key" && + notify "Added $key." fi diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index 8153dc6..0117b97 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -16,12 +16,12 @@ do [ "$choice" ] || break file="$file/$choice" done - test -z "$file" && exit 1 -pass show -c "$file" && - if [ -n "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null - then - cliphist list | head -n 1 | cliphist delete - fi || - exit 1 -notify-send "mpass" "copied $choice" + +pass show -c "$file" +test $? -gt 0 && exit 1 + +[ "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null && # on wayland and cliphist is running + cliphist list | head -n 1 | cliphist delete + +notify-send -t 1000 "mpass" "copied $choice" -- cgit v1.2.3 From 1453494eac13636b5524c9b21843c9b21a761e35 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 02:04:37 +0200 Subject: [dunstrc] align right and set misc options added offset to the right as well, decreased the line height, increased the gap size and increased the font size. Set the indicator option to true because this is more clear. Also set the stack duplicates to true. --- config/X/dunst/dunstrc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/X/dunst/dunstrc b/config/X/dunst/dunstrc index 28fa68e..6127474 100644 --- a/config/X/dunst/dunstrc +++ b/config/X/dunst/dunstrc @@ -30,10 +30,10 @@ height = 80 # Position the notification in the top right corner - origin = top-center + origin = right # Offset from the origin - offset = 0x10 + offset = 10x10 # Scale factor. It is auto-detected if value is 0. scale = 0 @@ -96,7 +96,7 @@ # If value is greater than 0, separator_height will be ignored and a border # of size frame_width will be drawn around each notification instead. # Click events on gaps do not currently propagate to applications below. - gap_size = 2 + gap_size = 4 # Define a color for the separator. # possible values are: @@ -118,11 +118,11 @@ ### Text ### - font = mononoki nerd font mono 10 + font = mononoki nerd font mono 11 # The spacing between lines. If the height is smaller than the # font height, it will get raised to the font height. - line_height = 11 + line_height = 7 # Possible values are: # full: Allow a small subset of html markup in notifications: @@ -181,13 +181,13 @@ ignore_newline = no # Stack together notifications with the same content - stack_duplicates = false + stack_duplicates = true # Hide the count of stacked notifications with the same content hide_duplicate_count = false # Display indicators for URLs (U) and actions (A). - show_indicators = no + show_indicators = yes ### Icons ### -- cgit v1.2.3 From 5eed72797eaf9ec0d0e43b24add8b266b1999b08 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 02:07:26 +0200 Subject: [waybar] removed custom workspaces format --- config/hyprland/waybar/config.jsonc | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index 86938db..2ab4837 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -3,20 +3,6 @@ "modules-left": ["battery", "hyprland/workspaces", "mpd"], "modules-center": ["clock"], "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"], - "hyprland/workspaces": { - "format": "{icon}", - "format-icons": { - "1": "I", - "2": "II", - "3": "III", - "4": "IV", - "5": "V", - "6": "VI", - "7": "VII", - "8": "VIII", - "9": "IX", - }, - }, "mpd": { "tooltip": false, "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", -- cgit v1.2.3 From 818dabae65e67cb52f11623ab1e76ad4c85c19e1 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 02:08:33 +0200 Subject: added confirm, trl and wipe scripts! --- bin/extra/confirm | 12 ++++++ bin/extra/trl | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ bin/extra/wipe | 13 ++++++ 3 files changed, 140 insertions(+) create mode 100755 bin/extra/confirm create mode 100755 bin/extra/trl create mode 100755 bin/extra/wipe diff --git a/bin/extra/confirm b/bin/extra/confirm new file mode 100755 index 0000000..116b468 --- /dev/null +++ b/bin/extra/confirm @@ -0,0 +1,12 @@ +#!/bin/sh + +read_char () +{ + old_stty_cfg=$(stty -g 2> /dev/null) + stty raw -echo 2> /dev/null + dd ibs=1 count=1 2> /dev/null + stty $old_stty_cfg 2> /dev/null +} + +>&2 printf "$1 " +read_char | grep -q "[yY]" diff --git a/bin/extra/trl b/bin/extra/trl new file mode 100755 index 0000000..ee42040 --- /dev/null +++ b/bin/extra/trl @@ -0,0 +1,115 @@ +#!/bin/sh + +# prints on stderr +log () { >&2 echo "$@"; } + +help () +{ + >&2 cat <<-EOF + h help + l clear output + q quit + + i invert languages + p select primary + s select secondary + EOF +} +# returns available languages +languages () { + cat <<-EOF + arabic + dutch + french + german + polish + english + portuguese + spanish + romanian + hebrew + swedish + italian + turkish + japanese + ukrainian + korean + chinese + czech + hungarian + danish + persian + greek + slovak + hindi + thai + EOF +} + +# translates a word +# $1: primary language +# $2: secondary language +# $3: word to translate +translate () +{ + curl -s "https://context.reverso.net/translation/$1-$2/$3" \ + --compressed \ + -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0' \ + -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \ + -H 'Accept-Language: en-US,en;q=0.5' \ + -H 'Accept-Encoding: gzip, deflate, br' | + pup 'a.link_highlighted em text{}' | + sed 's/.*/\L&/' | + sort | uniq | sed 's/.*/ &/' +} + +# prints the current language +current_language () +{ + log " current: $primary-$secondary" +} + +select_language () +{ + tmp="$(languages | fzf)" + [ "$tmp" ] && [ "$tmp" != "$primary" ] && [ "$tmp" != "$secondary" ] && + eval "$1=\"$tmp\"" + current_language +} + +# set default languages +primary=french +secondary=dutch + + +main () +{ + current_language + while true + do + log -n '>' + read -r prompt + test $? -eq 1 && exit 0 # quit on ctrl-d + case "$prompt" in + q) break ;; + l) clear ;; + i) tmp="$secondary"; secondary="$primary"; primary="$tmp" + current_language ;; + h) help ;; # TODO + p) select_language primary ;; + s) select_language secondary ;; + '') ;; + *) translate "$primary" "$secondary" "$prompt" ;; + esac + done +} + + +if [ "$1" = "--help" ] || [ "$1" = "-h" ] +then + log "usage: trl" + help + exit +fi + +main diff --git a/bin/extra/wipe b/bin/extra/wipe new file mode 100755 index 0000000..ec2abe9 --- /dev/null +++ b/bin/extra/wipe @@ -0,0 +1,13 @@ +#!/bin/sh +[ 0 -eq "$#" ] && >&2 echo 'usage: wipe ' && exit 1 +[ ! -f "$1" ] && [ ! -d "$1" ] && >&2 echo "'$1' not found." && exit 1 + +confirm "sure?" || exit 1 +>&2 printf "\n" + +find "$1" -type f -print0 | + xargs -0I{} shred -uz "{}" && + [ -d "$1" ] && # remove leftovver empty directories + find "$1" | tac | tr '\n' '\0' | + xargs -0I{} rm -d "{}" && + >&2 echo "wiped." -- cgit v1.2.3 From b3f42fec8739d1d23ec6d64ff35c9db022c5adca Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:15:52 +0200 Subject: [googoo] removed functions and updated behaviour removed functions that where unneed as they were only called once, changed behaviour to not implement fzf in goo but in the functions itself, this makes goo easier to implement in other commands. Also ported over the funcitonality of setting the query with the first argument --- bin/common/goo | 7 +------ config/essentials/zsh/functions.zsh | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/common/goo b/bin/common/goo index 2a5faad..a56cbaf 100755 --- a/bin/common/goo +++ b/bin/common/goo @@ -15,14 +15,9 @@ VisualParadigm intellij arduino15" -if [ -n "$2" ] -then - [ -d "$2" ] && dest="$2" || opt="-q $2" -fi - for dir in $exclude; do dirs="$dirs -name \"$dir\" -o " done cmd="find ${dest:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" -eval "$cmd" 2>/dev/null | fzf $opt +eval "$cmd" 2>/dev/null diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 053ce8e..c4999db 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -39,23 +39,30 @@ nnn() { test -z "$NNNLVL" && /usr/bin/nnn "$@" || exit } ranger() { test -z "$RANGER_LEVEL" && /usr/bin/ranger "$@" || exit } # googoo aliases -ff () { goo f "$1" } -fd () { goo d "$1" } -fdf () { goo f "$1" | xargs -I {} dirname "{}" } +_googoo_fzf_opt () +{ + if [ "$1" ] + then + [ -d "$1" ] && dest="$1" || opt="-q $1" + fi +} o () { - f="$(ff $1)" + _googoo_fzf_opt "$1" + f="$(goo f "dest" | fzf $opt)" test "$1" && shift - test -n "$f" && $EDITOR $@ "$f" + test -f "$f" && $EDITOR $@ "$f" } go () { - d="$(fd $1)" + _googoo_fzf_opt "$1" + d="$(goo d "$dest" | fzf $opt)" test -d "$d" && cd "$d" } ogo () { - d="$(fdf $1)" + _googoo_fzf_opt "$1" + d="$(dirname "$(goo f "$dest")" | fzf $opt)" test -d "$d" && cd "$d" } -- cgit v1.2.3 From 93d3613febfb869d5f30d74c25b2fbc0b20170ca Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:17:48 +0200 Subject: [aliases] added diff alias --- config/essentials/zsh/aliases.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index b1d4a50..9849b93 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -128,6 +128,7 @@ alias xrandr-default='xrandr --auto --output VGA-1 --mode 1920x1080 --left-of HD alias d='du -d 0 -h' alias dud='du .* * -d 0 -h 2>/dev/null | sort -h' alias df='df -h' +alias diff='diff -u --color' alias shred='shred -uz' alias lsblk='lsblk -o name,type,fsused,fsavail,size,fstype,label,mountpoint' alias floc='doas find / -type "f" 2> /dev/null | grep' -- cgit v1.2.3 From 02a5c5ddf55986666335e2d5a16c4635f0b6ca80 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:17:59 +0200 Subject: [functions] use grouping in calc, added psgrep --- config/essentials/zsh/functions.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index c4999db..3c5f11f 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -76,7 +76,13 @@ ipc () fi } -calc () { echo "$@" | bc -l } +calc () { echo "$@" | bc -l | numfmt --grouping; } + +psgrep () +{ + [ $# -eq 0 ] && return 1 + pgrep "$@" | xargs ps +} unique () { local f -- cgit v1.2.3 From d3311ada0ee90b20c6f4cf7d7ef2888c27dc3b87 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:18:22 +0200 Subject: [startw] start a terminal on startup --- config/hyprland/hypr/startup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/hyprland/hypr/startup.sh b/config/hyprland/hypr/startup.sh index 83fefe4..6d5957f 100755 --- a/config/hyprland/hypr/startup.sh +++ b/config/hyprland/hypr/startup.sh @@ -5,3 +5,4 @@ gammastep & wl-paste --watch cliphist store & keyadd id_rsa & swayidle 300 locker & +$TERMINAL & -- cgit v1.2.3 From 949d2f7025cbfe4db316a3fc13199ac5c82d4b5b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:18:46 +0200 Subject: [zshrc] use exec and keychain identity Add keychain identity on startup, this is more useful because with suspend I will only type the password once per day. Also it makes adding with keyadd faster. Also use exec to have less processes, don't know if it works though... --- bin/guiscripts/startw | 1 + config/essentials/zsh/.zshrc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/guiscripts/startw b/bin/guiscripts/startw index 768f401..9b35556 100755 --- a/bin/guiscripts/startw +++ b/bin/guiscripts/startw @@ -1,5 +1,6 @@ #!/bin/sh eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" Hyprland diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index d8675d4..0665533 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -5,9 +5,9 @@ then clear if [ "/dev/tty1" = "$TTY" ] then - startw > /dev/null 2>&1 + exec startw > /dev/null 2>&1 else - startx > /dev/null 2>&1 + exec startx > /dev/null 2>&1 fi exit fi -- cgit v1.2.3 From ab67292b4ce728aea904799197e761002832f8c5 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:37:39 +0200 Subject: [mpass] cleanup of error handling use || instead of test $? -gt 0, because they do the same thing. --- bin/menuscripts/mpass | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index 0117b97..4ecd4bc 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -18,10 +18,8 @@ do done test -z "$file" && exit 1 -pass show -c "$file" -test $? -gt 0 && exit 1 +pass show -c "$file" || exit 1 +notify-send -t 1000 "mpass" "copied $choice" [ "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null && # on wayland and cliphist is running cliphist list | head -n 1 | cliphist delete - -notify-send -t 1000 "mpass" "copied $choice" -- cgit v1.2.3 From d86de5019e1ab222118ac85201141f1b7b5bc0b0 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 23:21:02 +0200 Subject: [waybar] added back window title --- config/hyprland/waybar/config.jsonc | 2 +- config/hyprland/waybar/schemes/base16.css | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index 2ab4837..e1c79b6 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -1,6 +1,6 @@ { "layer": "top", - "modules-left": ["battery", "hyprland/workspaces", "mpd"], + "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], "modules-center": ["clock"], "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "tray"], "mpd": { diff --git a/config/hyprland/waybar/schemes/base16.css b/config/hyprland/waybar/schemes/base16.css index 589cc12..61378fd 100644 --- a/config/hyprland/waybar/schemes/base16.css +++ b/config/hyprland/waybar/schemes/base16.css @@ -38,7 +38,6 @@ window#waybar.PCSX2 #window { } #mpd, #battery, -#window, #custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory { margin-left: 8px; padding-left: 16px; @@ -47,7 +46,6 @@ window#waybar.PCSX2 #window { } #workspaces, #mpd, #battery, #clock, -#window, #custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #tray { border: solid @background 2px; margin-top: 4px; @@ -108,8 +106,8 @@ window#waybar.PCSX2 #window { } #window { - color: @background; - background: @color4; + padding-left: 16px; + color: @color4; } #custom-wireguard { -- cgit v1.2.3 From 35ceb3624eff6cb65905dd9589575a606ef2d254 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 23:21:28 +0200 Subject: [waybar] added format for mpd --- config/hyprland/waybar/config.jsonc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc index 2ab4837..3a38ca4 100644 --- a/config/hyprland/waybar/config.jsonc +++ b/config/hyprland/waybar/config.jsonc @@ -7,8 +7,8 @@ "tooltip": false, "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", "artist-len": 24, - "format-disconnected": "", - "format-stopped": "", + "format-disconnected": "s", + "format-stopped": "s", "state-icons": { "playing": "", "paused": "", -- cgit v1.2.3