icon_customizer/README.md

75 lines
2.3 KiB
Markdown
Raw Normal View History

2020-06-18 11:01:24 +02:00
icon_customizer for awesomewm
==================
2020-06-19 14:24:35 +02:00
<p align="center">
2021-06-29 23:18:33 +02:00
<img src="https://user-images.githubusercontent.com/1234183/123868520-193cba80-d930-11eb-8996-26541bca9c22.gif">
2020-06-19 14:24:35 +02:00
</p>
Features:
------------
- Define your own icons for applications
2021-05-09 18:30:18 +02:00
- Set custom icons for terminal applications based on client title
2020-06-19 14:24:35 +02:00
Prerequisite:
------------
2021-05-09 18:30:18 +02:00
Dynamic terminal icons (as shown on gif) require you to have a shell-terminal-stack that supports dynamic titles (the title of the client (`WM_NAME`) changes based on the running app or pwd).
Not every terminal or shell supports dynamic titles or is configured correctly out of the box.
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`
2021-05-09 18:30:18 +02:00
1. `echo "require('icon_customizer'){ delay = 0.2 }" >> ~/.config/awesome/rc.lua`
2020-06-19 14:24:35 +02:00
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"
}
2021-05-09 18:30:18 +02:00
theme.ic_fallback_icon = icon_dir .. "default_icon.png"
2020-06-19 14:24:35 +02:00
```
2020-06-19 15:38:47 +02:00
Get application class names or titles by using `xprop`.
Limitations:
------------
2021-05-09 18:30:18 +02:00
Applications can still overwrite your custom icon.
Related Work:
------------
* icons: [numix circle](https://github.com/numixproject/numix-icon-theme-circle)
* awesomewm taglist: [fancy_taglist](https://gist.github.com/intrntbrn/08af1058d887f4d10a464c6f272ceafa)