When running mintty on Cygwin with Windows 10, if I have two windows open that partially overlap, and neither has the focus, the bottom and non-scrollbar borders are invisible, and the text of both windows runs together.
Is there a way to make these borders a little wider ?
I use a workaround: I assign a different background colour to each window. This can be done via the "Options" context menu each time you open a new window.
However, you can also automate. I've added the code below to my ".bashrc" to select the "next available" colour. The list of colours is simply a list of RGB values.
# Set the next available background colour
for COLOUR in 0,0,0 100,0,0 0,100,0 0,0,100
do
PIDFILE=/var/run/mintty-bgcolour-${COLOUR}.pid
PID=`[ -e $PIDFILE ] && cat $PIDFILE`
if ! kill -0 "$PID" 2>/dev/null
then
echo $$ > $PIDFILE
echo -ne '\e]11;'$COLOUR'\a'
trap 'rm -f '$PIDFILE EXIT
break
fi
done
unset COLOUR PIDFILE
Another workaround is to set the transparency in "options" on the window to, say, "Medium" and then check the box "Opaque when focussed". This sort of gives you a different background colour on all the windows except the active one.
In your ~/.minttyrc file add a line that says:
Padding=8
This adds an 8px border on the inside of the window frame for all subsequently launched mintty terminals. Of course you can change the 8 to whatever size appeals to your eyes.
Related
I have a fresh install of arch linux and am currently trying to theme the terminal (alacritty) and the transparency when I set it in ~/.config/picom/picom.conf never applies when I sudo pkill picom then sudo picom --experimental-backends -b any help in the right direction would be greatly appreciated.
Method 1:
In your picom config file (by default ~/.config/picom/picom.conf) there should a list at the end of Trasparency/Opacity section. There should be some examples on how to set opacity effects. But nevertheless here is the syntax:
opacity-rule = [
"OPACITY_VALUE:class_g ='CLASS_NAME'"
]
OPACITY_VALUE is a number from 1-100 where 0 is fully invisible and 100 is fully opaque. And you can get the CLASS_NAME of any window by executing the following command and clicking on a window.
xprop | grep "CLASS"
Note: The CLASS_NAME value is actually the second one.
So if you want to have the alacritty window transparent, paste the following snippet right in the middle of the opacity-rule list.
"85:class_g ='Alacritty'",
Method 2:
Me personally, I don't use the first method. Because it causes the text to be transparent as well. So if you only want to make your background transparent, go to your alacritty config file (By default, it should be on ~/.config/alacritty/alacritty.yml.
If it is not there, copy everything from the example config located in /usr/share/doc/alacritty/example/alacritty.yml and paste to ~/.config/alacritty/alacritty.yml
There, find the window: section. Under that, paste the line as shown below. The code should look somewhat similar.
window:
opacity: 0.80 #From 0.00 to 1.00
Hope this helps.
My notebook suffers from image persistence and I want to create a program that moves every second the whole screen just 1 pixel to left and in the next second to the right (one pixel offset every second shouldn't be noticable for the user, right?). I've already tried to create programs with wmctrl and xdotools, but it's nearly impossible to move a fullscreen window (with both of them).
With wmctrl it's not possible to minimize a certain window. (I've already asked that question here: wmctrl: moving a fullscreen window
And with xdotool it's possible to move a window, but that's not one pixel, it's way more.
#!/bin/bash
windowIds=$(xdotools search -class "")
for windowId in $windowIds; do
name=$(xdotool getwindowname $windowId)
geo=$(xdotool getwindowgeometry $windowId)
if [[ $name == *"Firefox"* ]]; then
foo=$(xdotool windowmove --relative $windowId -1 -1)
fi
done
If you have any idea how I can solve this issue, I would be very thankful.
Thank you very much.
I am invoking a dialog with the following command:
dialog --inputbox "test" 20 0
I have set the screen color background color to BLACK:
screen_color = (WHITE,BLACK,OFF)
But the color is an off-black not black:
I am guessing this has to do with the colors you have set in your terminal. If you run the following command you can verify.
echo -e "\033[0;40m "
This will print out spaces with a black background. If you wish it to be total black you will need to change what color "black" is in the terminals config.
What you're wanting is the "default" terminal color. To get that replace BLACK with DEFAULT.
I am outputing some text on the screen in perl
However, I want to make sure that only 1 line fits on each screen line thus if I change screen the program would automatically adjust its output line size.
Is there a way to automatically do it without having user-interaction?
Thanks
perl -MTerm::ReadKey -E '($cols,$rows) = GetTerminalSize(); say "This screen has $rows rows and $cols columns."'
On Unix/Linux you should be able to use the Term family of modules to get the current screen size. You can even hook SIGWINCH with it and respond to a terminal window resize event by adjusting your output.
http://search.cpan.org/modlist/User_Interfaces/Term
I am drawing multiple graphs via a shell script in gnuplot.
The graphs are drawn correctly, but am not am able to zoom in . Does any variable need to be set?
Here is the code:
--- for loop of script starts---
gnuplot -persist <<EOF
set term x11 1
set title "IP : $ip Upstream capacity:$UP_CAP kbps"
plot 'trace-0-dir1.txt' using (\$1-$min1):(\$2-\$1-$mindelay1) with lp
set term x11 2
set title "IP: $ip Downstream capacity:$DOWN_CAP kbps"
plot 'trace-0-dir2.txt' using (\$1-$min2):(\$2-\$1-$mindelay2) with lp
EOF
---for loop ends---
Once you switch away from the "x11 1" window the zooming is disabled. To regain control, you should switch back to the specific window (set term x11 1). Another issue is the x11 terminal. You should use wxt which can keep windows alive.
You can solve your issue by using the wxt terminal and separating the two plot commands, therefore not switching away from the window:
--- for loop of script starts---
gnuplot -persist <<EOF
set term wxt
set title "first"
plot x
EOF
gnuplot -persist <<EOF
set term wxt
set title "second"
plot x**2
EOF
---for loop ends---
With this, you have two zoomable windows open and you can still use your shell variables.
In general, you do not have to have console open in order to have active windows, just an appropriate terminal. Especially, the command
gnuplot --persist -e 'plot[0:10] sqrt(x)'
produces scrollable and zoomable windows if used with wxt. Try
gnuplot --persist -e 'set term wxt; plot[0:10] sqrt(x)'
Hope this helps.
AFAIK you are only able to zoom, scroll etc. if the gnuplot console is still active. Meaning, gnuplot must still be running.
To give zooming and scrolling a try, input the following sequence:
Enter the gnuplot console by typing gnuplot
plot a function with plot[0:10] sqrt(x) for example.
Try zooming (Ctrl + Mouse wheel) and scrolling (Mouse wheel / Shift + Mouse wheel) before exiting the gnuplot console.
If you run a script like
gnuplot --persist -e 'plot[0:10] sqrt(x)'
you cannot scroll or zoom anymore.