summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2021-09-20copyright details added to tessenAyush Agarwal
2021-09-17change the license to GPLv2+v0.4.2Ayush Agarwal
2021-09-17fix the parameter expansion to parse valuesv0.4.1Ayush Agarwal
using '##*:' ended up doing a greedy match which also removes text after the first ':' if another ':' is found in the value
2021-09-08some code refactoring doneAyush Agarwal
turns out, we don't need `choice_data_copy` and `choice_data_autotype` but only a single `choice_data` function thanks to array slicing and a if-then conditional
2021-09-08add validation check for PASSFILE and CHOICEAyush Agarwal
rofi and bemenu don't prevent garbage input from getting allocated to the PASSFILE and CHOICE variables. We need to check for the validity of the user input and fail if needed.
2021-09-08fix the order of validation checksAyush Agarwal
2021-09-08removed the code for fzf backendv0.4.0Ayush Agarwal
This allowed to make the code much simpler and avoid repititive validation checks. Using fzf as a backend is broken because I've been unable to figure out how to make fzf work if we do `$TERMINAL -e tessen -b fzf`.
2021-09-08made the help menu betterAyush Agarwal
2021-09-08minor modifications to the READMEAyush Agarwal
2021-09-08add trap and reorganize global varsAyush Agarwal
2021-09-08created func for backend and clip_time validationAyush Agarwal
Yeah, don't litter your script with code not inside functions. The help menu was also moved near the end of the script because it isn't part of the script's core logic functions which are meant to be at the top.
2021-09-08reorganize the copy and autotype functionsAyush Agarwal
The copy and autotype functions were renamed to make better sense and adapated to work with the `clean` and `die` functions. This will make these functions work well with an EXIT trap.
2021-09-08create `clean` and `die` functionAyush Agarwal
The `clean` function will copy password store data for a specific amount of time and then clear it. The `die` function is meant to clear the clipboard and other sensitive data immediately.
2021-09-08moved password-store directory validation in mainAyush Agarwal
2021-09-08moved the getopts loop to the main functionAyush Agarwal
There's no need to have the getopts loop outside the main function. The main function can be called as `main "$@"` to accept positional parameters as input which then goes on to `getopts` which, by default, uses `"$@"` unless a positional parameters is explicitly given.
2021-09-07added a READMEAyush Agarwal
2021-09-07added support for autotyping password-store datav0.3.0Ayush Agarwal
I'm using `wtype` instead of `ydotool` simply because the former doesn't need root access while the latter does. However, `wtype` doesn't seem to be able to autotype correctly in a few cases in Firefox. In Chromium, autotyping seems to be broken with `wtype`. I don't think one should rely on autotyping. Although it is extremely convenient, it is error prone, even in X11 when using xdotool. One of the reasons is because some web pages don't follow the typical username and password prompt and have a link between the two which basically breaks autotyping.
2021-09-07copying code using bemenu, rofi, and fzf now worksv0.2.0Ayush Agarwal
Although bemenu and rofi work fine, fzf doesn't if tessen isn't invoked from a terminal. I'm not sure why but using `exec $TERMINAL -e tessen -b fzf` inside a sway config file won't work as expected.
2021-09-07added MIT licenseAyush Agarwal
2021-09-07the first commit for tessenv0.1.0Ayush Agarwal
For now, the script isn't ready for wide usage. I still need to add code for autotyping and for all the backend choices.
2021-09-07initial empty commitAyush Agarwal