Merge dpi and screenshot changes
This commit is contained in:
commit
5e07d99a76
|
@ -143,7 +143,7 @@
|
||||||
{:description "launch eshell in new emacs frame" :group "apps" })
|
{:description "launch eshell in new emacs frame" :group "apps" })
|
||||||
(awful.key [ modkey ] "e" (fn [] (awful.spawn "emacsclient -c -a 'emacs'"))
|
(awful.key [ modkey ] "e" (fn [] (awful.spawn "emacsclient -c -a 'emacs'"))
|
||||||
{:description "launch new emacs frame" :group "apps" })
|
{:description "launch new emacs frame" :group "apps" })
|
||||||
(awful.key [ modkey ] "p" (fn [] (awful.spawn "rofi-pass"))
|
(awful.key [ modkey ] "p" (fn [] (awful.spawn "rofi-rbw --action autotype"))
|
||||||
{:description "select pass" :group "apps" })
|
{:description "select pass" :group "apps" })
|
||||||
(awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer"))
|
(awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer"))
|
||||||
{:description "Open Writer" :group "apps" })
|
{:description "Open Writer" :group "apps" })
|
||||||
|
|
|
@ -264,7 +264,7 @@ blur: {
|
||||||
# requires: https://github.com/ibhagwan/picom
|
# requires: https://github.com/ibhagwan/picom
|
||||||
method = "dual_kawase";
|
method = "dual_kawase";
|
||||||
#method = "kernel";
|
#method = "kernel";
|
||||||
strength = 10;
|
strength = 8;
|
||||||
# deviation = 1.0;
|
# deviation = 1.0;
|
||||||
# kernel = "11x11gaussian";
|
# kernel = "11x11gaussian";
|
||||||
background = false;
|
background = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[FileDialog]
|
[FileDialog]
|
||||||
history=file:///home/chris/Downloads, file:///home/chris, file:///home/chris/Documents/TFC Stuff/newsletterpics, file:///home/chris/Videos/vimeo, file:///home/chris/Pictures/tfc, file:///home/chris/Pictures
|
history=file:///home/chris, file:///home/chris/Documents/TFC Stuff/newsletterpics, file:///home/chris/Videos/vimeo, file:///home/chris/Pictures/tfc, file:///home/chris/Pictures, file:///home/chris/Videos
|
||||||
lastVisited=file:///home/chris/Pictures
|
lastVisited=file:///home/chris/Videos
|
||||||
qtVersion=5.15.2
|
qtVersion=5.15.2
|
||||||
shortcuts=file:, file:///home/chris
|
shortcuts=file:, file:///home/chris
|
||||||
sidebarWidth=116
|
sidebarWidth=116
|
||||||
|
|
|
@ -1,3 +1,28 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
maim --hidecursor --select | xclip -selection clipboard -target image/png
|
timestamp=$(date +%F-%T)
|
||||||
|
|
||||||
|
picture=$(maim --hidecursor --select /tmp/$timestamp.png)
|
||||||
|
|
||||||
|
declare -a options=(
|
||||||
|
"clipboard"
|
||||||
|
"filesave"
|
||||||
|
"cancel"
|
||||||
|
)
|
||||||
|
|
||||||
|
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -p 'Clip or Save')
|
||||||
|
|
||||||
|
if [[ "$choice" == "cancel" ]]; then
|
||||||
|
rm /tmp/$timestamp.png
|
||||||
|
echo "Canceled." && exit 1
|
||||||
|
|
||||||
|
elif [ "$choice" == "clipboard" ]; then
|
||||||
|
xclip -selection clipboard -target image/png -i /tmp/$timestamp.png
|
||||||
|
rm /tmp/$timestamp.png
|
||||||
|
echo 'saved to clipboard'
|
||||||
|
|
||||||
|
elif [ "$choice" == "filesave" ]; then
|
||||||
|
mv /tmp/$timestamp.png ~/Pictures/$timestamp.png
|
||||||
|
echo 'saved to ~/Pictures/'$timestamp'.png'
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
19
sxiv/exec/image-info
Executable file
19
sxiv/exec/image-info
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Example for ~/.config/sxiv/exec/image-info
|
||||||
|
# Called by sxiv(1) whenever an image gets loaded,
|
||||||
|
# with the name of the image file as its first argument.
|
||||||
|
# The output is displayed in sxiv's status bar.
|
||||||
|
|
||||||
|
s=" | " # field separator
|
||||||
|
|
||||||
|
filename=$(basename "$1")
|
||||||
|
filesize=$(du -Hh "$1" | cut -f 1)
|
||||||
|
|
||||||
|
# The '[0]' stands for the first frame of a multi-frame file, e.g. gif.
|
||||||
|
geometry=$(identify -format '%wx%h' "$1[0]")
|
||||||
|
|
||||||
|
tags=$(exiv2 -q pr -pi "$1" | awk '$1~"Keywords" { printf("%s,", $4); }')
|
||||||
|
tags=${tags%,}
|
||||||
|
|
||||||
|
echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}"
|
33
sxiv/exec/key-handler
Executable file
33
sxiv/exec/key-handler
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
while read file
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
"w") setbg "$file" & ;;
|
||||||
|
"c")
|
||||||
|
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | rofi -dmenu -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
|
||||||
|
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
||||||
|
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
|
||||||
|
;;
|
||||||
|
"m")
|
||||||
|
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
|
||||||
|
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
|
||||||
|
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
|
||||||
|
;;
|
||||||
|
"r")
|
||||||
|
convert -rotate 90 "$file" "$file" ;;
|
||||||
|
"R")
|
||||||
|
convert -rotate -90 "$file" "$file" ;;
|
||||||
|
"f")
|
||||||
|
convert -flop "$file" "$file" ;;
|
||||||
|
"y")
|
||||||
|
echo -n "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||||
|
notify-send "$file copied to clipboard" & ;;
|
||||||
|
"Y")
|
||||||
|
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
|
||||||
|
notify-send "$(readlink -f "$file") copied to clipboard" & ;;
|
||||||
|
"d")
|
||||||
|
[ "$(printf "No\\nYes" | rofi -dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
|
||||||
|
"g") ifinstalled gimp && setsid -f gimp "$file" ;;
|
||||||
|
"i") notify-send "File information" "$(mediainfo "$file")" ;;
|
||||||
|
esac
|
||||||
|
done
|
Loading…
Reference in a new issue