Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

😜 Gitmoji plugin #144

Merged
merged 1 commit into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ To avoid delays in the plugin launch time this plugin comes with a systemd servi
This index file is located at `~/.cache/centerpiece/git-repositories-index.json` and necessary for the plugin to work.

It exports the following environment variables:

- `$GIT_DIRECTORY`: The path to the git directory.
- `$GIT_DIRECTORY_NAME`: The name of the git directory.
- `$GIT_DIRECTORY_NAME`: The name of the git directory.

If `zoxide` integration is enabled, the plugin will sort your projects based on their respective `zoxide` scores.

Expand All @@ -137,6 +138,21 @@ plugin:
- ["alacritty", "--working-directory", "$GIT_DIRECTORY" "--class" "$GIT_DIRECTORY_NAME"]
```

### Gitmoji

_List gitmojis and copy them._

Note: You need to have [wl-clipboard](https://github.com/bugaevc/wl-clipboard) installed on your system.

**Related config keys**

```yml
# ~/.config/centerpiece/config.yml
plugin:
gitmoji:
enable: false
```

### System Commands

_Lock, sleep, restart or shutdown your system._
Expand Down Expand Up @@ -235,6 +251,8 @@ You can specify alternative configuration locations through:
commands:
- ["alacritty", "--command", "nvim", "$GIT_DIRECTORY"]
- ["alacritty", "--working-directory", "$GIT_DIRECTORY"]
gitmoji:
enable: false
resource_monitor_battery:
enable: true
resource_monitor_cpu:
Expand Down Expand Up @@ -287,6 +305,9 @@ You can specify alternative configuration locations through:
["alacritty" "--working-directory" "$GIT_DIRECTORY"]
];
};
gitmoji: {
enable = false;
};
resource_monitor_battery = {
enable = true;
};
Expand Down
6 changes: 6 additions & 0 deletions client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ impl Application for Centerpiece {
>());
}

if self.settings.plugin.gitmoji.enable {
subscriptions.push(crate::plugin::utils::spawn::<
crate::plugin::gitmoji::GitmojiPlugin,
>());
}

if self.settings.plugin.resource_monitor_battery.enable {
subscriptions.push(crate::plugin::utils::spawn::<
crate::plugin::resource_monitor::battery::BatteryPlugin,
Expand Down
Loading