2020-06-18 11:01:24 +02:00
|
|
|
icon_customizer for awesomewm
|
|
|
|
==================
|
2020-06-19 14:24:35 +02:00
|
|
|
|
|
|
|
<p align="center">
|
2020-06-19 15:36:44 +02:00
|
|
|
<img src="https://s7.gifyu.com/images/custom_icons.gif">
|
2020-06-19 14:24:35 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
Features:
|
|
|
|
------------
|
2020-06-19 14:55:32 +02:00
|
|
|
- Define your own icons for applications
|
|
|
|
- Set custom icons for terminal applications by using regular expressions
|
2020-06-19 14:24:35 +02:00
|
|
|
|
|
|
|
Prerequisite:
|
|
|
|
------------
|
|
|
|
You need to configure your shell and terminal to support dynamic titles.
|
2020-06-19 14:55:32 +02:00
|
|
|
Verify your setup by typing `sleep 5` in your terminal. If the title (`WM_NAME`) of the terminal changes while sleep is running, you are good to go.
|
|
|
|
Otherwise your shell is most likely not configured to show dynamic titles.
|
|
|
|
|
|
|
|
Minimal configurations are provided for `bash` and `zsh`:
|
|
|
|
|
|
|
|
```
|
|
|
|
echo "source ~/.config/awesome/icon_customizer/dynamictitles.bash" >> ~/.bashrc
|
|
|
|
echo "source ~/.config/awesome/icon_customizer/dynamictitles.zsh" >> ~/.zshrc
|
|
|
|
```
|
|
|
|
|
2020-06-19 14:24:35 +02:00
|
|
|
|
|
|
|
Installation:
|
|
|
|
------------
|
|
|
|
|
|
|
|
Clone the repo and import the module:
|
|
|
|
|
|
|
|
1. `git clone https://github.com/intrntbrn/icon_customizer ~/.config/awesome/icon_customizer`
|
|
|
|
1. `echo "require('icon_customizer'){}" >> ~/.config/awesome/rc.lua`
|
|
|
|
|
|
|
|
Example Configuration:
|
|
|
|
------------
|
|
|
|
Define your custom icons in `theme.lua`:
|
|
|
|
```
|
|
|
|
local icon_dir = os.getenv("HOME") .. "/.config/awesome/icons/"
|
|
|
|
theme.ic_icons = {
|
|
|
|
["Chromium"] = icon_dir .. "chromium.png",
|
|
|
|
["firefox"] = icon_dir .. "firefox.png",
|
|
|
|
["Zathura"] = icon_dir .. "zathura.png",
|
|
|
|
["Steam"] = icon_dir .. "steam.png",
|
|
|
|
["discord"] = icon_dir .. "discord.png",
|
|
|
|
["Alacritty"] = icon_dir .. "terminal.png",
|
|
|
|
["kitty"] = icon_dir .. "terminal.png"
|
|
|
|
}
|
|
|
|
|
|
|
|
theme.ic_dynamic_classes = { "Alacritty", "kitty", "St", "URxvt", "Termite" }
|
|
|
|
theme.ic_dynamic_icons = {
|
|
|
|
["- NVIM$"] = icon_dir .. "vim.png",
|
|
|
|
["- VIM$"] = icon_dir .. "vim.png",
|
|
|
|
["- TMUX$"] = icon_dir .. "tmux.png",
|
|
|
|
["^ranger$"] = icon_dir .. "file-manager.png",
|
|
|
|
["^spt$"] = icon_dir .. "spotify.png",
|
|
|
|
["^googler$"] = icon_dir .. "google.png",
|
|
|
|
["- rtv"] = icon_dir .. "reddit.png"
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2020-06-19 15:38:47 +02:00
|
|
|
Get application class names or titles by using `xprop`.
|
|
|
|
|
2020-06-19 14:55:32 +02:00
|
|
|
Limitations:
|
|
|
|
------------
|
|
|
|
It is not possible to set custom icons for applications that are constantly updating the icon themselves (e.g. `Gimp`).
|
2020-06-19 15:36:44 +02:00
|
|
|
|
|
|
|
Related Work:
|
|
|
|
------------
|
|
|
|
|
|
|
|
* icons: [numix circle](https://github.com/numixproject/numix-icon-theme-circle)
|
|
|
|
* awesomewm taglist: [fancy_taglist](https://gist.github.com/intrntbrn/08af1058d887f4d10a464c6f272ceafa)
|