mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2025-07-16 07:39:40 +03:00
Organize scripts
This commit is contained in:
15
scripts/copy2clipboard
Executable file
15
scripts/copy2clipboard
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
file=$(find . -maxdepth 1 -type f | cut -c 3- | rofi -i -dmenu -p "Select file to copy its contents")
|
||||
else
|
||||
file=$1
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$file" ]; then
|
||||
exit
|
||||
fi
|
||||
cat $file | xclip -selection c
|
||||
notify-send "Contents of the '$file' is copied to clipboard!"
|
Reference in New Issue
Block a user