unity - Can I apply a different GTK3 theme from the main one to an individual application? - Ask Ubuntu


for example, can keep ambiance main theme assign elementary theme elementary's app?

you can use gtk environment variable gtk_theme=elementary launch app elementary theme. example, running gtk_theme=elementary pantheon-files launch elementary files app using elementary gtk theme.

to apply every time launch specific app, best option create custom .desktop file (launcher).

create custom .desktop file

  1. open file browser
  2. navigate /usr/share/applications/
  3. copy launcher (highlight , ctrl+c) app want launch elementary theme
  4. navigate ~/.local/share/applications/ , paste launcher (ctrl+v)
  5. right-click , open launcher text editor
  6. modify line starting exec= include exec=env gtk_theme=elementary , previous existing contents of line. (so exec=pantheon-files become exec=env gtk_theme=elementary pantheon-files)
  7. save , close file

the next time launch app unity (or app launcher of choice) use elementary theme.

bonus: make work when using command line

you may want app launch elementary theme when launching command line. so:

  1. open terminal app
  2. type alias pantheon-files="gtk_theme=elementary pantheon-files" (replacing pantheon-files desired app)
  3. press enter

caveats:

  1. this not change window manager's theme elementary theme.
  2. this (by design) apply account, not root or else on machine.
  3. the theme names case-sensitive , should matched theme folder name.

sources:

  1. i'm elementary contributor ;)
  2. gtk+ 3 reference manual: running gtk+ applications
  3. set variable in .desktop file

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User