Package: worky
WorkyManage your workspaces and increase your productivity.What is Worky?Worky is a tool that helps to define and load project workspaces. It can be used to load a project workspace with a single command and quickly start your work.
Worky saves you from wasting time doing repetitive tasks before actually starting to work.
This project can be used for every type of project or workspace, the only limitation is due to the functionality of the programs that you can run from CLI.Future improvementsPlease note that this is a work-in-progress tool. If you have any ideas or suggestions, please open an issue or a pull request.
Any helps is appreciated. Here is a list of future improvements:Add the window manager support to open programs in a specific workspace/monitor.InstallationThis project usesPoetryto manage dependencies and packaging and it is available onPyPI.
To install it, simply run:pipinstallworkyFor Arch Linux Repository usersIf you are on an arch-based distro and can access to theArch Linux Repository (AUR)you can installworkyusing an AUR helper likeyay:yay-SworkyConfigurationIf you prefer a practical way to understand how to worky configuration works, you can take a look at theexamples directory.Worky configuration fileThere are multiple ways to configure worky:Worky automatically looks for a.worky.tomlfile in the current directory where is called.You can create a~/.config/worky/{{project_name}}.tomlfile and worky will automatically look for it when you runworky project_name.
For example, if you have a project namedmy_projectyou can create a~/.config/worky/my_project/config.tomlfile and useworky my_projectto load the project workspace.You can create a subdirectory named as your project (project_name) under the~/.config/worky/. Here you can put yourconfig.tomlfile and worky will look for it when you runworky project_name.
For example, if you have a project namedmy_projectyou can create a~/.config/worky/my_project/config.tomlfile and useworky my_projectto load the project workspace.You can specify a configuration file using the-cflag followed by the path of the config file (seeworky --helpfor more details).VariablesVariables can be defined in the[variables]section of the configuration file. The variable's value is the command to be executed.
The variables can be used in all the config file except for the steps name.
The value of the variables used in the step name defines the command that will be executed. See thesteps sectionfor more details.StepsThe steps are the commands that will be executed when you load the workspace. The command is defined by the step name using a variable.
For example, if you have a variable namedbackendwith the valueideayou can define a step namedbackendand worky will run the idea IDE.ArgsSteps can have anargsproperty that is a list of arguments to be passed to the command when it is executed.
An example of an argument can be the path of the project to open but this strictly depends on the program that you want to load.ConditionSteps can have aconditionproperty that is the name of a flag that you can pass when you run worky that defines if the step should be executed or not.
For example, if you want to run adocker-composecommand only if you pass the-f dockerflag you can define a step like this:[variables]compose="docker-compose"[compose]condition="docker"args=["-f","/path/to/docker-compose.yaml","up"]Then you can runworky -f dockerto load the workspace and run thecomposestep.Tips and tricksCreate an aliasYou can create an alias by simply create a symbolic link to your config file in the~/.config/worky/directory.ln-s~/.config/worky/very_long_project_name.toml~/.config/worky/aliased_name.tomlThen you can use bothworky very_long_project_nameandworky aliased_nameto load the workspace.LimitationsWorky configuration depends on theTOMLsyntax. This means that you can't create two steps with
the same name.
You can crate two different steps using variables with the same value. Moreover, this helps to keep the configuration
file clean and readable.UsageAfter installing and configured worky, you can use it to load your project workspace simply by running:worky# If you have a .worky.toml file in the current directory# orworky{{project_name}}# If you have a config file in ~/.config/worky/{{project_name}}/config.toml or ~/.config/worky/{{project_name}}.toml# orworky-c{{path_to_config_file}}# Defining a custom config fileFor developersInstall dependencies:pyenvlocal3.10# Or higher like 3.11.1poetryuseenv3.10
poetryinstall
poetryrunworky{{your_command_args}}After you have made your changes, if you have changed something in thepyproject.tomlusepoetry2setupdev dependency to updatesetup.py:poetry2setup>setup.pyThen build the package withpoetry buildand create a PR with your changes if there are no issues.Buy me a coffeeIf you appreciate my work I will appreciate if youbuy me a coffee.