_NET_WM_NAME does not match shown title of window - x11

The text in the atom _NET_WM_NAME often doesn't match what XFCE's panel shows.
For example, gedit might show up as app.d (~/GIT/Clemote/server/source) - gedit while _NET_WM_NAME returns gedit. Other windows, such as Chromium, does not return anything.
How do I get the title which matches the one shown in XFCE panel?
What I'm doing in pseudo-code:
grab all windows by using XQueryTree with the root window
get the _NET_WM_NAME atom
for each window
if visible, print the value of the atom
Example output:
Xfce Terminal
gedit

Related

WIndows "start cmd" driving me crazy (setting colors)

I have searched high and low for the answer to this, to no avail.
I am on Windows 10.
I have a batch script to launch a bunch of command windows using "start cmd".
When I do that, it is not picking up the text color I have set.
I know how this is "shortcut dependent", and I have tried every way I can
using Properties and Defaults, without success.
It seems I can set MOST of the properties to my liking (Font, Layout), but
not the Text Color.
If I open the window from the Start menu (or Run command), I get my white text.
But if I used "start cmd" it is using different Properties (which I also tried to set)
and text color is some teal/blue color.
However: when I look at the properties for that window, and click text color,
the white box at the far right is highlighted, and when I click it, it shows
(255,255,255) - but that's not what it's using!!
How do I get it do what I want? [without using any 3rd-party apps, if possible]

Split terminal in Atom

I was curious if it is possible to split the terminal in the Atom text editor?
Yes. Command-k followed by an arrow key to indicate the direction to split the pane. Command-w will close the panes you generated.
For the terminal themselves, the extension term3 supports splitting a terminal window.

Mac Terminal Bug With [ Character After Changing Colors

I just changed my colors in ~/.bash_profile using:
export PS1="\[\033[1;96m\]\u\[\033[0;0m\]:\[\033[1;33m\]\W\[\033[1;0m\]$ "
The problem is, I see a strange character on the previous lines of the prompt:
(before "Pedro")
How can I fix this?
These “square bracket” indicators surrounding a line are called “marks”. These indicate that the line was marked as a “prompt line”. They are not characters, they are visual markers drawn in the margins of the terminal view.
Marks provide structure to the terminal contents, enabling you to navigate, select, copy, delete, etc. lines of text in the terminal. By default, Terminal automatically marks prompt/input lines when you type Return, enabling you to perform operations on command lines and their output.
Marks were added to Terminal in OS X 10.11 El Capitan.
See the menu items in the Edit menu—especially the Marks, Bookmarks, and Navigate submenus—for Mark-related commands.
For example:
Edit > Navigate > Jump to Previous/Next Mark ⌘↑/⌘↓ : navigate to the previous/next command line. Add the Shift ⇧ modifier to select text between marks.
Edit > Clear to Previous Mark ⌘L : delete the last command line and its output. This is context-sensitive and will clear the terminal content up to a mark selected via a Jump to… command, or to the start of the selection.
Edit > Select Marked Output ⇧⌘A : select the output of the last command (or between a selected mark and the next mark).
Note that many of the commands are designed to be used in combination, as well. For example, if you Select Marked Output then Clear to Start of Selection (⇧⌘A, ⌘L), it will delete the last command's output while leaving its command-line in place.
A Bookmark is a heavier-weight mark. Bookmarks are indicated with thick vertical lines in the view margins. The Edit > Bookmarks > Insert Bookmark ⇧⌘M command inserts a bookmarked line with the date and time (add the Option ⌥ modifier to customize the text). Many of the Mark-related commands operate on (or restrict themselves to) Bookmarks if you add the Option ⌥ modifier.
You can show or hide the visual mark indicators with View > Show/Hide Marks. All the Mark operations still work whether or not the indicators are displayed.

Mac OS X Specify Keyboard Shortcut

How can i set the keyboard in Mac OS X Yosemite so i can map the function keys to write specified symbols?
I want to be able to write \( every time press F1
use Automator!
Open Automator (search for it in spotlight) and click the new document button
select service as the type of document
on the top left, there is a search bar in Automator. Simply search for run
one of the resulting options is Run AppleScript
Drag this onto the main part of the window, it will add a skeleton script
under where it says (*Your script goes here *), type this:
tell application "System Events"
keystroke "\\("
end tell
the two slashes are needed to produce one slash!
Now save this, the default location is fine!
Next, go into settings. open the keyboard icon
under the shortcuts tab, choose in the left pane, Services
Scroll to the bottom and your script should appear! select it and Double click where it says add shortcut. Now input your short cut. make sure there is no other shortcut assigned to that key
Now I must admit, I didn't get f1 to work in some apps because they had override shortcuts for F1. For example, the settings search bar printed ( when I hit F1 but in notes it didn't. If you have a keyboeard, you should probably try an F key greater than 12
Hope this works!

How to draw "Find" result bar with keyboard shortcut in Sublime Text?

When you type in ⌘ + F in Sublime Text, you enter the "Find" mode, with the search result bar shows up on the bottom of the screen. However, I would like to return to the original form only with keyboard and not like to do mouseover to the X-mark on the result bar and then tap the x-mark to remove the search bar, which is quite a lot of work.
So is it feasible to return to the pre-search mode only with keyboard? I use Sublime Text 3 on my OS X 10.9.2.
Escape will close the find menu.

Resources