mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 22:30:51 +00:00
Including a Dolphin script to copy filenames
This commit is contained in:
parent
c118eebbf4
commit
0cb973041c
24
Dolphin/bf-copy.desktop
Normal file
24
Dolphin/bf-copy.desktop
Normal file
@ -0,0 +1,24 @@
|
||||
# Copyright 2019 Bruno Fontes <outros+dev@m.brunofontes.net>
|
||||
|
||||
[Desktop Entry]
|
||||
Type=Service
|
||||
ServiceTypes=KonqPopupMenu/Plugin
|
||||
MimeType=application/octet-stream;inode/directory
|
||||
Actions=copyNameOnly;copyPathOnly;copyPath;
|
||||
X-KDE-Priority=TopLevel
|
||||
X-KDE-Submenu=BFCopy
|
||||
|
||||
[Desktop Action copyNameOnly]
|
||||
Name=Copy Filename
|
||||
Name[pt_BR]=Copiar nome do arquivo
|
||||
Exec=bash ~/.local/share/kservices5/ServiceMenus/copyName.sh %F
|
||||
|
||||
[Desktop Action copyPathOnly]
|
||||
Name=Copy Path
|
||||
Name[pt_BR]=Copiar caminho
|
||||
Exec=bash ~/.local/share/kservices5/ServiceMenus/copyPath.sh %F
|
||||
|
||||
[Desktop Action copyPath]
|
||||
Name=Copy Full Path
|
||||
Name[pt_BR]=Copiar caminho completo
|
||||
Exec=bash ~/.local/share/kservices5/ServiceMenus/copyFullPath.sh %F
|
7
Dolphin/copyFullPath.sh
Normal file
7
Dolphin/copyFullPath.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#! /bin/bash
|
||||
#printf "$@" | xsel -b -i
|
||||
filelist=""
|
||||
for line in "$@"; do
|
||||
filelist="$filelist$line\n"
|
||||
done
|
||||
printf "$filelist" | xsel -b -i
|
7
Dolphin/copyName.sh
Normal file
7
Dolphin/copyName.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#! /bin/bash
|
||||
filelist=""
|
||||
for line in "$@"; do
|
||||
filename=$(basename -- "$line")
|
||||
filelist="$filelist$filename\n"
|
||||
done
|
||||
printf "$filelist" | xsel -b -i
|
8
Dolphin/copyPath.sh
Normal file
8
Dolphin/copyPath.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
filelist=""
|
||||
for line in "$@"; do
|
||||
filename=$(basename -- "$line")
|
||||
folder=${line%"$filename"}
|
||||
filelist="$filelist$folder\n"
|
||||
done
|
||||
printf "$filelist" | xsel -b -i
|
Loading…
Reference in New Issue
Block a user