From 2f3909181e31fb443c4ad2048a1e886e877e4a5c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 12 Nov 2023 12:30:38 +0100 Subject: put channels in a subfolder --- bin/common/ytclipo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/common/ytclipo') diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 5d86c3f..8997539 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -23,5 +23,5 @@ yt-dlp "$inp" \ -f "b" \ -S "res:1080" \ -P "$HOME/vids/youtube/" \ - -o "%(channel)s - %(title)s.%(ext)s" + -o "%(channel)s/%(title)s.%(ext)s" notify-send "ytclipo" "finished downloading." || : -- cgit v1.2.3 From 1dcdf0cdb769296c33737d285ba9008cff0d60ba Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 16 Nov 2023 21:56:12 +0100 Subject: improved compatibility for different frontends Introduces the use of parameter expansion for converting the link, also convert to youtube.com, because this fixes the bug where you couldn't download playlists/channels. --- bin/common/ytclipo | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bin/common/ytclipo') diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 8997539..959ee21 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -11,9 +11,13 @@ fi inp="$1" [ "${inp:=$(paste)}" ] || inp="$(cat /dev/stdin)" -# take last link from clipboard -# works when link is from yt-local -inp="https://youtu.be/$(echo "$inp" | sed 's/.*\(.\{11\}\)$/\1/')" +# remove util scheme +inp="${inp#*//}" +# convert to youtube.com/path url +# works for: +# - 'youtu.be/watch?v=xxxxxx' +# - 'https://piped.video/watch?v=xxxxx' +inp="https://youtube.com/${inp#*/}" >&2 printf "inp: %s\n" "$inp" notify-send "ytclipo" "downloading $inp" || : -- cgit v1.2.3 From e04eb710bbd01c0f6f486c037815687081c21d4b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 12 Dec 2023 00:12:10 +0100 Subject: added ytlink --- bin/common/ytclipo | 19 +------------------ bin/common/ytlink | 14 ++++++++++++++ config/essentials/zsh/aliases.sh | 1 + 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100755 bin/common/ytlink (limited to 'bin/common/ytclipo') diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 959ee21..1a82df2 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -1,23 +1,6 @@ #!/bin/sh -# argument ($1) -> clipboard -> stdin -if [ "$WAYLAND_DISPLAY" ] -then paste() { wl-paste; } -elif [ "$TERMUX_VERSION" ] -then paste() { termux-clipboard-get; } -else paste() { xclip -o -sel c; } -fi - -inp="$1" -[ "${inp:=$(paste)}" ] || inp="$(cat /dev/stdin)" - -# remove util scheme -inp="${inp#*//}" -# convert to youtube.com/path url -# works for: -# - 'youtu.be/watch?v=xxxxxx' -# - 'https://piped.video/watch?v=xxxxx' -inp="https://youtube.com/${inp#*/}" +inp="$(ytlink)" >&2 printf "inp: %s\n" "$inp" notify-send "ytclipo" "downloading $inp" || : diff --git a/bin/common/ytlink b/bin/common/ytlink new file mode 100755 index 0000000..a5e9bf0 --- /dev/null +++ b/bin/common/ytlink @@ -0,0 +1,14 @@ +#!/bin/sh + +# convert to youtube.com/path url +# works for: +# - 'youtu.be/watch?v=xxxxxx' +# - 'https://piped.video/watch?v=xxxxx' + +inp="$1" +[ "${inp:=$(clipo)}" ] || inp="$(cat /dev/stdin)" + +# remove util scheme +inp="${inp#*//}" +inp="https://youtube.com/${inp#*/}" +printf "%s" "$inp" diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 9c8f7f6..ee7dfd8 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -284,6 +284,7 @@ alias ffwin='hyprctl clients -j | jq '\''.[].pid'\'' | fzf --preview "hyprctl cl alias pff='find ${PASSWORD_STORE_DIR:=~/src/password-store/} -name "*.gpg" | sed -e "s@$PASSWORD_STORE_DIR/@@" -e '\''s/\.gpg$//'\'' | fzf | xargs pass show -c' alias fzps='fzf --print0 | xargs -0I{}' alias ytdl='yt-dlp --restrict-filenames --embed-chapters -f "b" -S "res:1080" -P "$HOME/vids/youtube/" -o "%(channel)s/%(title)s.%(ext)s"' +alias ytplay='mpv "$(ytlink)"' # emacs aliases alias emacsd='emacs --daemon' -- cgit v1.2.3 From 82fe753f3dd60d358ee399ff7ac5740f849a1741 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Wed, 3 Jan 2024 16:07:17 +0100 Subject: update --- bin/common/ytclipo | 4 ++-- config/essentials/git/config | 7 ++++++- config/essentials/shell/aliases.sh | 2 +- config/essentials/shell/functions.sh | 2 +- config/essentials/zsh/.zshrc | 2 +- config/home/.bashrc | 4 +++- config/home/.zshenv | 4 ++-- config/theme/fontconfig/fonts.conf | 3 ++- 8 files changed, 18 insertions(+), 10 deletions(-) (limited to 'bin/common/ytclipo') diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 1a82df2..6416a15 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -2,7 +2,7 @@ inp="$(ytlink)" >&2 printf "inp: %s\n" "$inp" -notify-send "ytclipo" "downloading $inp" || : +# notify-send "ytclipo" "downloading $inp" || : yt-dlp "$inp" \ --restrict-filenames \ @@ -11,4 +11,4 @@ yt-dlp "$inp" \ -S "res:1080" \ -P "$HOME/vids/youtube/" \ -o "%(channel)s/%(title)s.%(ext)s" -notify-send "ytclipo" "finished downloading." || : +# notify-send "ytclipo" "finished downloading." || : diff --git a/config/essentials/git/config b/config/essentials/git/config index 90bab4f..fcf80db 100644 --- a/config/essentials/git/config +++ b/config/essentials/git/config @@ -3,5 +3,10 @@ [user] email = raymaekers.luca@gmail.com name = Raymaekers Luca + signingkey = 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D [push] - autoSetupRemote = true + autosetupremote = true +[pull] + rebase = false +[commit] + gpgsign = true diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index eed3fa0..99c49d8 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -140,7 +140,7 @@ alias ss4='ss -tln4p' alias mdb='mariadb -u admin -ppass admindb' alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' -alias tmux='tmux a || tmux' +alias tmux='pgrep tmux && tmux attach || tmux new-session' # ssh alias sha='ssh-add' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 37e471c..b699a86 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -110,7 +110,7 @@ __git_files() { } esc() { - $EDITOR "$(which $1)" + eval "$EDITOR '$(which $1)'" } delfile() { diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 2223c67..99c65d7 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -153,7 +153,7 @@ command_not_found_handler () { } # prompt -PS1=' %B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~ ' +PS1=' %K{16}%B%(#.%F{1}.%F{13})%n%b%f@%B%F{6}%m%b%f %3~%k ' RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(parse_git_branch)%f%(?.. %?)' setopt prompt_subst diff --git a/config/home/.bashrc b/config/home/.bashrc index de7659a..312500d 100644 --- a/config/home/.bashrc +++ b/config/home/.bashrc @@ -2,9 +2,11 @@ SHELL=/bin/bash PATH=$HOME/bin:$PATH color1="\[\033[35m\]" color2="\[\033[36m\]" +color3="\[\033[40m\]" +color4="\[\033[38m\]" bold="\[\033[1m\]" reset="\[\033[0m\]" -PS1="${color1}${bold} [\\u${reset}@${color2}${bold}\\h]${reset} \\w " +PS1="${color1}${bold} ${color3}\\u${reset}${color3}${color4}@${color2}${bold}\\h${reset}${color3} \\w${reset} " HISTFILE= . $HOME/.config/shell/aliases.sh . $HOME/.config/shell/functions.sh diff --git a/config/home/.zshenv b/config/home/.zshenv index d33fbd7..e8021ec 100644 --- a/config/home/.zshenv +++ b/config/home/.zshenv @@ -1,6 +1,6 @@ #!/bin/zsh -export EDITOR="emacsclient -t" -export VISUAL="emacsclient -t -c -a emacs" +export EDITOR="emacsclient -nw -q" +export VISUAL="emacsclient -nw -q" export BROWSER="librewolf" export VIEWER="zathura" diff --git a/config/theme/fontconfig/fonts.conf b/config/theme/fontconfig/fonts.conf index 8681e4e..625dd34 100644 --- a/config/theme/fontconfig/fonts.conf +++ b/config/theme/fontconfig/fonts.conf @@ -16,7 +16,8 @@ monospace - JetBrains Mono + JetBrains Mono + JetBrains Mono NerdFont Joy Pixels -- cgit v1.2.3