-
-
Notifications
You must be signed in to change notification settings - Fork 6
Home
This config is for my personal use. I've done my best to make it usable for others but there's bound to be bugs here and there. If you find any, please open an issue and I'll take a look as soon as I can.
If you have any suggestions or feature requests, you can also open an issue.
I hope you enjoy the config as I've really enjoyed making it!
These instructions are written for Arch.
# (Optional) Back up your old config
mv ~/.config/awesome ~/.config/awesome.backup
# Install dependencies
# Luajit optional. you should be able to use awesome-git
# instead - but I think it runs noticeably faster with luajit
# yay -S awesome-luajit-git luajit
yay -S awesome-git picom-ftlabs-git gcalcli nerd-fonts-inter
sudo pacman -S task timew curl upower ledger playerctl
# Clone
git clone --recurse-submodules https://github.com/garado/cozy.git ~/.config/awesome
cd ~/.config/awesome
cp extras/default_cozyconf.lua cozyconf/init.lua
- Follow the instructions to set up gcalcli.
- Refresh the calendar by going to the calendar tab and either pressing r or the Refresh button.
The authorization for gcalcli expires every ~2 weeks and you will need to re-login to your Google account when that happens. gcalcli will conveniently open a browser with the reauth stuff automatically when that time comes. (If it doesn't open, try refreshing the calendar tab again.)
Pixela is a habit tracker that works entirely through API calls.
-
Follow the official setup instructions to create your account and set up your habits.
-
Cozy needs your username and user token to perform the API calls. They go in
cozyconf/pixela.lua
.
echo -e "return {\n name = "YOUR-USER-NAME",\n token = "YOUR-USER-TOKEN",\n}" > ~/.config/awesome/cozyconf/pixela.lua
-
Update
cozyconf/init.lua
with your habits (graph IDs). -
Restart Awesome.
Note: API calls will fail 25% of the time if you're not a Pixela patron. Cozy should give an error message when this happens - you can just try the action again.
- Obtain an OpenWeather API key.
- Put your API key in
cozyconf/init.lua
along with your latitude, longitude, and preferred units. - Restart Awesome.
Disclaimer: Cozy is built specifically for the way I use Taskwarrior:
- tags are treated as categories and projects are treated as subcategories
- a task can be assigned to only one tag and only one project
If that doesn't work for you, you might not find much use for the dashboard task tab (you can disable the tab in cozyconf). The hooks below and the schedule widget showing upcoming due dates should still be useful though.
- Install the necessary hooks by placing them in the
hooks/
directory of your Taskwarrior data directory. With these hooks, every time a task is added/modified outside of Cozy, the dashboard will detect it and update accordingly.
cp ~/.config/awesome/extras/taskhooks/*cozy YOUR_TASK_DATA_PATH/hooks
chmod +x YOUR_TASK_DATA_PATH/hooks/*cozy
I use Timewarrior to track time spent on Taskwarrior tasks.
-
If you haven't used Timewarrior before, create a Timewarrior data directory by running
timew
. -
Install this hook by placing it in the
hooks/
directory of your Taskwarrior data directory. With this, every time a task is started/stopped, the dashboard will detect it and update accordingly. The hook also conveniently updates the Timewarrior session with task data.
cp ~/.config/awesome/extras/taskhooks/*timewarrior YOUR_TASK_DATA_PATH/hooks
chmod +x YOUR_TASK_DATA_PATH/hooks/*timewarrior
Configurable within cozyconf/actions.lua
.
There are two types of quick action buttons you can add - stateless and stateful.
create_stateless_qa({
name = "Quick action name",
icon = "", -- Nerd Font icon
on_press = function()
-- your stuff goes here
end,
})
Here's an example from my config.
create_stateful_qa({
name = "Redshift",
icon = "", -- Nerd Font icon
-- Sets the initial state for the quick action.
init = function(qa)
-- Search for an active Redshift instance.
local cmd = "ps -e | grep redshift"
awful.spawn.easy_async_with_shell(cmd, function(stdout)
-- True if QA should be active, false otherwise.
qa:setstate(stdout ~= "")
end)
end,
-- This function runs when you turn on the quick action.
activate = function()
local cmd = "redshift"
awful.spawn.easy_async_with_shell(cmd, function() end)
end,
-- This function runs when you turn off the quick action.
deactivate = function()
local cmd = "pkill redshift"
awful.spawn.easy_async_with_shell(cmd, function() end)
end,
})
You'll need to write functions that run the commands to switch themes for other applications. These functions go in cozyconf/integrations.lua
. This is an example that works for Kitty.
-- cozyconf/integrations.lua
return {
kitty = function(args)
local cmd = "kitty +kitten themes --reload-in=all " .. args
awful.spawn.easy_async_with_shell(cmd, function() end)
end,
}
Then you'll need to edit the colorscheme files (theme/colorschemes/COLORSCHEME_NAME/COLORSCHEME_STYLE.lua
) and provide the arguments for that function.
-- somewhere in theme/colorschemes/nord/dark.lua
integrations = {
kitty = "Nord",
}
So the command that runs for the Nord Dark theme would be kitty +kitten themes --reload-in=all nord
.
Custom themes go in their own folder in themes/colorschemes
. Look at the existing themes for implementation examples. After adding your theme, restart Awesome and it should show up in the theme switcher.