mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-25 04:02:11 +02:00
nix: Nixify feh
Although it would be nice to use a Wayland image viewer, currently all of them (that I am aware of) suffer from anti-aliasing issues not present in feh.
This commit is contained in:
parent
ac3769d21c
commit
0d0c00f1d9
@ -1,99 +0,0 @@
|
|||||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
|
||||||
# Copyright (C) 2017-2018 Donovan Glover
|
|
||||||
|
|
||||||
# Remove the default keybindings
|
|
||||||
toggle_actions
|
|
||||||
toggle_aliasing
|
|
||||||
toggle_caption
|
|
||||||
toggle_filenames
|
|
||||||
toggle_exif
|
|
||||||
save_filelist
|
|
||||||
toggle_fixed_geometry
|
|
||||||
toggle_pause
|
|
||||||
toggle_info
|
|
||||||
toggle_keep_vp
|
|
||||||
toggle_menu
|
|
||||||
next_img
|
|
||||||
toggle_pointer
|
|
||||||
prev_img
|
|
||||||
quit
|
|
||||||
reload_image
|
|
||||||
save_image
|
|
||||||
toggle_fullscreen
|
|
||||||
size_to_image
|
|
||||||
close
|
|
||||||
jump_random
|
|
||||||
prev_dir
|
|
||||||
next_dir
|
|
||||||
orient_3
|
|
||||||
orient_1
|
|
||||||
|
|
||||||
# Remove the default editing functionality
|
|
||||||
flip
|
|
||||||
mirror
|
|
||||||
action_0
|
|
||||||
action_1
|
|
||||||
action_2
|
|
||||||
action_3
|
|
||||||
action_4
|
|
||||||
action_5
|
|
||||||
action_6
|
|
||||||
action_7
|
|
||||||
action_8
|
|
||||||
action_9
|
|
||||||
jump_first
|
|
||||||
jump_last
|
|
||||||
jump_fwd
|
|
||||||
jump_back
|
|
||||||
reload_plus
|
|
||||||
reload_minus
|
|
||||||
remove
|
|
||||||
delete
|
|
||||||
scroll_left
|
|
||||||
scroll_right
|
|
||||||
scroll_up
|
|
||||||
scroll_down
|
|
||||||
scroll_left_page
|
|
||||||
scroll_right_page
|
|
||||||
scroll_up_page
|
|
||||||
scroll_down_page
|
|
||||||
render
|
|
||||||
zoom_in
|
|
||||||
zoom_out
|
|
||||||
zoom_default
|
|
||||||
zoom_fit
|
|
||||||
zoom_fill
|
|
||||||
|
|
||||||
# Remove the menu stuff
|
|
||||||
menu_close
|
|
||||||
menu_up
|
|
||||||
menu_down
|
|
||||||
menu_parent
|
|
||||||
menu_child
|
|
||||||
menu_select
|
|
||||||
|
|
||||||
# Add our custom keybindings
|
|
||||||
# Note that k goes right (next) and j goes left (prev)
|
|
||||||
toggle_fullscreen f
|
|
||||||
next_img k Right
|
|
||||||
prev_img j Left
|
|
||||||
toggle_filenames d
|
|
||||||
toggle_fixed_geometry g
|
|
||||||
toggle_pause h
|
|
||||||
quit q
|
|
||||||
size_to_image w
|
|
||||||
jump_random z
|
|
||||||
scroll_left b
|
|
||||||
scroll_right n
|
|
||||||
scroll_up u Up
|
|
||||||
scroll_down d Down
|
|
||||||
zoom_in h
|
|
||||||
zoom_out l
|
|
||||||
zoom_default o
|
|
||||||
zoom_fill p
|
|
||||||
toggle_pointer a
|
|
||||||
jump_first J
|
|
||||||
jump_last K
|
|
||||||
jump_fwd H
|
|
||||||
jump_back L
|
|
||||||
toggle_auto_zoom m
|
|
@ -1,43 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# End the script if an error occurs.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Change the working directory to a cache directory.
|
|
||||||
mkdir -p "$HOME/.cache/feh"
|
|
||||||
cd "$HOME/.cache/feh"
|
|
||||||
|
|
||||||
# If $1 is not defined, raise an error.
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo 'error: No color specified.'
|
|
||||||
echo 'usage: ./path/to/tile.sh <color> where color is hexadecimal'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If $1 contains something other than 0-9 and A-F, raise an error.
|
|
||||||
if [[ -n "${1//[0-9A-F]/}" ]]; then
|
|
||||||
echo 'error: Invalid color specified. Colors must use 0-9 and A-F only.'
|
|
||||||
echo ' Colors should not use a-f since file names are case sensitive.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If $1 is not exactly six characters long, raise an error.
|
|
||||||
if ! [ "${#1}" -eq 6 ]; then
|
|
||||||
echo 'error: Invalid color specified. Colors must be of length 6.'
|
|
||||||
echo ' This is for the convert function, and is used to help'
|
|
||||||
echo ' prevent duplicate colors.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the color doesn't exist yet, make it.
|
|
||||||
if ! test -e "$1.png"; then
|
|
||||||
echo 'status: Color file does not exist yet. Making it...'
|
|
||||||
convert -size 1x1 "xc:#$1" "$1.png"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Finally, set the specified color as the background.
|
|
||||||
echo 'status: Setting the desktop background as the specified color...'
|
|
||||||
feh --no-fehbg --bg-tile "$1.png"
|
|
||||||
|
|
||||||
# We're done here.
|
|
||||||
echo 'status: Successfully changed the background to the color specified!'
|
|
@ -1,17 +0,0 @@
|
|||||||
# feh
|
|
||||||
|
|
||||||
[feh][feh] is an image viewer with no GUI. It can also change the desktop background.
|
|
||||||
|
|
||||||
## Use Cases
|
|
||||||
|
|
||||||
feh can be used to:
|
|
||||||
|
|
||||||
- Quickly view and browse through images without loading a GUI
|
|
||||||
- Change your desktop background if not using a desktop environment
|
|
||||||
- Strategically place GUI-less images in your rice screenshots
|
|
||||||
|
|
||||||
You should not use feh if:
|
|
||||||
|
|
||||||
- You are using a desktop environment with an image viewer
|
|
||||||
|
|
||||||
[feh]: https://github.com/derf/feh
|
|
@ -127,11 +127,78 @@
|
|||||||
scroll-step = 120;
|
scroll-step = 120;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.mpd = {
|
programs.feh = {
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
programs.ncmpcpp = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
|
keybindings = {
|
||||||
|
toggle_actions = null;
|
||||||
|
toggle_aliasing = null;
|
||||||
|
toggle_caption = null;
|
||||||
|
toggle_filenames = "d";
|
||||||
|
toggle_exif = null;
|
||||||
|
save_filelist = null;
|
||||||
|
toggle_fixed_geometry = "g";
|
||||||
|
toggle_pause = "h";
|
||||||
|
toggle_info = null;
|
||||||
|
toggle_keep_vp = null;
|
||||||
|
toggle_menu = null;
|
||||||
|
next_img = [ "k" "Right" ];
|
||||||
|
toggle_pointer = "a";
|
||||||
|
prev_img = [ "j" "Left" ];
|
||||||
|
quit = "q";
|
||||||
|
reload_image = null;
|
||||||
|
save_image = null;
|
||||||
|
toggle_fullscreen = "f";
|
||||||
|
size_to_image = "w";
|
||||||
|
close = null;
|
||||||
|
jump_random = "z";
|
||||||
|
prev_dir = null;
|
||||||
|
next_dir = null;
|
||||||
|
orient_3 = null;
|
||||||
|
orient_1 = null;
|
||||||
|
flip = null;
|
||||||
|
mirror = null;
|
||||||
|
action_0 = null;
|
||||||
|
action_1 = null;
|
||||||
|
action_2 = null;
|
||||||
|
action_3 = null;
|
||||||
|
action_4 = null;
|
||||||
|
action_5 = null;
|
||||||
|
action_6 = null;
|
||||||
|
action_7 = null;
|
||||||
|
action_8 = null;
|
||||||
|
action_9 = null;
|
||||||
|
jump_first = "J";
|
||||||
|
jump_last = "K";
|
||||||
|
jump_fwd = "H";
|
||||||
|
jump_back = "L";
|
||||||
|
reload_plus = null;
|
||||||
|
reload_minus = null;
|
||||||
|
remove = null;
|
||||||
|
delete = null;
|
||||||
|
scroll_left = "b";
|
||||||
|
scroll_right = "n";
|
||||||
|
scroll_up = [ "u" "Up" ];
|
||||||
|
scroll_down = [ "d" "Down" ];
|
||||||
|
scroll_left_page = null;
|
||||||
|
scroll_right_page = null;
|
||||||
|
scroll_up_page = null;
|
||||||
|
scroll_down_page = null;
|
||||||
|
render = null;
|
||||||
|
zoom_in = "h";
|
||||||
|
zoom_out = "l";
|
||||||
|
zoom_default = "o";
|
||||||
|
zoom_fit = null;
|
||||||
|
zoom_fill = "p";
|
||||||
|
menu_close = null;
|
||||||
|
menu_up = null;
|
||||||
|
menu_down = null;
|
||||||
|
menu_parent = null;
|
||||||
|
menu_child = null;
|
||||||
|
menu_select = null;
|
||||||
|
toggle_auto_zoom = "m";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
services.mpd = { enable = true; };
|
||||||
|
programs.ncmpcpp = { enable = true; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user