Commit graph

792 commits

Author SHA1 Message Date
speedie 1a4f2c08ef Replace sed -i with sed for *BSD compatibility 2023-06-24 23:30:03 +02:00
speedie c7632f342e Fix generate.sh
Fix generate.sh, it should now generate properly. Also remove the actual
protocols, the user should generate those, not me.
2023-06-24 21:12:18 +02:00
speedie b4dd4fc383 Add documentation for spmenu_test
Add documentation for spmenu_test, also improve Markdown format
consistency.
2023-06-24 19:55:11 +02:00
speedie 2cee004182 Remove more useless Xinerama code 2023-06-24 17:34:03 +02:00
speedie 336bdd5830 Simplify display width/height code
With this commit, display width/height is only grabbed once. This means
we don't need to deal with all that X11 and Xinerama code when we're
simply resizing the window.
2023-06-24 17:13:17 +02:00
speedie bd49d876cd Move to the first item when setting lines
This fixes an issue where you can resize beyond the number of items
2023-06-24 17:01:43 +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 c0cd874348 Use /usr/bin/env bash instead of /bin/bash in the spmenu_make script for
consistency with spmenu_run and spmenu_test
2023-06-24 04:22:15 +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 02c6c4ac5c Remove unnecessary else continue; from X11 and Wayland keybind
handling
2023-06-23 20:28:22 +02:00
Jacob 98240c4d13 Merge pull request 'Codebase improvements' (#8) from imp into master
Reviewed-on: #8
2023-06-23 15:30:22 +00:00
speedie 8e0de8f556 Simplify some variables 2023-06-23 17:27:57 +02:00
speedie 152b14330f Xlib must now be included in spmenu.c
Also, we should be checking the length of wl_cbuttons, not cbuttons on
Wayland.
2023-06-23 04:04:02 +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 f0b22fd14d Add some more functions 2023-06-23 01:08:36 +02:00
speedie e9f88bbb50 Auto refresh enabled by default 2023-06-23 00:56:07 +02:00
speedie f6d4ea8cb9 Add some functions that can be defined in the configuration file 2023-06-23 00:55:03 +02:00
speedie aa33711795 Replace read -r code with mapfile
This may break compatibility with Bash 3, but that shouldn't really
matter much.
2023-06-23 00:49:56 +02:00
speedie 2c256c6d5f Remove entry validation, not very useful and breaks several features
Still need some speed improvements
2023-06-23 00:38:44 +02:00
speedie e22c5f7e75 Simplify caching of desktop entries
This commit simplifies the caching of desktop entries. Previously
spmenu_run would cache each desktop entry into a cache directory, of
course using it's own format and then parses that yet again to add it to
the arrays. This is terribly inefficient and wastes the user's valuable
space.

With this commit, the entries are parsed and directly written to the six
cache files, which spmenu can then grab from in plain text, without any
parsing. Significantly speeds up the caching and saves disk space.
2023-06-22 23:27:56 +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 7389d28be5 Version bump: 2.2 2023-06-21 16:20:35 +02:00
speedie 37dfc0548c cleanup macOS check 2023-06-21 16:18:17 +02:00
speedie 04cbde4dfb Update documentation to reflect spmenu_make 2023-06-20 10:57:56 +02:00
speedie dfc4ad0fa4 cleanup a bit, fix margin-vertical and fullscreen 2023-06-20 09:40:40 +02:00
speedie a22526b275 add layout picker screenshot 2023-06-20 09:08:09 +02:00
speedie 52a76ab538 move some stuff 2023-06-20 08:35:10 +02:00
speedie 180aa71fef fix clicks when one line is removed 2023-06-20 01:27:46 +02:00
speedie ddb38c8cec fix clicks if !lines, oops 2023-06-19 23:26:23 +02:00
speedie f99cc1d62a significant rewrites to mouse clicks 2023-06-19 23:16:03 +02:00
speedie 62b15fab28 Fix some bugs with clicks and images 2023-06-19 21:28:45 +02:00
speedie ebd625ba1e Add check for GNOME Wayland 2023-06-19 17:18:27 +02:00
speedie 453b0028aa Switch to Ctrl modifier from Alt modifier for navhistory keys 2023-06-19 16:26:03 +02:00
speedie 0409dbff12 Change Ctrl+Shift+h keybind to simply Shift+h in normal mode 2023-06-19 16:16:16 +02:00
speedie 3c59249fbd setlines and setcolumns now work in insert mode as well 2023-06-19 02:36:28 +02:00
speedie ef4400d844 Fix loading from file dynamically on Wayland 2023-06-19 02:23:46 +02:00
speedie 92fb7fff5c fix menumarginh when lines 2023-06-19 02:13:38 +02:00
speedie c1058dfb00 add option to enable/disable setting lines/columns using keybinds 2023-06-19 01:46:05 +02:00
speedie 6083df6736 update documentation 2023-06-19 01:08:15 +02:00
speedie b0c39b6dc3 Remove single line clicks as they're not very useful, and fix clicks
when item powerlines are enabled
2023-06-18 22:56:21 +02:00
Jacob 618dc15530 Merge pull request 'Add powerline for items' (#7) from powerline-items into master
Reviewed-on: #7
2023-06-18 19:22:48 +00:00
speedie 9ba2e0f52f Add powerline for !lines as well 2023-06-18 21:15:32 +02:00
speedie aa62ca8cdd Add powerline for items
Currently does not work with !lines, and as such it has been disabled
for the time being.
2023-06-18 18:05:42 +02:00
speedie 3b10355e5a Combine the many scripts into one. The protocols/generate.sh is
necessary because meson doesn't seem to like passing arguments to
scripts it has to execute.
2023-06-17 17:05:42 +02:00
speedie a0b0ca28f9 cache size needs to be set on wayland too 2023-06-17 15:38:22 +02:00
speedie 59d9f63238 Remove example scripts, move them to spmenu-examples repository 2023-06-17 15:26:51 +02:00
speedie b7a4ef5a99 Support the Terminal=true desktop entry specification 2023-06-16 04:39:09 +02:00