Transparency on Focused/Unfocused windows - xmonad

Instead of using borders, I want to set the alpha of focused and unfocused windows to, say, 90% and 70%. This would apply to all windows except those matching some criterion like className = "Gimp". How can I implement this in my xmonad?
Thanks!

You can use XMonad.Hooks.FadeInactive. Note that it requires Xcompmgr or something of a kind.

Related

Unicode Font Color in Android TextView?

I am trying to insert Unicode characters into a TextView. In particular, I want to include a check mark and an "X". I found two Unicode characters to do this, namely \u2714 and \u2716. These show up as shown below. These are Ok I guess but I'm not crazy about the colors. Ideally, the check mark would be green and the cross red. Or at least both the same color. TextView.setTextColor doesn't help.
My guess is that these colors are baked into the font (typeface). I guess I could download a boatload of TrueType fonts and try them one-by-one, but that seems like cruel and unusual punishment.
Does anybody know a way to change the colors? (or otherwise do what I want)
I suppose I could re-architect the app to use images but that would entail unacceptably major re-structuring.
Well, no one responded, so I'm posting this answer to capture what I think I learned. From my reading, it appears that color in TrueType fonts is a non-standard, vendor-specific extension to the TrueType specification, which was added to accommodate emoticons. So I guess I'm out of luck. Fortunately, It works fine on my Samsung if I can tolerate the colors.

Custom FeedCount. Acording to which rule FeedBurner converts colors?

I am traying to prepare own dynamicly generated FeedCount for my own subscription service. I think this will be a good idea to support convention for setting colors via URL which is well known from FeedBurner,
http://feeds.feedburner.com/~fc/Ekundelekpl?bg=99CCFF&fg=000000&anim=0
this URLs produce such image.
fg is means a text color, bg means here a dark blue color. However light blue (ccffff) is here generated according to some rule.
Is this a some kind popular convert color convention, which is well known in webdeveloper/designers world?
I checked few other pairs of color, but I count figure out what the rule is. I don't want to hardcode all colors supported by FeedBurner.
[EDIT]
There is 216 available colors. Here is twelve pairs which I have extracted:
000000,7e7e7e
000033,8a8a8a
000066,909090
000099,9999CC
0000CC,9999FF
0000FF,9999FF
006600,909090
006633,99CC99
006666,A2A2A2
006699,99CCCC
0066CC,99CCFF
0066FF,99CCFF
I did it in another way.
I decided to use feedburner as template. I download proper image and override parts which interest me.
https://github.com/noisy/eGazeciarzFeedCount

How can I make a custom layout / change header background color … with Tex, Latex, ConTeXt?

currently I produce dynamically this document with Python Report Labs… to produce pdf documents.
Now, I would like try to produce this document with Tex / Latex / ConTeXt…
I've some questions :
how can I make the layout ?
how can I make header background color ?
how can I define my custom title (with blue box) ?
what is the better choice for my project : Latex or ConTeXt ?
What package I need to use ?
geometry ?
fancyhdr ?
Have you some example ? some resource ?
Yesterday, I've read many many documentation… and I don't found a solution / example for my questions.
Some useful packages apart from the fancyhdr you already mentioned are:
titlesec for more control over your section titles
booktabs for more control over table layout
PGF/TikZ for the graphics in your document, i.e., the page turn effect in the corner and maybe the blue boxes (although that might be considered a bit overkill :))
memoir for more control over your document layout, but the package is more book-oriented than you need probably
koma-script might be a good alternative for memoir but I'm not familiar with it so I don't know about its weaknesses
This is list is not exhaustive and I am not experienced enough in this kind of typesetting meets lay-out stuff to be of much help, but these are packages that come to my mind given your problem :).
Using inputenc there shouldn't be a problem typesetting Russian text.
Maybe the actual process will be easier in ConTeXt, it is more oriented towards control over your typesetting but I'm not familiar with it.
Good luck!
I'd certainly do this kind of think in Context rather than Latex: Context permits grid layout, and allows you to define layers for putting text and other graphics on top of background graphics. But as Pieter says, you could try using TikZ to do this with Latex.
Unicode is no barrier to regular Latex or Context: with either, just specify that you want to use utf-8 as input encoding.
If you do use Latex, don't have headers or footers, and allocate no vertical space for them either.
With Context:
how can I make the layout? — Use grid layout.
how can I make header background color? — Use \setupbackground
how can I define my custom title (with blue box) ? — I don't understand what you want to do here.
Everything you need to do this, except grid mode and how to put graphics in the background, is documented in Context an excursion. Grid mode is explained in the Context manual. Layers are a bit tricky to get to grips with, but Layers in the Context wiki is a good place to start.
With titlesec and color packages use this in LaTeX head (before \begin{document})
\usepackage{titlesec}
\usepackage{color}
% Colors
\definecolor{textcolor}{rgb}{.90,.95,1}
\definecolor{boxcolor}{rgb}{.94,.97,1}
% Header style
\titleformat{\section}
{\color{textcolor}\normalfont\Large\bfseries}
{}{1em}{{\color{boxcolor}\rule{0.35cm}{0.35cm}}\quad}
to make the blue box and change header color, font and remove numbering.

Does anyone know a light Vim scheme which makes coding more readable and pleasant?

I know a lot of nice dark schemes for Vim which makes coding more readable and pleasant such as ir_black, wombat, zenburn. Its weird but I haven't seen so many popular light themes (white background).
Does anyone knows a light Vim scheme which makes code more readable and pleasant to see?
(that makes code less confusing to distinguish, something like Visual studio's default scheme?)
With all due bias-based disclaimers and caveats (I am the author of the color scheme), I find that Mayan Smoke both highly ergonomic as well as aesthetically pleasing (screenshot). Download page: http://www.vim.org/scripts/script.php?script_id=3065.
As alternative, you should also have a look at the immensely popular Pyte, which is eerily similar to Mayan Smoke (development was independent, and the similarity is convergence, I swear!), though the syntax colors are a lot more muted.
Check out http://vimcolorschemetest.googlecode.com/svn/html/index-c.html, it has a HUGE list of colorschemes with previews.
If you do not like C samples, there are samples with other programming languages, too: http://code.google.com/p/vimcolorschemetest/
Louver is a bare-bones, light color scheme that somewhat resembles the default Visual Studio look.
Screenshot:
http://jstap.web.fc2.com/louver.html
I like Solarized for LCD monitors. It sucks on CRTs.
http://www.vim.org/scripts/script.php?script_id=3520
Screenshots at http://ethanschoonover.com/solarized
This new theme is really nice, even with GVim on Windows:
https://github.com/reedes/vim-colors-pencil
I like dark background, but changing software a lot which like IE, VS studio .... So changing from dark to light and back is so uncomfortable, so light background is also my choice, I more prefer the theme name ironman, you can find it on vim plugin page.
You should try eclipse theme.
https://github.com/vim-scripts/eclipse.vim
Interesting subject and such contradictory statements. First: according to my experience, everything with dark background is very bad for my eyes, unless I work in total darkness. But you shouldn't work in darkness anyway, just turn the lamp on.
Second: for (my) eyes feels best the backround color which I would describe "light neutral gray with slight greenish tone". BUT: especially these colors are very different from one monitor to another (with same RGB value), for example these are "guibg" colors from my two computers' schemes: guibg = #E2E2D8 on one pc and guibg = #E6EDD8 on another. Despite the colors look very similar they have different values. So honestly, there is only one way to make it "good for your eyes" - just pick some good scheme and finetune the colors, especially this background color is important imho. Also you can set several schemes with bg color adopted to outer lighting conditions. So if you see a description like "this color scheme is very good for eyes", it's sort of bulls*it, since it really depends. But I'd certainly advise to avoid any dark schemes.
As for me, readability is high and uniform contrast of all syntax elements.
https://github.com/andbar-ru/vim-unicon

How do I change the Unit:Characters in Matlab?

For portability, I set the units of my GUIs to 'characters'. Now I have a user who wants to use Matlab on his netbook, and the GUI window is larger than the screen (and thus cropped at the top).
I think I could try and write something in the openingFcn of the GUI that measures screen size and then adjusts the GUI accordingly, but I'd rather avoid that, because I then need to deal with text that is bigger than the text boxes, etc.
What I'd rather like to do is somehow adjust the unit 'character' on his Matlab installation. None of the font sizes in the preferences seem to have an effect on unit:character, though. Does anyone know whether there's a setting for that, which can be changed from within Matlab (I don't mind if it's something that is reset at every reboot, since I can just put it into the startup script)?
Might I suggest an alternative to consider when designing your GUI:
Create all of your GUI objects with the 'FontUnits' property set to 'normalized'.
Create the figure with a default size, with everything set to look the way you want.
Set one or more of the CreateFcn/OpeningFcn/ResizeFcn functions so they will resize the GUI to fit the screen size.
When the GUI and its objects are resized, the text will resize accordingly, thus helping to avoid text that ends up bigger than the text boxes. One thing to keep note of is that normalized units for the font will interpret the value of 'FontSize' property as a fraction of the height of the uicontrol. I also make it a habit to set the 'FontName' property to 'FixedWidth' to help control the width of the text.

Resources