Hi, firstly I want to say sorry for my bad english.
I'm new on Linux, but I like to edit my cinnamon theme, especially on color customization. Now I want to ask you how to make panel background color conditionaly. I want to make my panel can change color automatically when I open program or application, and then back to normal when I close that application. Can I do that? If can, please tell me how to.
Thanks for all your answer, sorry again for my bad english.
Can I make conditional panel background color?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Can I make conditional panel background color?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Can I make conditional panel background color?
Not without an ugly 'hack' which would be specific to the theme and program in question and would need a bit of bash scripting expertise.
How I would approach this is
1) Make a copy of the chosen theme in ~/.themes/ and give it a unique name.
2) Edit the cinnamon.css file of the copied theme to change the background colour of the .panel class as per your preference.
3) Make a bash script to launch the program in question and which uses the gsettings command to switch cinnamon theme to the edited version.
4) Make another bash script to kill the program which also uses the gsettings command to switch cinnamon theme back to the original.
5) Make launchers that reference your bash scripts in the menu and/or desktop and/or panel.
There probably is a very clever way to have an always running background running bash script that polls running processes to see if your program is running or not but I'd class that as very advanced bash scripting and a definite project
How I would approach this is
1) Make a copy of the chosen theme in ~/.themes/ and give it a unique name.
2) Edit the cinnamon.css file of the copied theme to change the background colour of the .panel class as per your preference.
3) Make a bash script to launch the program in question and which uses the gsettings command to switch cinnamon theme to the edited version.
4) Make another bash script to kill the program which also uses the gsettings command to switch cinnamon theme back to the original.
5) Make launchers that reference your bash scripts in the menu and/or desktop and/or panel.
There probably is a very clever way to have an always running background running bash script that polls running processes to see if your program is running or not but I'd class that as very advanced bash scripting and a definite project
Last edited by smurphos on Tue Feb 20, 2018 6:18 am, edited 1 time in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Can I make conditional panel background color?
I get it, but that I want is all program have a same settings, not per program. I know in elementary can use .panel.maximized (css) but it can't use in cinnamon.smurphos wrote: ⤴Tue Feb 20, 2018 6:12 am Not without an ugly 'hack' which would be specific to the theme and program in question and would need a bit of bash scripting expertise.
How I would approach this is
1) Make a copy of the chosen theme in ~/.themes/ and give it a unique name.
2) Edit the cinnamon.css file of the copied theme to change the background colour of the .panel class as per your preference.
3) Make a bash script to launch the program in question and which uses the gsettings command to switch cinnamon theme to the edited version.
4) Make another bash script to kill the program which also uses the gsettings command to switch cinnamon theme back to the original.
5) Make launchers that reference your bash scripts in the menu and/or desktop and/or panel.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Can I make conditional panel background color?
Do you just want to hide the panel for maximised programs? There are settings for than in panel settings.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Can I make conditional panel background color?
I have got the solution, there is a extension with name Transparent panels.. Thankyou for the answer.
- smurphos
- Level 18
- Posts: 8501
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Can I make conditional panel background color?
If you'd said you wanted them transparent.....
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.