Commit graph

30 commits

Author SHA1 Message Date
31dea58782
! Rename XDG_CACHE_LOCATION to XDG_HISTORY_LOCATION
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Gives closer adherence to actual content for the environment variable.
2022-11-03 15:23:39 +01:00
525a379564
📖 Update README for new state directory
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-10-12 17:04:53 +02:00
250fb36146
! Use new XDG Base specification for state
Switched the history from using the XDG_CACHE_HOME directory by default
to use XDG_STATE_HOME by default.

This makes sense since cache can (and should be prepared to) be wiped at
any moment and the program functionality should not be hindered by this.

Since we need to retain history through such wipes the newly introduced
state directory is the perfect match for keeping the history file in.

This does constitute a small breaking change for existing histories
which need to be moved to the new directory if they made use of the old
cache directory.

Fixes #5.
2022-10-12 16:59:53 +02:00
16039fe676
📖 Add missing case insensitivity fix to CHANGELOG
Added reference to the fix for no case insensitivity when searching
through rofi added in ec90201 which was so far still missing in
changelog.
2022-10-12 16:50:40 +02:00
Yann Büchau
d03068dba7
Add -n option to prevent newline after emoji (#12)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Adds another commandline option `-n` to the application which prevents
newlines from being added at the end of each output.
Disabled by default.

Co-authored-by: Marty Oehme <marty.oehme@gmail.com>
2022-09-27 21:01:44 +02:00
Yann Büchau
ec9020150c
🐛 Let rofi match case insensitively as well (#14)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-09-09 15:50:17 +02:00
1ad38107d4
📖 Update usage information displayed in README
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-08-06 13:12:38 +02:00
c925810889
Add woodpecker ci testing 2022-08-06 13:12:34 +02:00
05f0e71b9f
📖 Update CHANGELOG and add explanation to usage help
Added quick note that commands can be used in combination and separated
commands from other options to better highlight them.
2022-08-06 11:48:58 +02:00
a776c63748
🦊 Refactor command functions and variable names
Removed redundant 'redirection' functions which did nothing to change
code and only extended the pipe with an additional `cat` call.

Renamed bm_default_cmd to bm_cmds to reflect its nature as an array.
Since there is not just one command contained in the variable anymore,
it makes much more sense to now call it bm_cmds, note the plural.
2022-08-06 11:48:48 +02:00
7e8fc0c51a
Add ability to execute multiple command options
Can combine command options (-c, -t, -e) in any way to simultaneously
clip, type and/or echo the picked results.
Still defaults to clipping, as before.

If a custom default command is given with `BEMOJI_DEFAULT_CMD` env var,
then invoking bemoji without any command option will invoke this
command. Otherwise, the other commands are added to the default given
command.

Additionally, refactor echo command to mirror other commands
Both typing and clipping simply invoke the corresponding program
function while echo had an extra role so far. This adjusts the echo
command to also work the same way.
2022-08-06 11:46:06 +02:00
28aa2aa522
🧪 Add tests for clipping, echo and typing command
Added a simple test for each of the base command options: echo, type,
clip. It uses custom commands set through environment options so does
not yet test the actual default command logic (finding a typer,
clipper), that is still a TODO.

Also split tests into tests concerning commands of the program and tests
concerning the directory settings and options of the program, to avoid
ending up with a single test file spanning hundreds of lines.
2022-08-06 10:02:34 +02:00
7cec73e2db
📖 Bump version, add to changelog 2022-06-29 12:44:42 +02:00
2a17237a96
🧪 Add tests for XDG base directory adherence
Added simple tests for database and cache locations.

Moved test PATH setup to new file-level function which should slightly
speed up testing and makes more sense conceptually to set the bemoji
executable to be in the path once for all tests.
2022-06-29 12:44:42 +02:00
ce17ae58f1
📖 Add simple Changelog 2022-06-29 12:44:42 +02:00
31550448f0
🦊 Add display for directory config to -v option
Added a quick way to see if directories have been set up correctly. This
also eases testing for future ways of setting directories through
environment variables or options.
2022-06-29 12:44:42 +02:00
0b255413d0
🦊 Simplify grep string for POSIX compatibility 2022-06-29 12:44:41 +02:00
75395d2bbd
🐛 Fix custom command invocation quoting 2022-06-29 12:44:41 +02:00
b9708405fa
📖 Add testing instructions to readme 2022-06-29 12:44:41 +02:00
936f19bca6
🧪 Set up default emoji list for tests
Inject a tiny sample emoji list into each test so no download function
is engaged by default.
Add tests for version display.
2022-06-29 12:37:13 +02:00
ceea79eb3a
🧪 Add simple test framework
Now that the project is finding a little adoption it is really high time
to bring some tests into the code to ensure everything works as it
should.
This first version will only provide a simple test harness from which
tests can slowly be written for other parts of the program.
2022-06-29 12:35:52 +02:00
edd5ebd743
📖 Improve installation documentation
Switched sections for dependencies and installation around and created
better sub-headings.
Added section on installing packaged AUR version, thanks to @firegem for
packaging it!
Fixed some whitespace on line endings.

Closes #6.
2022-06-29 08:49:45 +02:00
f791bf093c
📖 Document version and help options in cli help 2022-06-29 08:20:22 +02:00
Arkadiusz Wieczorek
3c2a8b9894
 Fix parameter order for xdotool
* Change parameter's order for xdotool
* Fix order parameters

Thanks to @arkadiusz-wieczorek for spotting and fixing the bug.
Fixes #3
2022-01-07 12:10:39 +01:00
8a31a36280
Add version option
You can now ask the program for its version with `bemoji -v`.
2021-12-01 22:31:27 +01:00
afdfc53bfe
🦊 Remove useless cat 2021-12-01 22:16:46 +01:00
52bf358187
📃 Improve usage screen
Improved usage message to display all currently available default
download options.
2021-12-01 22:15:30 +01:00
08947772aa
🦊 Switch from sh to bash
Switched to bash to ensure compatibility with the arrays the code uses.
2021-12-01 22:12:31 +01:00
f30dcf8242
Fix up README 2021-12-01 15:57:12 +01:00
b1361617e7
initial commit 2021-12-01 15:51:48 +01:00