enComputerevilvte
adm Find login register

Change background runtime without rebuild

caleb
1 Change background runtime without rebuild
Promote 0 Bookmark 02008-04-21quote  

1. Please define CTRL_TOGGLE_BACKGROUND or "Toggle background" in MENU_CUSTOM. You can toggle among "Image", "Transparent", "No background", and "Opacity".

2. Change your background image. For example, "ln -sf $HOME/.config/evilvte/bg2.jpg $HOME/.config/evilvte/background.png"

3. Toggle background to "Image", then you have the new background.

Notice: Un*x does not care what the filename is. You can rename or link a .jpg file to .png to fit your build-time BACKGROUND_IMAGE setting.

edited: 1
guest
2
Promote 0 Bookmark 02008-03-19quote  

Just wanna see my defined background without ctrl . at beginning.

So I switch the order.. 

It's better have an option to select user defined background or desktop background or nothing at beginning.

thanks! 

*** sakura.c    2008-03-19 08:58:50.000000000 +0800
--- sakura.c.org        2008-03-19 11:29:38.000000000 +0800
***************
*** 892,903 ****
    vte_terminal_set_visible_bell(VTE_TERMINAL(term.vte), BELL_VISIBLE);
  #endif
 
- #ifdef BACKGROUND_IMAGE
-   char imgstr[64];
-   sprintf(imgstr, "%s/%s", g_getenv("HOME"), BACKGROUND_IMAGE);
-   vte_terminal_set_background_image_file(VTE_TERMINAL(term.vte), imgstr);
- #endif
-
  #ifdef BACKGROUND_TINT_COLOR
  #if BACKGROUND_EXIST
    GdkColor color_tint;
--- 892,897 ----
***************
*** 915,920 ****
--- 909,921 ----
  #ifdef BACKGROUND_TRANSPARENT
    vte_terminal_set_background_transparent(VTE_TERMINAL(term.vte), BACKGROUND_TRANSPARENT);
  #endif
+ #ifdef BACKGROUND_IMAGE
+   char imgstr[64];
+   sprintf(imgstr, "%s/%s", g_getenv("HOME"), BACKGROUND_IMAGE);
+   vte_terminal_set_background_transparent(VTE_TERMINAL(term.vte), FALSE);
+   vte_terminal_set_background_image_file(VTE_TERMINAL(term.vte), imgstr);
+ #endif
+
 
  #ifdef BINDING_BACKSPACE_KEY
    vte_terminal_set_backspace_binding(VTE_TERMINAL(term.vte), BINDING_BACKSPACE_KEY);

enComputerevilvte
adm Find login register
views:7622