Commit graph

68 commits

Author SHA1 Message Date
speedie 49eda6745b Fix powerline cutoff when scaling an image up a lot 2023-07-14 01:34:07 +02:00
speedie c6397915f4 Cache icons too, not just normal images 2023-07-10 20:38:25 +02:00
speedie fbfbc44dec Fix some issues with the image gaps, fix image gaps size, remove some
more keybinds
2023-07-05 00:39:40 +02:00
speedie 4ac7119c5b Add WIP icon support to spmenu 2023-07-03 18:48:38 +02:00
speedie 2cee004182 Remove more useless Xinerama code 2023-06-24 17:34:03 +02:00
speedie dfc4fe038c Remove fullscreen functionality
The fullscreen functionality is kind of cool, but adds a lot of code and
as commit history has shown, plenty of bugs and extra required testing.

I may reimplement this later in a less bad manner. Note that the
fullscreen behavior can be achieved by simply increasing image size to
the max. spmenu will let you do that.

Fixes issue #9
2023-06-24 04:53:44 +02:00
speedie 748db7eed1 simplify full screen 2023-06-24 04:43:05 +02:00
speedie 0a59088313 Fix keybind conflict, replace imageg, imagew and imageh in favor of
using the img struct
2023-06-24 04:20:51 +02:00
speedie aba3541d37 Disable fullscreen when no image 2023-06-24 03:00:00 +02:00
speedie 59983981c2 Rename libdrw functions to simply "draw" 2023-06-23 03:49:23 +02:00
speedie 6328edc5cd Use global structs 2023-06-23 03:38:21 +02:00
speedie ca624e1ca6 Default to the default value of $XDG_CACHE_DIR in case $XDG_CACHE_DIR is
not set.

Both the current behavior and this commit are valid according to the XDG
base directory standard, however realistically no one wants dotfiles in
their home directory, and that's what would happen if $XDG_CACHE_DIR
is unset.

Also fix key inconsistency between X and Wayland.
2023-06-22 00:17:23 +02:00
speedie dfc4ad0fa4 cleanup a bit, fix margin-vertical and fullscreen 2023-06-20 09:40:40 +02:00
speedie b261d62cc9 Allow "xdg" to be entered to force XDG cache directory even if
XDG_CACHE_DIR is not set
2023-06-12 23:44:59 +02:00
speedie 1c4c68dcc6 Add image resize option 2023-06-12 00:26:35 +02:00
speedie 4d505459b1 significantly clean up the image size functions 2023-06-12 00:15:29 +02:00
speedie 0e5b5b240b forgot we need to remove the top line too 2023-06-11 22:48:22 +02:00
speedie f6df89845e fix fullscreen height issue 2023-06-11 22:11:32 +02:00
speedie a90c94f69d apply last commit to wayland resizetoimageheight() function as well 2023-06-11 19:34:10 +02:00
speedie c0d8adec85 significant image drawing codebase cleanup 2023-06-11 19:32:02 +02:00
speedie d7122af473 cleanup menu height setting 2023-06-11 16:46:36 +02:00
speedie b68666dc6b No longer use deprecated MD5() function to get hash 2023-06-09 21:20:02 +02:00
speedie 148c219ec5 Fix alpha mask 2023-06-08 20:30:42 +02:00
speedie 5745b52bc9 Add work in progress support for images on Wayland
This commit also adds MASSIVE speed improvements to image drawing, due
to code cleanup. There are still a *few* issues to resolve, one is
X11 related, and one is caused by alpha/blending.
2023-06-08 19:40:30 +02:00
speedie a9ee831159 add X11 toggle, so now Xlib, Xinerama and Xrender aren't dependencies if
you only use Wayland
2023-06-05 17:16:26 +02:00
speedie 692e3abc68 Add experimental native Wayland support 2023-06-02 18:37:51 +02:00
speedie 8c9d33d01f add LICENSE notice to all code 2023-05-14 00:21:16 +02:00
speedie 15141c230d add the ability to full screen an image + code cleanup
images are drawn quite slowly, something needs to be done about that
soon
2023-05-14 00:10:24 +02:00
speedie 3da21bc052 allow overriding image cache directory 2023-05-12 23:23:15 +02:00
speedie 5efe236380 indent lots of code using vim gg=G 2023-05-08 23:00:45 +02:00
speedie 05c436022c apply last commit for even more functions 2023-05-06 14:36:50 +02:00
speedie 7f046658e5 fix some bad code causing imlib errors 2023-04-28 18:50:33 +02:00
speedie cb4b854592 warning/error cleanup 2023-04-22 21:39:22 +02:00
speedie 7cbc4c7ef1 fix padding issues 2023-04-22 00:50:26 +02:00
speedie 52f88f6a73 remove the item hovering, it's just not necessary and causes a lot of
slowness

if you find a way to speed this up significantly, please let me know
2023-04-21 17:59:10 +02:00
speedie c7b3e99892 imlib warning fix 2023-04-21 11:52:01 +02:00
speedie cee83f6677 last commit.. again 2023-04-21 09:51:51 +02:00
speedie eca13f2896 fix lots of issues/bad code 2023-04-21 09:49:38 +02:00
speedie c71b186897 cleanup last commit slightly 2023-04-17 20:03:02 +02:00
speedie 32aceac8a1 fix resizing for images as well 2023-04-17 19:00:59 +02:00
speedie 273fb103c9 add the ability to have vertical/horizontal outer padding (margin) 2023-04-16 23:57:02 +02:00
speedie 44c8667506 it appears i forgot to remove 2 * borderwidth + 2 * sp from image
resizing function
2023-04-07 20:09:13 +02:00
speedie 074723ae51 a minor fix to resizing images 2023-04-06 02:39:00 +02:00
speedie dcd006ae2b merge a few things 2023-04-05 20:44:09 +02:00
speedie af4c682814 some cleanup to the general codebase 2023-03-13 21:21:40 +01:00
speedie 6450a36f13 fix: last character not highlighted 2023-03-08 19:20:18 +01:00
speedie 03a245720e turns out one of those calls were necessary to prevent image from being
scaled down too far, this commit fixes the last commit while preserving
the speed improvement by preventing a call to drawimage() through an X11 event after image size has been changed.
2023-03-08 19:10:48 +01:00
speedie 08b54267ae remove another unnecessary drawimage() call 2023-03-08 19:00:31 +01:00
speedie 91cc7782f7 greatly speed up image redrawing/resizing by removing unnecessary calls
to drawimage() and cleanupimage()

we don't need to call cleanupimage() as it is already called in
cleanup()

we don't need to call drawimage() because X11 events should handle that
for us anyway
2023-03-08 18:58:52 +01:00
speedie d3ec1b609b don't allow the image to be scaled up beyond menu width 2023-03-08 18:20:15 +01:00