From 27da5ca3e1d640e7b4a84eba277de1b3fa9dd99d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 19 Apr 2023 21:35:09 +0200 Subject: moved dmpdf to menuscripts --- bin/guiscripts/dmpdf | 25 ------------------------- bin/menuscripts/mpdf | 25 +++++++++++++++++++++++++ config/hyprland/hypr/binds.conf | 4 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) delete mode 100755 bin/guiscripts/dmpdf create mode 100755 bin/menuscripts/mpdf diff --git a/bin/guiscripts/dmpdf b/bin/guiscripts/dmpdf deleted file mode 100755 index d26c841..0000000 --- a/bin/guiscripts/dmpdf +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -if [ "$MENUCMD" = "tofi" ] -then - menucmd="tofi --width 30% --height 30% --matching-algorithm normal --prompt-text pdf:" -elif [ "$MENUCMD" = "dmenu" ] -then - menucmd="dmenu -l 10 -g 1 -x -i -p pdf:" -else - menucmd="fzf" -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" | - awk '{printf "%s %s\n", NR ":", $0}' | - $menucmd | - grep -oE "^[0-9]+:" | - cut -f1 -d:)" -if [ -z "$choice" ]; then - exit -fi -file="$(sed -n "${choice}p" "$tmp")" -zathura "$file" & diff --git a/bin/menuscripts/mpdf b/bin/menuscripts/mpdf new file mode 100755 index 0000000..d26c841 --- /dev/null +++ b/bin/menuscripts/mpdf @@ -0,0 +1,25 @@ +#!/bin/sh + +if [ "$MENUCMD" = "tofi" ] +then + menucmd="tofi --width 30% --height 30% --matching-algorithm normal --prompt-text pdf:" +elif [ "$MENUCMD" = "dmenu" ] +then + menucmd="dmenu -l 10 -g 1 -x -i -p pdf:" +else + menucmd="fzf" +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" | + awk '{printf "%s %s\n", NR ":", $0}' | + $menucmd | + grep -oE "^[0-9]+:" | + cut -f1 -d:)" +if [ -z "$choice" ]; then + exit +fi +file="$(sed -n "${choice}p" "$tmp")" +zathura "$file" & diff --git a/config/hyprland/hypr/binds.conf b/config/hyprland/hypr/binds.conf index cc3ebf9..c93e77d 100644 --- a/config/hyprland/hypr/binds.conf +++ b/config/hyprland/hypr/binds.conf @@ -82,7 +82,7 @@ bind =, H, exec, mhelp bind =, I, exec, mapimg bind =, L, exec, dmlang bind =, M, exec, mpass -bind =, P, exec, dmpdf +bind =, P, exec, mpdf bind =, O, exec, mpower bind =, U, exec, mcurs bind =, V, exec, mvid @@ -96,7 +96,7 @@ bind = $mainMod, H, exec, mhelp bind = $mainMod, I, exec, mapimg bind = $mainMod, L, exec, dmlang bind = $mainMod, M, exec, mpass -bind = $mainMod, P, exec, dmpdf +bind = $mainMod, P, exec, mpdf bind = $mainMod, O, exec, mpower bind = $mainMod, U, exec, mcurs bind = $mainMod, V, exec, mvid -- cgit v1.2.3 From e92f6a31d4c53a83f82e1b31bdaa2933cf18f697 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Apr 2023 17:51:28 +0200 Subject: added screenshot script --- config/hyprland/hypr/binds.conf | 10 ++++------ config/hyprland/hypr/screenshot.sh | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100755 config/hyprland/hypr/screenshot.sh diff --git a/config/hyprland/hypr/binds.conf b/config/hyprland/hypr/binds.conf index c93e77d..e1dc381 100644 --- a/config/hyprland/hypr/binds.conf +++ b/config/hyprland/hypr/binds.conf @@ -114,9 +114,7 @@ bind =, XF86MonBrightnessDown, exec, light -U 5 bind = $mainMod SHIFT, B, exec, killall waybar; waybar -$actshot = grim -o "$(hyprctl monitors -j | jq -r ".[] | select(.id == "$(hyprctl activewindow -j | jq -r '.monitor')")" | jq -r '.name')" -$selshot = grim -g "$(slurp)" /dev/stdout | wl-copy - -bind = $mainMod ALT, S, exec, $actshot -bind = $mainMod SHIFT, S, exec, $selshot -bind = $mainMod ALT SHIFT, S, exec, $actshot /dev/stdout | wl-copy +bind = $mainMod ALT, S, exec, $HOME/.config/hypr/screenshot.sh -m +bind = $mainMod SHIFT, S, exec, $HOME/.config/hypr/screenshot.sh -sc +bind = $mainMod ALT SHIFT, S, exec, $HOME/.config/hypr/screenshot.sh -s +bind = $mainMod CTRL, S, exec, $HOME/.config/hypr/screenshot.sh -f diff --git a/config/hyprland/hypr/screenshot.sh b/config/hyprland/hypr/screenshot.sh new file mode 100755 index 0000000..533ca98 --- /dev/null +++ b/config/hyprland/hypr/screenshot.sh @@ -0,0 +1,21 @@ +case $1 in + "-m") + actwin="$(hyprctl activewindow -j | jq -r '.monitor')" + actmon="$(hyprctl monitors -j | + jq -r ".[] | select(.id == $actwin)" | + jq -r '.name')" + grim -o "$actmon" $HOME/pics/screenshots/"$(date +%y%m%d_%H_%M_%S.png)" + ;; + "-f") + grim $HOME/pics/screenshots/"$(date +%y%m%d_%H_%M_%S.png)" + ;; + "-s") + grim -g "$(slurp)" $HOME/pics/screenshots/"$(date +%y%m%d_%H_%M_%S.png)" + ;; + "-sc") + grim -g "$(slurp)" - | wl-copy + ;; + *) + exit + ;; +esac -- cgit v1.2.3 From 88d4252ebef9e26966cb11bc6e41a372431ea347 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Apr 2023 17:51:56 +0200 Subject: added wget alias --- config/essentials/zsh/aliases.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/config/essentials/zsh/aliases.zsh b/config/essentials/zsh/aliases.zsh index 5f4428a..25c4079 100644 --- a/config/essentials/zsh/aliases.zsh +++ b/config/essentials/zsh/aliases.zsh @@ -102,6 +102,7 @@ alias dloc='doas find / -type "d" 2> /dev/null | grep' alias fif='find . -type "f" | grep' alias fid='find . -type "d" | grep' alias sxt='sxiv -t' +alias wgsh='wget --quiet --show-progress' # ssh alias sha='ssh-add' -- cgit v1.2.3 From e2a20cf2287a89f994ea413aed5c0720f32261f0 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Apr 2023 17:52:04 +0200 Subject: fixed telekeasten mapping --- config/essentials/nvim/ftplugin/telekasten.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/essentials/nvim/ftplugin/telekasten.lua b/config/essentials/nvim/ftplugin/telekasten.lua index 99bb361..c920492 100644 --- a/config/essentials/nvim/ftplugin/telekasten.lua +++ b/config/essentials/nvim/ftplugin/telekasten.lua @@ -26,4 +26,4 @@ vim.keymap.set("i", "t", "Telekasten toggle_todoA") vim.keymap.set("n", "y", "Telekasten yank_notelink") vim.keymap.set("n", "z", "Telekasten follow_link") -vim.keymap.set("i", "l", "![A]()+A") +vim.keymap.set("i", "l", "I[A]()+A") -- cgit v1.2.3 From d6a21ceb1fee35e63198f799b24cd2b504403058 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 20 Apr 2023 17:52:40 +0200 Subject: add history to ytclipo --- bin/common/ytclipo | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 672633a..c283973 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -23,3 +23,4 @@ yt-dlp "$inp" \ -P "$HOME/vids" \ -o "%(title)s.%(ext)s" notify-send "ytclipo" "ytclipo
finished downloading." +echo "$inp" >> /tmp/ytclipo_history -- cgit v1.2.3