Merge branch 'master' of gitlab.com:chriscochrun/dotfiles
This commit is contained in:
		
						commit
						f7c99edabb
					
				
					 6 changed files with 123 additions and 4 deletions
				
			
		| 
						 | 
					@ -574,6 +574,8 @@
 | 
				
			||||||
(client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus)))
 | 
					(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 "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.screen.focus 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(awful.spawn "picom --experimental-backend")
 | 
					(awful.spawn "picom --experimental-backend")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -47,14 +47,16 @@
 | 
				
			||||||
                          :class [
 | 
					                          :class [
 | 
				
			||||||
                                  "sxiv"
 | 
					                                  "sxiv"
 | 
				
			||||||
                                  "Sxiv"
 | 
					                                  "Sxiv"
 | 
				
			||||||
 | 
					                                  "imv"
 | 
				
			||||||
 | 
					                                  "Imv"
 | 
				
			||||||
                                  ]
 | 
					                                  ]
 | 
				
			||||||
                          }
 | 
					                          }
 | 
				
			||||||
               :properties {
 | 
					               :properties {
 | 
				
			||||||
                            :floating true
 | 
					                            :floating true
 | 
				
			||||||
                            :raise true
 | 
					                            :raise true
 | 
				
			||||||
                            ;; :height (dpi 900)
 | 
					 | 
				
			||||||
                            ;; :width (dpi 1500)
 | 
					 | 
				
			||||||
                            :placement (+ awful.placement.no_offscreen awful.placement.centered)
 | 
					                            :placement (+ awful.placement.no_offscreen awful.placement.centered)
 | 
				
			||||||
 | 
					                            :height (dpi 600)
 | 
				
			||||||
 | 
					                            :width (dpi 900)
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
               }
 | 
					               }
 | 
				
			||||||
              ;; Emacs
 | 
					              ;; Emacs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										59
									
								
								imv/config
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								imv/config
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -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
 | 
				
			||||||
 | 
					<bracketleft> = prev
 | 
				
			||||||
 | 
					j = next
 | 
				
			||||||
 | 
					<bracketright> = next
 | 
				
			||||||
 | 
					gg = goto 1
 | 
				
			||||||
 | 
					<Shift+G> = goto -1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Panning
 | 
				
			||||||
 | 
					<Down> = pan 0 -50
 | 
				
			||||||
 | 
					<Up> = pan 0 50
 | 
				
			||||||
 | 
					<Left> = pan 50 0
 | 
				
			||||||
 | 
					<Right> = pan -50 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Zooming
 | 
				
			||||||
 | 
					<Up> = zoom 1
 | 
				
			||||||
 | 
					<Shift+plus> = zoom 1
 | 
				
			||||||
 | 
					i = zoom 1
 | 
				
			||||||
 | 
					<Down> = zoom -1
 | 
				
			||||||
 | 
					<minus> = zoom -1
 | 
				
			||||||
 | 
					o = zoom -1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Rotate Clockwise by 90 degrees
 | 
				
			||||||
 | 
					<Ctrl+r> = rotate by 90
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Other commands
 | 
				
			||||||
 | 
					x = close
 | 
				
			||||||
 | 
					f = fullscreen
 | 
				
			||||||
 | 
					d = overlay
 | 
				
			||||||
 | 
					p = exec echo $imv_current_file
 | 
				
			||||||
 | 
					c = center
 | 
				
			||||||
 | 
					s = scaling next
 | 
				
			||||||
 | 
					<Shift+S> = upscaling next
 | 
				
			||||||
 | 
					a = zoom actual
 | 
				
			||||||
 | 
					r = reset
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Gif playback
 | 
				
			||||||
 | 
					<period> = next_frame
 | 
				
			||||||
 | 
					<space> = toggle_playing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Slideshow control
 | 
				
			||||||
 | 
					t = slideshow +1
 | 
				
			||||||
 | 
					<Shift+T> = slideshow -1
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,8 @@ settings:
 | 
				
			||||||
  content.notifications.enabled:
 | 
					  content.notifications.enabled:
 | 
				
			||||||
    https://jelly.cochrun.xyz: true
 | 
					    https://jelly.cochrun.xyz: true
 | 
				
			||||||
    https://nc.cochrun.xyz: false
 | 
					    https://nc.cochrun.xyz: false
 | 
				
			||||||
 | 
					    https://staff.tfcconnection.org: true
 | 
				
			||||||
 | 
					    https://toolbox.iskysoft.com: false
 | 
				
			||||||
    https://www.facebook.com: false
 | 
					    https://www.facebook.com: false
 | 
				
			||||||
    https://www.g2a.com: false
 | 
					    https://www.g2a.com: false
 | 
				
			||||||
    https://www.reddit.com: false
 | 
					    https://www.reddit.com: false
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
[FileDialog]
 | 
					[FileDialog]
 | 
				
			||||||
="======"
 | 
					="======"
 | 
				
			||||||
history=file:///home/chris/Pictures/tfc, file:///home/chris/Pictures, file:///home/chris/Videos, file:///home/chris, file:///home/chris/Downloads
 | 
					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
 | 
					lastVisited=file:///home/chris/Pictures/Phone/Camera
 | 
				
			||||||
qtVersion=5.15.2
 | 
					qtVersion=5.15.2
 | 
				
			||||||
shortcuts=file:, file:///home/chris
 | 
					shortcuts=file:, file:///home/chris
 | 
				
			||||||
sidebarWidth=116
 | 
					sidebarWidth=116
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										54
									
								
								scripts/rifle-imv
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										54
									
								
								scripts/rifle-imv
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -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
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue