From 8b087082d6eb147c082cd3dcfb25e0984fd2c268 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Fri, 5 Sep 2025 23:48:15 -0400 Subject: [PATCH] Update key binds, deploy script, and remove tmux starting by default --- bin/pubs-rofi.sh | 27 ++++++++++++++++++++++++- config/sxhkd/sxhkdrc | 11 +++++++--- deploy.sh | 1 + home/.zshrc | 13 +++++++----- wallpapers/current_rotation/fuji.jpg | 2 +- wallpapers/current_rotation/sequoia.png | 2 +- 6 files changed, 45 insertions(+), 11 deletions(-) mode change 120000 => 100755 bin/pubs-rofi.sh diff --git a/bin/pubs-rofi.sh b/bin/pubs-rofi.sh deleted file mode 120000 index 8373977..0000000 --- a/bin/pubs-rofi.sh +++ /dev/null @@ -1 +0,0 @@ -/home/aselimov/projects/utility/scripts/pubs-rofi.sh \ No newline at end of file diff --git a/bin/pubs-rofi.sh b/bin/pubs-rofi.sh new file mode 100755 index 0000000..af757b8 --- /dev/null +++ b/bin/pubs-rofi.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +#This script wraps various pub commands into a dmenu menu +function fail { + printf '%s\n' "$1" >&2 + exit "${2-1}" +} + +dmenu="dmenu -theme-str 'window {width: 80%;}' -i" +citekey=$(pubs list | eval "$dmenu" | cut -d ' ' -f 1 | tr -d '[]\n' ) + +if [ "$citekey" = "" ]; then + exit 1 +fi + +if [ "$1" = "open" ]; then + pubs doc open "$citekey" +elif [ "$1" = "tag" ]; then + echo $citekey| tr -d '\n'| xclip + xdotool type "$citekey" +elif [ "$1" = "url" ]; then + url=$(grep "url =" $HOME/.pubs/bib/$citekey.bib | cut -d "{" -f 2 | tr -d "{ },") + echo $url| tr -d '\n'| xclip + xdotool type "$url" +fi + diff --git a/config/sxhkd/sxhkdrc b/config/sxhkd/sxhkdrc index 8c27c1a..0ea864e 100644 --- a/config/sxhkd/sxhkdrc +++ b/config/sxhkd/sxhkdrc @@ -28,9 +28,6 @@ alt+ctrl+t alt+ctrl+l passmenu --type -ctrl+shift+v - paste_from_primary.sh - alt+shift+s maim -s --hidecursor | xclip -selection clipboard -t image/png @@ -53,3 +50,11 @@ shift+alt+i alt+e emojis + +# Smart copy/paste that works everywhere +alt + c + xclip -selection primary -o | xclip -selection clipboard -i + +# Pste +alt + v + sh -c 'xclip -selection clipboard -o | xclip -selection primary -i && xdotool click 2' diff --git a/deploy.sh b/deploy.sh index 3bee40f..aae4b4f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -56,5 +56,6 @@ deploy_links() { deploy_links "$PROJECT_ROOT/bin" "$HOME/bin" "bin" deploy_links "$PROJECT_ROOT/home" "$HOME" "home" deploy_links "$PROJECT_ROOT/config" "$HOME/.config" "config" +deploy_links "$PROJECT_ROOT/wallpapers" "$HOME/media/wallpapers" "wallpapers" echo "All deployments complete!" diff --git a/home/.zshrc b/home/.zshrc index 73a3060..0957bc1 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -1,9 +1,13 @@ # Lines configured by zsh-newuser-install HISTFILE=~/.histfile -HISTSIZE=1000 -SAVEHIST=1000 +HISTSIZE=100000 +SAVEHIST=100000 setopt extendedglob notify unsetopt autocd beep +setopt INC_APPEND_HISTORY # Write to history file immediately, not when shell exits +setopt SHARE_HISTORY # Share history between all sessions +setopt HIST_IGNORE_DUPS # Don't save duplicate commands +setopt HIST_IGNORE_SPACE # Don't save commands starting with space bindkey -v # End of lines configured by zsh-newuser-install # The following lines were added by compinstall @@ -26,6 +30,7 @@ alias mergepdf="gs -dBATCH -dNOPAUSE -dQUIET -sDEVICE=pdfwrite -sOutputFile=outp alias ddg="w3m ddg.gg" alias cal="khal calendar" #alias sxiv="sxiv-rifle" +alias clip2png="xclip -selection clipboard -target image/png -out" function addbin(){ ln -s $PWD/$1 /home/aselimov/bin } @@ -56,9 +61,7 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-12.8/lib64" [ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env -if [ -z "$TMUX" ]; then - tmux -fi export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init - zsh)" + diff --git a/wallpapers/current_rotation/fuji.jpg b/wallpapers/current_rotation/fuji.jpg index 76ac9bf..3e2b4f2 120000 --- a/wallpapers/current_rotation/fuji.jpg +++ b/wallpapers/current_rotation/fuji.jpg @@ -1 +1 @@ -/home/aselimov/projects/SelimovDE/wallpapers/real-pics/fuji.jpg \ No newline at end of file +/home/aselimov/repos/SelimovDE/wallpapers/real-pics/fuji.jpg \ No newline at end of file diff --git a/wallpapers/current_rotation/sequoia.png b/wallpapers/current_rotation/sequoia.png index 235a01a..fda3d38 120000 --- a/wallpapers/current_rotation/sequoia.png +++ b/wallpapers/current_rotation/sequoia.png @@ -1 +1 @@ -/home/aselimov/projects/SelimovDE/wallpapers/real-pics/sequoia.png \ No newline at end of file +/home/aselimov/repos/SelimovDE/wallpapers/real-pics/sequoia.png \ No newline at end of file