Контекстное меню ФМ nemo
Добавлено: 14 окт 2018, 18:17
Кстати 
Selection=s
тоже работает 
Selection=s
тоже работает Код: Выделить всё
sudo apt install curl
Код: Выделить всё
[Nemo Action]
Active=true
# The name to show in the menu, locale supported with standard desktop spec.
# **** REQUIRED ****
Name=Загрузить на Transfer.sh
# Tool tip, locale supported (Appears in the status bar)
Comment=Загрузить на Transfer.sh
# What to run. Enclose in < > to run an executable that resides in the actions folder.
# **** REQUIRED ****
Exec=<transfersh.sh %F>
# What type selection: [s]ingle, [m]ultiple, any, notnone, none (background click), or
# a number representing how many files must be selected to display.
# ****** REQUIRED *******
Selection=s
# What extensions to display on - this is an array, end with a semicolon
# Single entry options, ending in a semicolon:
# "dir" for directory selection
# "none" for no extension.
# "nodirs" for any selection, but not including directories.
# "any" for any file type, including directories.
# Individual specific extensions can be a semicolon-terminated list
# Extensions are NOT case sensitive. jpg will match JPG, jPg, jpg, etc..
# **** EITHER EXTENSIONS OR MIMETYPES IS REQUIRED *****
Extensions=nodirs
# Quote type to use (if any) - enclose paths/urls with quotes. Optional - defaults
# to no quotes.
# Can be: single, double, backtick
Quote=double
Код: Выделить всё
#!/bin/bash
fullpathname=$@
name=${fullpathname##*/}
#Загрузка файла на Transfer.sh
link=`curl --upload-file "$fullpathname" "https://transfer.sh/$name"`
#Копирование ссылки в буфер обмена
echo -n "$link" | xclip -i -selection clipboard
#Запись истории
echo $(date +%F) "$link" >> $HOME/.transfer
notify-send -t 10000 -i "gtk-ok" "Загрузка завершена" "Ссылка скопирована в буфер обмена:\n$link"
Код: Выделить всё
qrencode -o - -s 20 "$link" | gm display -title "qrencode" -geometry 700x700 - &
Код: Выделить всё
qrencode -o - -s 20 "$link" | gm display -title "qrencode" -geometry 700x700 - &
Код: Выделить всё
#Получаем содержимое буфера обмена
AAA=`xclip -sel clip -o`
#Генерируем qr-код и выводим на экран
qrencode -o - -s 20 "$AAA" | gm display -title "qrencode" -geometry 700x700 - &
#Меняем заголовок окна
sleep 0.5
wmctrl -r "qrencode" -N "$AAA"
Код: Выделить всё
bash -c $HOME/.scripts/qr_scan.sh
Код: Выделить всё
#!/bin/bash
fullpathname=$@
name=${fullpathname##*/}
#Загрузка файла на Transfer.sh
link=`curl --upload-file "$fullpathname" "https://transfer.sh/$name"`
status=$?
if [ $status = 0 ]
then
#Копирование ссылки в буфер обмена
echo -n "$link" | xclip -i -selection clipboard
#Запись истории
echo $(date +%F) "$link" >> $HOME/.transfer
notify-send -t 10000 -i "gtk-ok" "Загрузка завершена" "Ссылка скопирована в буфер обмена:\n$link"
else
notify-send -t 10000 -i "error" "Transfer.sh" "При загрузке возникла ошибка: $status"
fi
Код: Выделить всё
#!/bin/bash
fullpathname=$@ #Получаем полный путь к файлу
name=${fullpathname##*/} #Получаем часть от самого правого слеша до конца строки (получаем имя файла и расширение)
name=${name//" "/"_"} #Заменяем пробелы нижними подчеркиваниями
#Загрузка файла на Transfer.sh
link=`curl --upload-file "$fullpathname" "https://transfer.sh/$name"`
status=$?
if [ $status = 0 ]
then
#Копирование ссылки в буфер обмена
echo -n "$link" | xclip -i -selection clipboard
#Запись истории
echo $(date +%F) "$link" >> $HOME/.transfer
notify-send -t 10000 -i "gtk-ok" "Загрузка завершена" "Ссылка скопирована в буфер обмена:\n$link"
else
notify-send -t 10000 -i "error" "Transfer.sh" "При загрузке возникла ошибка: $status"
fi
sudo apt install xdotool
Код: Выделить всё
[Nemo Action]
Name=Обновить
Comment=Обновить
Icon-Name=view-refresh
Exec=xdotool key ctrl+r
Selection=none
Extensions=any