项目作者: intrntbrn

项目描述 :
set custom icons for gui and terminal applications in awesomewm
高级语言: Shell
项目地址: git://github.com/intrntbrn/icon_customizer.git
创建时间: 2020-06-19T13:35:27Z
项目社区:https://github.com/intrntbrn/icon_customizer

开源协议:

下载


icon_customizer for awesomewm



Features:

  • Define your own icons for applications
  • Set custom icons for terminal applications based on client title

Prerequisite:

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:

  1. echo "source ~/.config/awesome/icon_customizer/dynamictitles.bash" >> ~/.bashrc
  2. echo "source ~/.config/awesome/icon_customizer/dynamictitles.zsh" >> ~/.zshrc

Installation:

Clone the repo and import the module:

  1. git clone https://github.com/intrntbrn/icon_customizer ~/.config/awesome/icon_customizer
  2. echo "require('icon_customizer'){ delay = 0.2 }" >> ~/.config/awesome/rc.lua

Example Configuration:

Define your custom icons in theme.lua:

  1. local icon_dir = os.getenv("HOME") .. "/.config/awesome/icons/"
  2. theme.ic_icons = {
  3. ["Chromium"] = icon_dir .. "chromium.png",
  4. ["firefox"] = icon_dir .. "firefox.png",
  5. ["Zathura"] = icon_dir .. "zathura.png",
  6. ["Steam"] = icon_dir .. "steam.png",
  7. ["discord"] = icon_dir .. "discord.png",
  8. ["Alacritty"] = icon_dir .. "terminal.png",
  9. ["kitty"] = icon_dir .. "terminal.png"
  10. }
  11. theme.ic_dynamic_classes = { "Alacritty", "kitty", "St", "URxvt", "Termite" }
  12. theme.ic_dynamic_icons = {
  13. ["- NVIM$"] = icon_dir .. "vim.png",
  14. ["- VIM$"] = icon_dir .. "vim.png",
  15. ["- TMUX$"] = icon_dir .. "tmux.png",
  16. ["^ranger$"] = icon_dir .. "file-manager.png",
  17. ["^spt$"] = icon_dir .. "spotify.png",
  18. ["^googler$"] = icon_dir .. "google.png",
  19. ["- rtv"] = icon_dir .. "reddit.png"
  20. }
  21. theme.ic_fallback_icon = icon_dir .. "default_icon.png"

Get application class names or titles by using xprop.

Limitations:

Applications can still overwrite your custom icon.