mirror of
https://github.com/ksyasuda/dotfiles.git
synced 2026-05-26 12:55:13 -07:00
add scripts
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
HOME="/home/$(whoami)"
|
||||
clip="$(wl-paste)"
|
||||
if [[ -z "$clip" ]]; then
|
||||
notify-send "Dragon" "Clipboard is empty"
|
||||
exit 1
|
||||
fi
|
||||
DIR="$(hyprctl activeworkspace | grep -i lastwindowtitle | sed 's/\slastwindowtitle: //')"
|
||||
DIR="${DIR//\~/$HOME}"
|
||||
PTH="$DIR/$(basename "$clip")"
|
||||
if [[ -e "$PTH" ]]; then
|
||||
dragon-drop "$PTH"
|
||||
fi
|
||||
Reference in New Issue
Block a user