summaryrefslogtreecommitdiff
path: root/tessen
AgeCommit message (Collapse)Author
2022-01-24userkey search uses regex to find field (#11)Jerzy Drozdz
* userkey search uses regex to find field * Changed userkey default value to "user" * First matched entry will be set as tsn_username * Update to man page * Fixed setting userkey * Fixed typo
2022-01-17release: bump version to 1.3.1v1.3.1Ayush Agarwal
2022-01-17fix: return empty value if backend is unrecognizedAyush Agarwal
2022-01-16release: revamp the README, bump version of tessenv1.3.0Ayush Agarwal
There's no point replicating the information inside the man page on the README.
2022-01-16refactor: change the order of dmenu backendAyush Agarwal
tessen will now prefer finding fuzzel over rofi and wofi
2022-01-16style: use consistent case, fix grammarAyush Agarwal
2022-01-16refactor: use only one printfAyush Agarwal
Instead of using multiple printf commands, we can just use one. No, I don't like using heredocs for some reason.
2022-01-16refactor: change the find_backend functionAyush Agarwal
Recently, I realized that bash local variables aren't actually local and use dynamic scoping. Renaming `backend` to `dmbd` is just a precaution.
2022-01-16refactor: change the setup_backend functionAyush Agarwal
A few extraneous `{}` were removed from variable names, `=` was replaced with `==` because we're using bash and the former is more confusing, and other cosmetic changes.
2022-01-16refactor: simplify the default optsAyush Agarwal
Instead of creating multiple functions for passing one line outputs, it seems better to just use a case statment. Support for fuzzel has also been added.
2022-01-16refactor: remove redundant colonsAyush Agarwal
In the absence of a colon, the default value (which is empty) will be used only if TESSEN_BACKEND is unset. Adding a colon ensures that the default value is also used if TESSEN_BACKEND is empty. Since the default value is empty, the colon is redundant.
2022-01-10allow using any dmenu-like backendJerzy Drozdz
This commit makes `tessen` agnostic to the dmenu backend used and closes issue #4. Thank you @t0fik for this PR.
2021-11-29fix(release): bump tessen to version 1.2.3v1.2.3Ayush Agarwal
2021-11-29fix: don't check for the presence of oathtoolAyush Agarwal
It's unnecessary to check for the presence of oathtool considering it's listed as a dependency of pass-otp. The explicit check was also causing problems for people on NixOS as mentioned in #6.
2021-11-15fix: exit if file is empty or decryption failsv1.2.2Ayush Agarwal
2021-11-14fix: use tabs instead of spaces in Makefilev1.2.1Ayush Agarwal
2021-11-14docs: improve README, bump release to 1.2.0v1.2.0Ayush Agarwal
2021-11-14refactor: improve help menu, consistent printfAyush Agarwal
2021-11-14refactor: custom autotype, better copyingAyush Agarwal
The auto type operation has been split into two functions - one of them deals with the default auto type operation involving username and password and the other deals with custom autotype operation specified by the user. The copy menu now checks for the presence of notify-send rather than just using it.
2021-11-14feat: add functions to deal with otp and urlAyush Agarwal
continue to implement features explained in 9511148
2021-11-14refactor: improve validation checksAyush Agarwal
The validation functions have been changed to be more modular and more resistant to invalid input. Instead of using printf to redirect error messages to stderr and using `exit 1`, use the function `_die` which has been changed as well. A function called `is_installed` was added as well to check if the needed binaries are present on the system.
2021-11-14refactor: make the key selection modularAyush Agarwal
The `key_menu()` function will now handle different types of keys using case and specific functions instead of complex if-else monstrosity. feat: continue to implement features explained in 9511148
2021-11-14refactor: change the 2nd and 3rd menuAyush Agarwal
Use the environment variables to show options for autotype and username. The URL should also be accounted for and the 3rd menu should show 'open' instead of 'autotype'. feat: continue to implement features explained in 9511148
2021-11-14feat: parse otp, username, allow more char in keysAyush Agarwal
tessen can now parse 'otpauth://' URI format thanks to the regex borrowed from pass-otp The username will now be taken from TESSEN_USERKEY if it exists, otherwise, fallback to using the basename of the selected file. The keys can now have '#', '+', and '@' characters as well.
2021-11-14fix: don't proceed if selected file is emptyAyush Agarwal
2021-11-14feat: add global variables for more featuresAyush Agarwal
The TESSEN_USERKEY environment variable can be set to point tessen to a custom key which should be considered as the username. The TESSEN_URLKEY environment variable can be set to point tessen to a custom key which should be considered as the URL of website. The TESSEN_AUTOKEY environment variable can be set to point tessen to a custom key which should be considered for custom auto type operations instead of the default operation of auto typing the username and the password. The TESSEN_DELAY environment variable can be set to make tessen introduce delay when auto typing to avoid errors. The default is 200 milliseconds. 'bemenu' is no longer the default backend.
2021-11-08refactor: don't use upper case global variablesAyush Agarwal
Global variables shouldn't be written in upper case unless the variable is meant to be exported or is an environment variable. The style of defining local variables was also changed.
2021-11-08refactor: disable shell "strict" modeAyush Agarwal
It looks like there's no reliable way to enable a shell "strict" mode globally in a script without dealing with certain caveats and edge cases or making code cluttered with `${1-}` instead of simply `$1`. I'm not gonna use shell "strict" any longer and instead try to write saner code and rely on shellcheck.
2021-11-06release: bump the version to 1.1.2v1.1.2Ayush Agarwal
2021-11-06fix: don't parse the 'username' and 'password' keyAyush Agarwal
tessen wasn't excluding 'username' and 'password' as a key from the menu which isn't expected behaviour because the value of username is determined from the basename of the selected file and password is selected from the first line of the file
2021-09-22fix the semver, should pay more attentionv1.1.1Ayush Agarwal
2021-09-21no need to use unset when there's localv1.1.0Ayush Agarwal
2021-09-21add support for wofi as a backendAyush Agarwal
updated the fish completion and the README as well
2021-09-21fix the semver stupidity and prepare v1.0 releasev1.0.0Ayush Agarwal
I was being stupid with the sem versions while making this script. I thought about editing the individual commits and rebasing and force pushing the repo but decided against it. Hopefully, this isn't too embarassing.
2021-09-21replace name with parameter expanded variableAyush Agarwal
2021-09-20update the help menuAyush Agarwal
2021-09-20don't use notifications for errorsAyush Agarwal
2021-09-20don't panic if libnotify isn't installedAyush Agarwal
2021-09-20make 1st autotype message clearerAyush Agarwal
as mentioned before in 46cedab, the 1st autotype message should be clearer to indicate that autotyping will be performed no matter what the choice of `-a` is
2021-09-20disable debug mode to prevent leaking datav0.6.2Ayush Agarwal
2021-09-20add an option to perform autotype AND copyv0.6.1Ayush Agarwal
To mitigate possible inaccuracies while autotyping, an option to let the user perform autotyping AND copying of a key-value pair at the same time has been added. Of course, this doesn't work if the user selects `autotype` in the 2nd stage menu. I guess I'll change the text of that key for clarity.
2021-09-20replace -t and -c with a single option, -av0.6.0Ayush Agarwal
reduce possible confusion and code complexity by using an optional argument with a value that specifies what the user wants to do renamed AT_TYPE to ACTION for clarity as well
2021-09-20bump up the version of tessenAyush Agarwal
2021-09-20remove obsolete global varsAyush Agarwal
2021-09-20thanks to cbb35e4, simplify key selection in mainAyush Agarwal
2021-09-20fix the backend validation logicv0.5.1Ayush Agarwal
This might be a hack but I had to figure out how to work with the following - if no backend choice is given, assume bemenu - if the user sets the TESSEN_BACKEND env var, use that - if the user provides the `-b` flag at runtime, use that above all else I've already assumed bemenu by default in the list of global variables. However, figuring out how to prefer the command line flag over the env var was a bit tricky I guess. I changed the `validate_backend` function to always assign both backend global variables as readonly and this function is always called if the user provides a `-b` flag at runtime. If he doesn't though, I can safely use the unset condition on the BACKEND_OPTS variable, instead of BACKEND, since it has not been assigned anyways. If it can be unset, it means it hasn't been made readonly, which means `-b` wasn't provided. We can call the `validate_backend` function to do what we wanted.
2021-09-20revamp of the key selection and action menusv0.5.0Ayush Agarwal
the key presentation menu, `get_key`, was changed to allow presentation of 2 stages of menus - one, where the user chooses one of the key-value pairs present in the password store file chosen earlier and two - if the user hasn't given a preference for autotyping or copying, present both options as keys `key_menu_copy` and `key_menu_autotype` were merged into a single `key_menu` function which, in turn, calls a new `auto_type` function and `wld_copy` function. This makes more sense and the code seems to be more modular and extensible.
2021-09-20reorganize global variables, changes in commentsAyush Agarwal
2021-09-20make the help menu simplerAyush Agarwal
2021-09-20modified the argparse menu using argbashAyush Agarwal
`argbash` seems like a decent tool to generate argparse while loop for bash. Although `getopts` built-in is nice, it's restricted to short `-a` style options only. I think short options are fine but one can't deny that long options are easier to remember and perhaps more user-friendly.