#StackBounty: #command-line #bash #application-switcher List of window names on ALT-Tab

Bounty: 50

Once upon a time there was the fabulous window manager called “enlightenment”.

If you used it, and you hit ALT-TAB then you saw a small list of window titles below each other.

Like this:

  • user@remote-host
  • foo@db-server
  • emacs

Or like this:

window-switcher-simple-and-beautiful

I liked it a lot.

I want it back. I mean the feature, not the app.

I am using Ubuntu 18.04

I don’t want to see icons.

Reason: I have up to five terminals open. I will see the roughly same image (small version of a big terminal) five times.

It takes time and mental energy to find the right terminal.

The magic behind the terminal:

xtermset -title foo

I have this the bash script which gets executed if I login via ssh.

This way I can distinguish between several terminals easily.

How to get this feature which worked in the year 1998 back?

(Please don’t tell me to install the enlightenment window-manager, this question is about a simple feature, not the app)


Get this bounty!!!

#StackBounty: #command-line #scripting #git #colors #diff How to generate (git) diffs with <n> characters of context?

Bounty: 100

The --unified=<n> option lets you set the number of lines; is there a way to do the same for characters?

example

limit the context around the changes to X character(s) when using git diff --color-words=. file.ext

special case to take into account

a change is within the context of the previous and/or next change

use case

diffing a minified file containing one long line

TL;DR

I want to snip everything in the line except the changes and their context.


Get this bounty!!!

How to get current datetime on Windows command line for using in a filename?

Lets say you want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip

In a windows console(CMD), the following command helps you get what you need

@echo off
For /f "tokens=2-4 delims=/ " %a in ('date /t') do (set mydate=%c-%a-%b)
For /f "tokens=1-2 delims=/:" %a in ('time /t') do (set mytime=%a-%b)
echo %mydate%_%mytime%
@echo on

echo "Testing 123" >> "testFile_%mydate%_%mytime%.txt"

This would output the filename appended with the desired time format.

Source