Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Padding Color Shortcuts
#1
Would it be possible to have shortcuts to set the padding to a specific color with or without a plugin?

I am constantly checking for flaws by viewing images against both black and white padding and would like a quicker way to do so. I already have shortcuts to set custom color and return to theme default, but it is still plenty of clicks and mouse drags to set the custom colors.

Just checking if this is something really involved, or easily doable.

Thanks!
Reply
#2
Well....

The settings are held in your Gimp profile, in the file gimprc

-----------
(default-view
...snip....
(padding-mode custom)
(padding-color (color-rgb 0.94117647058823528 0.94117647058823528 0.94117647058823528))
(padding-in-show-all no))
(default-fullscreen-view
...snip....
(padding-mode custom)
(padding-color (color-rgb 0.94117647058823528 0.94117647058823528 0.94117647058823528))
(padding-in-show-all no))
----------------

Maybe keep alternate versions and use a bash script to swap in and out.
Would need a Gimp re-start of course.
Reply
#3
(09-23-2021, 03:44 PM)rich2005 Wrote: Well....

The settings are held in your Gimp profile, in the file gimprc

-----------
(default-view
...snip....
   (padding-mode custom)
   (padding-color (color-rgb 0.94117647058823528 0.94117647058823528 0.94117647058823528))
   (padding-in-show-all no))
(default-fullscreen-view
...snip....
   (padding-mode custom)
   (padding-color (color-rgb 0.94117647058823528 0.94117647058823528 0.94117647058823528))
   (padding-in-show-all no))
----------------

Maybe keep alternate versions and use a bash script to swap in and out.
Would need a Gimp re-start of course.

Hmm,
I guess I don't understand. Are you saying to overwrite gimprc via bash shortcuts and restart every time to take effect?

I tried to change values above and saved gimprc while gimp was open and of course nothing changed.
Reply
#4
yes, you would need to restart Gimp for a new version.

Looking at my crib file Wink there is a Gimp switch for this

--system-gimprc=filename
Use an alternate system gimprc file.
Reply
#5
(09-23-2021, 04:04 PM)rich2005 Wrote: yes, you would need to restart Gimp for a new version.

Looking at my crib file Wink there is a Gimp switch for this

--system-gimprc=filename
Use an alternate system gimprc file.

Thanks for thinking outside the box, but not exactly quicker than what I'm doing now. 

Here is what I'm trying to accomplish and why.

So now I would 
  • 5 key to launch the color picker for the custom padding color
  • drag the color slider to white or black
  • OK
  • 5 key again to change color again if needed
  • drag the color slider to white or black
  • OK
  • 6 key to get back to my normal padding color (from theme)
It's not exactly slow, but I do it enough that automating would make sense if it wasn't terribly difficult.

What I was looking for was
  • 3 key to black padding (no confirmation, just change color)
  • 4 key to white padding (no confirmation, just change color)
  • 5 key for custom chooser
  • 6 key for default from theme

The padding from theme shortcut already works without any confirmation.

I figured it wasn't particularly easy when I couldn't find any existing command dealing with it, but would have been upset if I found out it could have been done easily all this time.

Thanks Rich!
Reply
#6
There's a few less key-presses to change the theme:

   

in the Theme's gtkrc file:
Code:
style "kde_hack_2" = "gimp-colours-default-style"
{
#  bg[NORMAL] = @clr4 #Sets canvas BG
  bg[NORMAL] = "red" #Sets canvas BG
}

widget "*GimpDisplayShell.*" style "kde_hack_2"
Reply
#7
(09-23-2021, 04:50 PM)Kevin Wrote: There's a few less key-presses to change the theme:

Less strokes, but lots slower unfortunately. The other shortcuts are instant, but loading themes takes a little while. 
I tried to see how long it would take so I switched to a different theme and back, but now everything looks different. I tried going back to the theme it was on of course, but it's just different. I've verified from a gimprc backup that I'm using the same them, but something changed that won't come back. :/
I know it's subtle when looking at it here, but it's a huge difference when used to looking at the same thing for years and it changes. 
Any ideas?

Here's a recent screenshot loaded as an image.

[Image: Z6iTVZf.png]

On another note, I'm kinda halfway there by using the check colors, but I don't fully understand how it works. 

If I set Check Style in the preferences to Light checks, it allows my to use a shortcut for Light check color and it will make the canvas white. Unfortunately I can't figure out how to get dark checks to black as it doesn't allow you to set an actual color.
Reply
#8
So if anyone else ever experiences this, restarting gimp fixed it for me.

I'm guessing that it pulls certain elements from the system theme when loading, but changing themes from the preferences will overwrite those same elements until restarted.
Reply
#9
Quote:Would it be possible to have shortcuts to set the padding to a specific color with or without a plugin?

I got a bit lost with all your answers and coding, but I would say yes if all the 3 main themes in the menu (see below) have a specific padding color you already set up by theme (did not tried, though)

But why not put directly a shorcut were it's needed? or is a shortcut key combination + 2 click too much for the "custom color"? (may be I did not understood the question)
   

If you cannot (although I found it in the Shortcut menu edit/Keyboards shorcuts > search "padding"), you can activate temporarily the dynamic shorcuting key maker (un-activate after using it! it's quite dangerous)
   

a useful link about shortcut https://docs.gimp.org/2.10/en/gimp-conce...tcuts.html with a useful note about "menurc"
Reply
#10
(09-24-2021, 05:35 AM)PixLab Wrote:
Quote:Would it be possible to have shortcuts to set the padding to a specific color with or without a plugin?

I got a bit lost with all your answers and coding, but I would say yes if all the 3 main themes in the menu (see below) have a specific padding color you already set up by theme (did not tried, though)

But why not put directly a shorcut were it's needed? or is a shortcut key combination + 2 click too much for the "custom color"? (may be I did not understood the question)


If you cannot (although I found it in the Shortcut menu edit/Keyboards shorcuts > search "padding"), you can activate temporarily the dynamic shorcuting key maker (un-activate after using it! it's quite dangerous)


a useful link about shortcut https://docs.gimp.org/2.10/en/gimp-conce...tcuts.html with a useful note about "menurc"

Was going to suggest the same, there are shortcuts to switch paddings (search view-pading-color in the shortcut editor).
Reply


Forum Jump: