Windows 10: Farbe inaktiver (und aktiver) Fenster

Windows 10 hatte bis irgendwann das Problem, dass man die Farbe des aktiven Fensters nicht einstellen konnte. Das wurde zwar gefixt, aber den Weg will ich trotzdem nochmal vorstellen, indem ich auf dieses Video verweise: https://www.youtube.com/watch?v=sH8KC-keC5U. Kurz gesagt: c:\Windows\Resources\Themes\ aero kopieren nach windows und Dateien anpassen.

Ab irgendeinem Windows Patch wurde es möglich die “Akzentfarbe” zu ändern, mit dem Effekt, dass alle inaktiven Fenster wieder mit einer weißen Rahmenfarbe dargestellt werden. *seufz* Auch das kann man anpassen. Wie das geht sagt dieser Beitrag: http://www.ghacks.net/2015/11/29/change-the-color-of-inactive-windows-in-windows-10/. Kurz gesagt: Registry-Hacks.

Irgendwann geht es vielleicht mal auch mit Dialogen.

Advertisements

Making GNU Emacs play well on Microsoft Windows 7 (my additions to Sacha Chuas post)

Some time ago Sacha Chua posted a blog entry called Making GNU Emacs play well on Microsoft Windows 7. It offers a quick introduction how easy it is to install Emacs on Windows systems and you can follow that guideline. My system differs a bit from that and I want to show you on where and why.

  1. My path where I extract emacs is C:/bin/edit/emacs. I don’t like to put things directly under C:/ (except for my bin directory ^^) and I guess it’s not the best way to handle Windows. It would be more correct to put it under C:/Program Files(x86) but I don’t have the rights to create files there (which might be the reason why it’s better to put it there) so I decided to create a bin directory under C:/ where I put some applications. Also c:/Users/axxllence/bin/edit/ might work if you are the only user using Emacs or you have trouble creating directories under C:/.
  2. Start -> environment should list “Environment variables for this user”
  3. My home is: %HOME%=C:/Users/axxllence/Documents/home. I backup my Documents folder. I don’t backup every stuff under C:/Users/axxllence/ nor the AppData directory.
  4. OK
  5. My working directory in the shortcut is of course: %HOME%

One handy advice: If you want to create a file or directory in Explorer with a dot in front, you might have trouble doing it. Put a dot after the name and it works. (.emacs.d.). Weird but works. You can also use Emacs and M-x make-directory. Or you buy the essential .

That’s all. Not much difference. Have fun.

Emacs snippet: lookup / search wikipedia, google or any other side

This small snippet looks up a the current word or region in Wikipedia. If the cursor is before a word, it grabs the word. If you have marked a region, it grabs that. The function opens the search site in Wikipedia to lookup your searchterm.

I’ve used the sample from from Xah Lees page (http://ergoemacs.org/emacs/elisp_idioms.html).


;; ,----
;; | Wikipedia Lookup
;; `----
;; Looks up current word in Wikipedia in a browser. If a region is
;; active (a phrase), lookup hat phrase.
;; http://ergoemacs.org/emacs/elisp_idioms.html
(defun wikipedia-lookup ()
(interactive)
(let (myWord myUrl)
(setq myWord
(if (region-active-p)
(buffer-substring-no-properties (region-beginning) (region-end))
(thing-at-point 'symbol)))
(setq myUrl
(concat "http://de.wikipedia.org/wiki/Special:Search?search=" myWord))
(browse-url myUrl)))

You can do that for some other sites. Simply set the my Url to a different location:

I’ll give you the example for the emacs wiki. You have to put a ” ” space after the URL parameter “site:emacswiki.org ”


(defun emacswiki-lookup ()
(interactive)
(let (myWord myUrl)
(setq myWord
(if (region-active-p)
(buffer-substring-no-properties (region-beginning) (region-end))
(thing-at-point 'symbol)))
(setq myUrl
(concat "http://www.google.de/search?q=site:emacswiki.org " myWord))
(browse-url myUrl)))

If you define more lookups an interactive function would be nice which asks for the specific lookup:

  • [e]macswiki
  • [g]oogle
  • [l]eo
  • [w]ikipedia

Don’t know how to do that. 😉