diff --git a/awesome/init.fnl b/awesome/init.fnl index fb9393e..2595acf 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -574,6 +574,8 @@ (client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus))) (client.connect_signal "unfocus" (fn [c] (set c.border_color beautiful.border_normal))) +(client.connect_signal "request::manage" (fn [c] (if c.floating (set c.placement awful.placement.centered)))) + (awful.screen.focus 1) (awful.spawn "picom --experimental-backend") diff --git a/awesome/rules.fnl b/awesome/rules.fnl index 8accb6d..da82d90 100644 --- a/awesome/rules.fnl +++ b/awesome/rules.fnl @@ -47,14 +47,16 @@ :class [ "sxiv" "Sxiv" + "imv" + "Imv" ] } :properties { :floating true :raise true - ;; :height (dpi 900) - ;; :width (dpi 1500) :placement (+ awful.placement.no_offscreen awful.placement.centered) + :height (dpi 600) + :width (dpi 900) } } ;; Emacs diff --git a/imv/config b/imv/config new file mode 100644 index 0000000..145d2ac --- /dev/null +++ b/imv/config @@ -0,0 +1,59 @@ +[options] + +# Suppress built-in key bindings, and specify them explicitly in this +# config file. +suppress_default_binds = true + +[aliases] +# Define aliases here. Any arguments passed to an alias are appended to the +# command. +# alias = command to run + +[binds] +# Define some key bindings +q = quit +y = exec echo working! + +# Image navigation +k = prev + = prev +j = next + = next +gg = goto 1 + = goto -1 + +# Panning + = pan 0 -50 + = pan 0 50 + = pan 50 0 + = pan -50 0 + +# Zooming + = zoom 1 + = zoom 1 +i = zoom 1 + = zoom -1 + = zoom -1 +o = zoom -1 + +# Rotate Clockwise by 90 degrees + = rotate by 90 + +# Other commands +x = close +f = fullscreen +d = overlay +p = exec echo $imv_current_file +c = center +s = scaling next + = upscaling next +a = zoom actual +r = reset + +# Gif playback + = next_frame + = toggle_playing + +# Slideshow control +t = slideshow +1 + = slideshow -1 \ No newline at end of file diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index f067855..a2c6146 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -13,6 +13,8 @@ settings: content.notifications.enabled: https://jelly.cochrun.xyz: true https://nc.cochrun.xyz: false + https://staff.tfcconnection.org: true + https://toolbox.iskysoft.com: false https://www.facebook.com: false https://www.g2a.com: false https://www.reddit.com: false diff --git a/qutebrowser/qsettings/QtProject.conf b/qutebrowser/qsettings/QtProject.conf index db79330..5a77020 100644 --- a/qutebrowser/qsettings/QtProject.conf +++ b/qutebrowser/qsettings/QtProject.conf @@ -1,7 +1,7 @@ [FileDialog] ="======" -history=file:///home/chris/Pictures/tfc, file:///home/chris/Pictures, file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads -lastVisited=file:///home/chris +history=file:///home/chris/Pictures, file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads, file:///home/chris/tfc, file:///home/chris/Pictures/Phone/Camera +lastVisited=file:///home/chris/Pictures/Phone/Camera qtVersion=5.15.2 shortcuts=file:, file:///home/chris sidebarWidth=116 diff --git a/scripts/rifle-imv b/scripts/rifle-imv new file mode 100755 index 0000000..cf2b95b --- /dev/null +++ b/scripts/rifle-imv @@ -0,0 +1,54 @@ +#!/bin/sh +# Compatible with ranger 1.6.0 through 1.7.* +# +# This script searches image files in a directory, opens them all with sxiv and +# sets the first argument to the first image displayed by sxiv. +# +# This is supposed to be used in rifle.conf as a workaround for the fact that +# sxiv takes no file name arguments for the first image, just the number. Copy +# this file somewhere into your $PATH and add this at the top of rifle.conf: +# +# mime ^image, has sxiv, X, flag f = path/to/this/script -- "$@" +# +# Implementation notes: this script is quite slow because of POSIX limitations +# and portability concerns. First calling the shell function 'abspath' is +# quicker than calling 'realpath' because it would fork a whole process, which +# is slow. Second, we need to append a file list to sxiv, which can only be done +# properly in two ways: arrays (which are not POSIX) or \0 sperated +# strings. Unfortunately, assigning \0 to a variable is not POSIX either (will +# not work in dash and others), so we cannot store the result of listfiles to a +# variable. + +# if [ $(hostname) = 'syl' ]; then +# size=2300x1500 +# else +# size=1500x900 +# fi + +if [ $# -eq 0 ]; then + echo "Usage: ${0##*/} PICTURES" + exit +fi + +[ "$1" = '--' ] && shift + +abspath () { + case "$1" in + /*) printf "%s\n" "$1";; + *) printf "%s\n" "$PWD/$1";; + esac +} + +listfiles () { + find -L "$(dirname "$target")" -maxdepth 1 -type f -iregex \ + '.*\(jpe?g\|bmp\|png\|gif\)$' -print0 | sort -z +} + +target="$(abspath "$1")" +count="$(listfiles | grep -m 1 -ZznF "$target" | cut -d: -f1)" + +if [ -n "$count" ]; then + listfiles | xargs -0 imv -n "$count" -- +else + imv -- "$@" # fallback +fi