I am not sure if is my question clear enough so here is some explanation what I am trying to achieve.
I need to create custom shortcut to run hamster (time tracker) to track new activity. The command is:
$ hamster start <activity name>
so I want to press the hotkey ( Super+H ) and then want to be prompted for activity name. Then the text I will enter will be used in the command
$ hamster start <my entered text>
Thanks a lot.
Would something like
work for you?
If you are trying to get a script that will prompt you for the activity name you can use the following code
when you run the script, you will be prompted with the message "Please enter the activity name". once you type your activity name and press enter, it will run
hamster start activity
. you can place this script in/usr/local/bin
for easy access. Basically if you name it "myscript" and place it in that folder, you can run the script just by runningmyscript
. remember to make it an executable first.In case someone is using hamster and will find this feature handy this is my current working code:
It is placed in
/usr/local/bin/
folder. And in the same folder is file hamster-log with permissions 777. I am using Shortcut Super+H and to run this script and Super+Shift+H to stop the activity (commandhamster stop
). When I will have more time I will keep working on this and updating the code. There are few more features I would like to add.