diff options
| -rw-r--r-- | .config/i3/config | 2 | ||||
| -rw-r--r-- | .config/nvim/autoload/plug.vim | 25 | ||||
| -rwxr-xr-x | .scripts/i3cmds/cabl | 26 | ||||
| -rwxr-xr-x | .scripts/i3cmds/tutorialvids | 1 | ||||
| -rwxr-xr-x | .scripts/statusbar/clock | 4 | ||||
| -rw-r--r-- | .tmux.conf | 3 |
6 files changed, 30 insertions, 31 deletions
diff --git a/.config/i3/config b/.config/i3/config index 46effce..6c0b83e 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -160,7 +160,7 @@ bindsym $mod+Shift+z gaps outer current minus 5 bindsym $mod+x exec --no-startup-id mpc pause; exec --no-startup-id pauseallmpv ; exec --no-startup-id i3lock -e -f -c 1d2021 bindsym $mod+Shift+x exec --no-startup-id prompt "Shutdown computer?" "$shutdown" -bindsym $mod+c exec --no-startup-id freealf +bindsym $mod+c exec --no-startup-id cabl bindsym $mod+Shift+c exec --no-startup-id camtoggle bindsym $mod+v exec --no-startup-id $term -e $EDITOR -c "VimwikiIndex" diff --git a/.config/nvim/autoload/plug.vim b/.config/nvim/autoload/plug.vim index ace33a8..4f2a446 100644 --- a/.config/nvim/autoload/plug.vim +++ b/.config/nvim/autoload/plug.vim @@ -1,28 +1,3 @@ -" More information: https://github.com/junegunn/vim-plug -" -" Copyright (c) 2017 Junegunn Choi -" -" MIT License -" -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be -" included in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - if exists('g:loaded_plug') finish endif diff --git a/.scripts/i3cmds/cabl b/.scripts/i3cmds/cabl new file mode 100755 index 0000000..3ca6556 --- /dev/null +++ b/.scripts/i3cmds/cabl @@ -0,0 +1,26 @@ +#!/bin/bash +# Dependencies are xclip and xorg-xprop. +# qrencode required for qrcode generation. +# groff/zathura required for man pages. +prim="$(xclip -o)"; [ -z "$prim" ] && exit + +PID=$(xprop -id "$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" | grep -m 1 PID | cut -d " " -f 3) +PID=$(echo "$(pstree -lpA "$PID" | tail -n 1)" | awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g') +cd "$(readlink /proc/"$PID"/cwd)" +[ -f "$prim" ] && xdg-open "$prim" && exit +[ -d "$prim" ] && "$TERMINAL" "$prim" && exit + +websearch() { "$BROWSER" "https://duckduckgo.com/?q=$@" ;} +wikipedia() { "$BROWSER" "https://en.wikipedia.org/wiki/$@" ;} +wiktionary() { "$BROWSER" "https://en.wiktionary.org/wiki/$@" ;} +maps() { "$BROWSER" "https://www.openstreetmap.org/search?query=$@" ;} +ebay() { "$BROWSER" "https://www.ebay.com/sch/$@" ;} + +echo "$prim" | grep "^.*\.[A-Za-z]\+.*" >/dev/null && gotourl() { "$BROWSER" "$@" ;} +echo "$prim" | grep "^.*@.*\.[A-Za-z]\+$" >/dev/null && email() { xdg-email "$@" ;} +command -v qrencode >/dev/null && qrcode() { qrencode "$@" -s 10 -o /tmp/qr.png && xdg-open /tmp/qr.png ;} +man -k "^$prim$" >/dev/null && manual() { man -Tpdf "$prim" | zathura - ;} + +func="$(declare -F | awk '{print $3}' | dmenu -p "Plumb $prim to?" -i -l 15)" + +[ -z "$func" ] || "$func" "$prim" diff --git a/.scripts/i3cmds/tutorialvids b/.scripts/i3cmds/tutorialvids index 5a3aa2b..9ff6c21 100755 --- a/.scripts/i3cmds/tutorialvids +++ b/.scripts/i3cmds/tutorialvids @@ -4,6 +4,7 @@ status bar https://www.youtube.com/watch?v=gKumet6b-WY sxiv (image viewer) https://www.youtube.com/watch?v=GYW9i_u5PYs st (terminal) https://www.youtube.com/watch?v=9H75enWM22k i3 (window manager) https://www.youtube.com/watch?v=GKviflL9XeI +pacman (installing/managing programs) https://www.youtube.com/watch?v=-dEuXTMzRKs mutt (email) https://www.youtube.com/watch?v=2U3vRbF7v5A ncmpcpp (music player) https://www.youtube.com/watch?v=sZIEdI9TS2U newsboat (RSS reader) https://www.youtube.com/watch?v=dUFCRqs822w diff --git a/.scripts/statusbar/clock b/.scripts/statusbar/clock index 587e3c9..588c523 100755 --- a/.scripts/statusbar/clock +++ b/.scripts/statusbar/clock @@ -3,8 +3,8 @@ date '+%Y %b %d (%a) %I:%M%p' case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null && notify-send "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "$(calcurse -d3)" ;; - 2) "$TERMINAL" -e calcurse ;; + 1) pgrep -x dunst >/dev/null && notify-send "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "$(calcurse -D ~/.config/calcurse -d3)" ;; + 2) "$TERMINAL" -e calcurse -D ~/.config/calcurse ;; 3) pgrep -x dunst >/dev/null && notify-send "<b>📅 Time/date module:</b> - Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` - Middle click opens calcurse if installed" ;; @@ -161,9 +161,6 @@ bind-key -r C-j resize-pane -D bind-key -r C-k resize-pane -U bind-key -r C-l resize-pane -R -# use vim motion keys while in copy mode -setw -g mode-keys vi - ############################################################################ # layouts ############################################################################ |
