Forum › Forums › New users › New Users and General Questions › Display Resolution
Tagged: Display, resolution
- This topic has 13 replies, 5 voices, and was last updated Jan 24-9:00 pm by marcelocripe.
-
AuthorPosts
-
January 21, 2021 at 5:26 pm #50368Member
kevinho500
I’ve a Acer notebook but it broke part of right side screen.
I’ll use but need resize display resolution only horizontally (x).- This topic was modified 2 years, 3 months ago by kevinho500.
- This topic was modified 2 years, 3 months ago by kevinho500.
January 21, 2021 at 6:58 pm #50375Anonymous
January 21, 2021 at 10:01 pm #50384Member
Xecure
::I was curious and built a small script that would split the screen (you just need to write the percentage split) and only activate the left side of the split.
Create a file (for example “splitmyscript.sh”) and make it executable (right-click, properties, and activate all executable boxes). Then, open it in a text editor and paste:
#!/bin/bash # Right here (integer between 1 and 99) the left side split percentage VERTICAL_SPLIT="75" MY_MONITOR="$(xrandr | grep -v "^ " | grep -m1 " connected" )" MONITOR_ID="$(echo "$MY_MONITOR" | cut -d" " -f1)" MONITOR_WIDTH="$(echo "$MY_MONITOR" | rev | cut -d" " -f3 | rev | cut -d"m" -f1)" MONITOR_HEIGHT="$(echo "$MY_MONITOR" | rev | cut -d" " -f1 | rev | cut -d"m" -f1)" MON_RES_TEMP="$(echo "$MY_MONITOR" | cut -d" " -f3-6)" for word in $MON_RES_TEMP; do if [ $(echo $word | grep -c "+") -gt 0 ]; then DISPLAY_RES="$(echo $word | cut -d "+" -f1)" DISPLAY_WIDTH="$(echo $DISPLAY_RES | cut -d "x" -f1)" DISPLAY_HEIGHT="$(echo $DISPLAY_RES | cut -d"x" -f2)" break fi done echo "MONITOR: $MONITOR_ID, $MONITOR_WIDTH mm x $MONITOR_HEIGHT mm" echo "DISPLAY: $DISPLAY_WIDTH px x $DISPLAY_HEIGHT px" # Resolution split RIGHT_PERCENTAGE="$((100 - $VERTICAL_SPLIT))" RIGHT_RES_WIDTH="$(($DISPLAY_WIDTH * $RIGHT_PERCENTAGE / 100))" LEFT_RES_WIDTH="$(($DISPLAY_WIDTH - $RIGHT_RES_WIDTH))" # Calculate screen split RIGHT_MM_WIDTH="$(($MONITOR_WIDTH * $RIGHT_PERCENTAGE / 100))" LEFT_MM_WIDTH="$(($MONITOR_WIDTH - $RIGHT_MM_WIDTH))" echo " LEFT screen: ${LEFT_RES_WIDTH}px ${LEFT_MM_WIDTH}mm" echo " RIGHT screen: ${RIGHT_RES_WIDTH}px ${RIGHT_MM_WIDTH}mm" # Split screen #~ xrandr --setmonitor VIRTUAL-LEFT "${LEFT_RES_WIDTH}/${LEFT_MM_WIDTH}x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+0+0" "$MONITOR_ID" #~ xrandr --setmonitor VIRTUAL-RIGHT "${RIGHT_RES_WIDTH}/${RIGHT_MM_WIDTH}x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+${LEFT_RES_WIDTH}+0" none xrandr --setmonitor VIRTUAL-LEFT "${LEFT_RES_WIDTH}/0x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+0+0" "$MONITOR_ID" xrandr --setmonitor VIRTUAL-RIGHT "${RIGHT_RES_WIDTH}/1x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+${LEFT_RES_WIDTH}+0" none xrandr --fb "${LEFT_RES_WIDTH}x${DISPLAY_HEIGHT}"Edit the variable VERTICAL_SPLIT so it reflects the percentage of the screen you want to show. If it is only 50% of the screen (only the left side), it would be
VERTICAL_SPLIT="50"
If it is 65 percent of the screen, it would be
VERTICAL_SPLIT="65"Save the file. Test it out first to see if it works (right-click, Execute or from the terminal, open a terminal and drag and drop the splitmyscript.sh file).
If it works, you can add the path to the file to your $HOME/.desktop-session/startup file so that it runs at startup. If you store the file in Documents, for example, the startup entry would look like:
# Split my screen $HOME/Documents/splitmyscript.shHope this helps. If it doesn’t work, let me know and I will try to help.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.January 22, 2021 at 12:11 am #50393Member
marcelocripe
::Hello kevinho500,
Welcome to antiX Linux and the forum.
Due to the diminutive used in his name, I imagine that we speak the same language.
When you start a topic or participate with a post, remember to check the option “Notify me of follow-up replies via email”.
marcelocripe
(Original text in Brazilian Portuguese)———-
Olá kevinho500,
Seja muito bem-vindo ao antiX Linux e ao fórum.
Devido ao diminutivo utilizado em seu nome, imagino que falamos o mesmo idioma.
Quando você inciar algum tópico ou participar com alguma postagem, lembre-se de marcar a opção “Notify me of follow-up replies via email”.
marcelocripe
(Texto original em Português do Brasil)January 22, 2021 at 12:21 am #50394Memberkevinho500
::https://photos.app.goo.gl/7wqG51iZ1FF9WBVJ6
Close to 50% would be ideal but it seems to me that the system did not recognize it. Considering that he apparently cut the screen instead of resizing it.
in the other values the configuration was better, but they are still high for my problem.'/home/kel/resolução' MONITOR: LVDS-1, 256 mm x 144 mm DISPLAY: 1366 px x 768 px LEFT screen: 957px 180mm RIGHT screen: 409px 76mm output list LVDS-1 add monitor LVDS-1 output name LVDS-1 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 43 () Value in failed request: 0x241 Serial number of failed request: 37 Current serial number in output stream: 38 X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 43 () Value in failed request: 0x242 Serial number of failed request: 37 Current serial number in output stream: 38 xrandr: specified screen 957x768 not large enough for output LVDS-1 (1366x768+0+0)- This reply was modified 2 years, 3 months ago by kevinho500.
January 22, 2021 at 12:37 am #50395Member
marcelocripe
::Hi Xecure,
This script / program is extremely useful and necessary for those who have a damaged corner of the notebook screen.
This program could become standard for antiX.
I tested it and managed to reduce it by up to 30%, included it in the “startup” file and it worked on antiX startup perfectly. It is another excellent solution. Congratulations!
Can I order more controls for positioning the screen to the right, up and down? If you allow me, I can also suggest another name for your program, something that has something to do with the screen, for example: “splitmyscreen”, “resizemyscreen” or whatever you prefer. You will need to choose a standard icon for it. If kevinho500 needs an icon for this program we can help you.
Thanks.
marcelocripe
(Original text in Brazilian Portuguese)———-
Olá, Xecure,
Este script/programa é extremamente útil e necessário para quem possui um dos cantos da tela do notebook danificada.
Este programa poderia se tornar padrão do antiX.
Eu testei e consegui reduzir em até 30%, incluí no arquivo “startup” e funcionou na inicialização do antiX perfeitamente. É mais uma excelente solução. Parabéns!
Eu posso pedir mais controles de posicionando a tela para a direita, para cima e para baixo? Se me permite, ainda, eu posso sugerir um outro nome para o seu programa, algo que tenha relação com a tela, por exemplo: “splitmyscreen”, “resizemyscreen” ou outro que você preferir. Faltará você escolher um ícone padrão para ele. Se o kevinho500 precisar de um ícone para este programa poderemos ajudá-lo.
Obrigado.
marcelocripe
(Texto original em Português do Brasil)January 22, 2021 at 1:47 am #50401Memberkevinho500
::I was curious and built a small script that would split the screen (you just need to write the percentage split) and only activate the left side of the split.
Create a file (for example “splitmyscript.sh”) and make it executable (right-click, properties, and activate all executable boxes). Then, open it in a text editor and paste:
#!/bin/bash # Right here (integer between 1 and 99) the left side split percentage VERTICAL_SPLIT="75" MY_MONITOR="$(xrandr | grep -v "^ " | grep -m1 " connected" )" MONITOR_ID="$(echo "$MY_MONITOR" | cut -d" " -f1)" MONITOR_WIDTH="$(echo "$MY_MONITOR" | rev | cut -d" " -f3 | rev | cut -d"m" -f1)" MONITOR_HEIGHT="$(echo "$MY_MONITOR" | rev | cut -d" " -f1 | rev | cut -d"m" -f1)" MON_RES_TEMP="$(echo "$MY_MONITOR" | cut -d" " -f3-6)" for word in $MON_RES_TEMP; do if [ $(echo $word | grep -c "+") -gt 0 ]; then DISPLAY_RES="$(echo $word | cut -d "+" -f1)" DISPLAY_WIDTH="$(echo $DISPLAY_RES | cut -d "x" -f1)" DISPLAY_HEIGHT="$(echo $DISPLAY_RES | cut -d"x" -f2)" break fi done echo "MONITOR: $MONITOR_ID, $MONITOR_WIDTH mm x $MONITOR_HEIGHT mm" echo "DISPLAY: $DISPLAY_WIDTH px x $DISPLAY_HEIGHT px" # Resolution split RIGHT_PERCENTAGE="$((100 - $VERTICAL_SPLIT))" RIGHT_RES_WIDTH="$(($DISPLAY_WIDTH * $RIGHT_PERCENTAGE / 100))" LEFT_RES_WIDTH="$(($DISPLAY_WIDTH - $RIGHT_RES_WIDTH))" # Calculate screen split RIGHT_MM_WIDTH="$(($MONITOR_WIDTH * $RIGHT_PERCENTAGE / 100))" LEFT_MM_WIDTH="$(($MONITOR_WIDTH - $RIGHT_MM_WIDTH))" echo " LEFT screen: ${LEFT_RES_WIDTH}px ${LEFT_MM_WIDTH}mm" echo " RIGHT screen: ${RIGHT_RES_WIDTH}px ${RIGHT_MM_WIDTH}mm" # Split screen #~ xrandr --setmonitor VIRTUAL-LEFT "${LEFT_RES_WIDTH}/${LEFT_MM_WIDTH}x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+0+0" "$MONITOR_ID" #~ xrandr --setmonitor VIRTUAL-RIGHT "${RIGHT_RES_WIDTH}/${RIGHT_MM_WIDTH}x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+${LEFT_RES_WIDTH}+0" none xrandr --setmonitor VIRTUAL-LEFT "${LEFT_RES_WIDTH}/0x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+0+0" "$MONITOR_ID" xrandr --setmonitor VIRTUAL-RIGHT "${RIGHT_RES_WIDTH}/1x${DISPLAY_HEIGHT}/${MONITOR_HEIGHT}+${LEFT_RES_WIDTH}+0" none xrandr --fb "${LEFT_RES_WIDTH}x${DISPLAY_HEIGHT}"Edit the variable VERTICAL_SPLIT so it reflects the percentage of the screen you want to show. If it is only 50% of the screen (only the left side), it would be
VERTICAL_SPLIT="50"
If it is 65 percent of the screen, it would be
VERTICAL_SPLIT="65"Save the file. Test it out first to see if it works (right-click, Execute or from the terminal, open a terminal and drag and drop the splitmyscript.sh file).
If it works, you can add the path to the file to your $HOME/.desktop-session/startup file so that it runs at startup. If you store the file in Documents, for example, the startup entry would look like:
# Split my screen $HOME/Documents/splitmyscript.shHope this helps. If it doesn’t work, let me know and I will try to help.
When I ran at startup worked perfectly.
Thank u so muchJanuary 22, 2021 at 2:21 pm #50420Member
Xecure
::When I ran at startup worked perfectly.
That is great. You will probably benefit from a split percentage of around 65%, based on your screenshots. You will probably find the correct percentage.
You will also have to remove a lot of icons from the icewm panel so there is more space to see the names of opened programs.This program could become standard for antiX.
Not a real full program. No need for any icon or launcher. It is a simple script without any interface to be launched from the startup file. Nothing fancy.
Can I order more controls for positioning the screen to the right, up and down?
This program is a bit specific. It will probably not work properly if there are two monitors connected, as I was only thinking in this case scenario. Adding more options can lead to more bugs, as I still don’t understand xrandr (the program that changes the screen, monitor and resolution configuration) too well. If anyone with any xrandr knowledge saw this script, they could point out many mistakes and things that are wrong. This script is a concept that works for this specific case.
If you need one specific script, let me know and I will try to customize it for that specific use, and test to see if it works on my laptop first.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.January 22, 2021 at 3:32 pm #50430Member
marcelocripe
::Xecure wrote:
If you need one specific script, let me know and I will try to customize it for that specific use, and test to see if it works on my laptop first.Yes Xecure, I know of some notebook cases that have a damaged screen and the value of maintaining the screen exceeds the value of the notebook itself. The defects of the screens are in very specific places, either to the left side, or to the right side, or above or below the screen. To use these notebooks, we use tube monitors to display the notebook’s image. But with your program in its current configuration, it allows us to use this script on the screens that are damaged on the right side, in this way, these notebooks can be used without the need for a monitor connected to the VGA port. This means releasing a monitor that can be used on a computer or other notebook when the screen is in much worse condition.
I’m smart not asking too much … Your program is perfect! I don’t know if it is only necessary to replace “LEFT” with “RIGHT” and vice versa in the code to work the movement of the image to the opposite side, I will test this. This feature of moving the screen exists (mainly) in tube monitors. If you can make three other scripts available: one that moves the screen to the right side, another that moves the screen down and another that moves the screen up, we will have all the solutions in separate files, and I would be very grateful.
The case of @ kevinho500 seems to be something isolated, but it is not … And you managed to do it again, allowing several people who have notebooks with a damaged screen on the right side to use the notebook without depending on a monitor. Respecting the proportions of all your magnificent work and time spent, it is something similar to what you have already done (at least the ones I am aware of) with the ISO “antiX-19-legacy-bet2_386-base.iso”, the “my-offline-repo-0118.zip”, “antix-wifi-switch” and etc. Unfortunately, you and I, we cannot count the number of people who have benefited and the people who are users of your solutions, only those who really need these solutions that you have created who really know the value and importance of their creation.
Thank you very much Xecure.
marcelocripe
(Original text in Brazilian Portuguese)———-
Sim Xecure, eu conheço alguns casos de notebook que estão com a tela danificada e o valor da manutenção da tela excede o valor do próprio notebook. Os defeitos das telas estão em locais bem específicos, ou para o lado esquerdo, ou para o lado direito, ou em cima ou em baixo da tela. Para utilizar estes notebook, utilizamos os monitores de tubo para exibir a imagem do notebook. Mas com o seu programa na atual configuração que está, nos permitem utilizar este script nas telas que estiverem danificadas no lado direito, desta forma, estes notebook poderão ser utilizados sem a necessidade do monitor conectado na porta VGA. Isso significa liberar um monitor que poderá ser utilizado em um computador ou em outro notebook que a tela esteja em condições muito piores.
Eu esperto não estar pedindo demais… É que o seu programa é perfeito! Eu não sei se é só substituir “LEFT” por “RIGHT” e vice-versa no código para funcionar o movimento da imagem para o lado oposto, eu vou testar isso. Este recurso de movimentar a tela existe (principalmente) nos monitores de tubos. Se você puder disponibilizar outros três scripts: um que movimente a tela para o lado direito, outro que movimente a tela para baixo e outro que movimente a tela para cima, teremos todas as soluções em arquivos separados, e eu, ficarei muito grato.
O caso do @kevinho500 parece ser algo isolado, mas não é … E você conseguiu fazer isso novamente, permitir que várias pessoas que tenham notebooks com a tela danificada no lado direito possam utilizar o notebook sem depender de um monitor. Respeitando as devidas proporções de todo o seu trabalho magnífico e tempo desprendido, é algo semelhante ao que você já fez (ao menos os que eu tenho ciência) com a ISO “antiX-19-legacy-bet2_386-base.iso”, o “my-offline-repo-0118.zip”, “antix-wifi-switch” e etc. Infelizmente, você e eu, não temos como contabilizar a quantidade de pessoas que foram beneficiadas e as pessoas que são usuários das suas soluções, só quem realmente precisa destas soluções que você criou que realmente sabe do valor e da importância da sua criação.
Muito obrigado Xecure.
marcelocripe
(Texto original em Português do Brasil)January 22, 2021 at 4:07 pm #50439Member
Xecure
::Thanks for letting me know. I will try to edit the code and make it as flexible as possible to fit your needs, but I cannot promise anything. If I cannot deliver y tonight, I will try tomorrow. I will let you know via Private Message if I encounter any problems.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.January 23, 2021 at 12:18 pm #50498Member
Xecure
::Sorry for hijacking your thread, kevinho500. I will publish the script here and no longer post here. Let us not saturate this thread. If anyone else is interested, send me a Private Message.
After many tests I have created a script that lets you reduce the screen and place it anywhere in the monitor with some restrictions:
MINIMUM horizontal size of the new reduced screen will be 50% of the original (maximum is 100%)
MINIMUM vertical size of the new reduced screen will be 50% of the original (maximum is 100%)
Smaller than 50% is unusable (and gives some problems with the script).I have also disabled the script in case it detects a monitor connected. This way it will not also reduce the external monitor screen (as it normally starts in mirror mode).
I have changed the wording of variables, and no longer call it “split” but “Use” (as in percentage use of the original monitor). I would now call this script “reduce-screen.sh” (but you can name it however you like).
Variables you can change (close to the top of the screen):
HORIZONTAL_USE – Percentage of the horizontal screen to use, from 50 (half) to 100(%).
VERTICAL_USE – Percentage of the vertical screen to use, from 50 (half) to 100 (all the ).
HOR_OFFSET_PER – separation from the left border of the monitor. 0 is completely to the left. 100 is completely to the right.
VER_OFFSET_PER – separation from the top border of the monitor. 0 sticks the reduced screen to the top, 100 to the bottom.This is the script:
#!/bin/bash ################################################ ## ^ ## ## L TOP offset ## ## E ^ ## ## F %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## ## T % ^ % ## ##< - >%<--- Horizontal Use (percent)--^-->% ## ## o % ================== ^ % ## ## f % = REDUCED SCREEN = Vetical% ## ## f % ================== Use % ## ## s % ^ % ## ## e % ^ % ## ## t %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ## ## ## ################################################ # Set the percentage of the vertical and horizontal total of the screen HORIZONTAL_USE="75" #(from 50 (half) to 100% of the horizontal screen) VERTICAL_USE="80" #(from 50 (half) to 100% of the vertical screen) # Set the vertical and horizontal Offset (percentage) from the monitor borders HOR_OFFSET_PER="100" # from 0, screen is positioned on the left, 100 on the right VER_OFFSET_PER="50" # from 0, the new screen is at the top, 100 at the bottom ## Get Monitor information MY_MONITOR="$(xrandr | grep -v "^ " | grep " connected")" ## If dual monitor, exit script if [ $(echo "$MY_MONITOR" | grep -ic " connected") -gt 1 ]; then exit; fi ## Start processing monitor info. MONITOR_ID="$(echo "$MY_MONITOR" | cut -d" " -f1)" MONITOR_WIDTH="$(echo "$MY_MONITOR" | rev | cut -d" " -f3 | rev | cut -d"m" -f1)" MONITOR_HEIGHT="$(echo "$MY_MONITOR" | rev | cut -d" " -f1 | rev | cut -d"m" -f1)" MON_RES_TEMP="$(echo "$MY_MONITOR" | cut -d" " -f3-6)" for word in $MON_RES_TEMP; do if [ $(echo $word | grep -c "+") -gt 0 ]; then DISPLAY_RES="$(echo $word | cut -d "+" -f1)" DISPLAY_WIDTH="$(echo $DISPLAY_RES | cut -d "x" -f1)" DISPLAY_HEIGHT="$(echo $DISPLAY_RES | cut -d"x" -f2)" break fi done ## Reset screen xrandr --delmonitor VIRTUAL-MAIN xrandr --delmonitor VIRTUAL-SEC xrandr --verbose --fb "${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}" ## Check that all previous inputs are valid numbers VARIABLE_LIST="HORIZONTAL_USE VERTICAL_USE HOR_OFFSET_PER VER_OFFSET_PER" LOWER_LIMIT=50 UPPER_LIMIT=100 for word in $VARIABLE_LIST; do VARIABLE_CHECK="$(eval "echo \${$word}")" echo "Checking validity of $word = $VARIABLE_CHECK" if [[ $VARIABLE_CHECK =~ ^-?[0-9]+$ ]]; then # Maximum screensize is UPPER_LIMIT (generaly 100%) if [ $VARIABLE_CHECK -gt $UPPER_LIMIT ]; then eval "$word=$UPPER_LIMIT" # If this is an offset word elif [ $(echo "$word" | grep -c "OFFSET") -eq 1 ]; then # Minimum of OFFSET is 0 if [ $VARIABLE_CHECK -lt 0 ]; then eval "$word=0"; fi # Minimum screensize is LOWER_LIMIT (generaly, 50%) elif [ $VARIABLE_CHECK -lt $LOWER_LIMIT ]; then eval "$word=$LOWER_LIMIT" fi # If not an integer, always default to UPPER_LIMIT (generaly 100%) else eval "$word=$UPPER_LIMIT"; fi VARIABLE_CHECK="$(eval "echo \${$word}")" echo "Correction result is $word = $VARIABLE_CHECK" done ## CALCULATIONS FOR NEW SCREEN ## # Vertical split - resolution and position RIGHT_PERCENTAGE="$((100 - $HORIZONTAL_USE))" RIGHT_RES_WIDTH="$(($DISPLAY_WIDTH * $RIGHT_PERCENTAGE / 100))" LEFT_RES_WIDTH="$(($DISPLAY_WIDTH - $RIGHT_RES_WIDTH))" LEFT_OFFSET="$(($RIGHT_RES_WIDTH * $HOR_OFFSET_PER / 100))" # Horizontal split - resolution and position TOP_PERCENTAGE="$((100 - $VERTICAL_USE))" TOP_RES_HEIGHT="$(($DISPLAY_HEIGHT * $TOP_PERCENTAGE / 100))" BOTTOM_RES_HEIGHT="$((DISPLAY_HEIGHT - $TOP_RES_HEIGHT))" TOP_OFFSET="$(($TOP_RES_HEIGHT * $VER_OFFSET_PER / 100))" # Monitor split (mm) RIGHT_MM_WIDTH="$(($MONITOR_WIDTH * $RIGHT_PERCENTAGE / 100))" LEFT_MM_WIDTH="$(($MONITOR_WIDTH - $RIGHT_MM_WIDTH))" TOP_MM_HEIGHT="$(($MONITOR_HEIGHT * $TOP_PERCENTAGE / 100))" BOTTOM_MM_HEIGHT="$(($MONITOR_HEIGHT - $TOP_MM_HEIGHT))" # Inform user of calculations: echo "MONITOR: $MONITOR_ID, ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT} (${MONITOR_WIDTH}mm x ${MONITOR_HEIGHT}mm" echo "DESIRED SCREEN: ${LEFT_RES_WIDTH}(${HORIZONTAL_USE}%)x${BOTTOM_RES_HEIGHT}(${VERTICAL_USE}%) with ${LEFT_OFFSET}+${TOP_OFFSET} offset" # Correct Secondary virtual monitor if needed if [ $RIGHT_RES_WIDTH -eq 0 ] && [ $TOP_RES_HEIGHT -gt 0 ]; then RIGHT_RES_WIDTH="$LEFT_RES_WIDTH" RIGHT_MM_WIDTH="$LEFT_MM_WIDTH" elif [ $RIGHT_RES_WIDTH -gt 0 ] && [ $TOP_RES_HEIGHT -eq 0 ]; then TOP_RES_HEIGHT="$BOTTOM_RES_HEIGHT" TOP_MM_HEIGHT="$BOTTOM_MM_HEIGHT" fi echo "Secondary virtual monitor: $RIGHT_RES_WIDTH x $TOP_RES_HEIGHT" # Create the Virtual monitors echo "xrandr --setmonitor VIRTUAL-MAIN \"${LEFT_RES_WIDTH}/${LEFT_MM_WIDTH}x${BOTTOM_RES_HEIGHT}/${BOTTOM_MM_HEIGHT}+0+0\" \"$MONITOR_ID\"" xrandr --setmonitor VIRTUAL-MAIN "${LEFT_RES_WIDTH}/${LEFT_MM_WIDTH}x${BOTTOM_RES_HEIGHT}/${BOTTOM_MM_HEIGHT}+0+0" "$MONITOR_ID" echo "xrandr --setmonitor VIRTUAL-SEC \"${RIGHT_RES_WIDTH}/${RIGHT_MM_WIDTH}x${TOP_RES_HEIGHT}/${TOP_MM_HEIGHT}+0+0\" none" xrandr --setmonitor VIRTUAL-SEC "${RIGHT_RES_WIDTH}/${RIGHT_MM_WIDTH}x${TOP_RES_HEIGHT}/${TOP_MM_HEIGHT}+0+0" none # Check if offset is a positive number (make it negative) if [ $LEFT_OFFSET -gt 0 ]; then LEFT_OFFSET="-${LEFT_OFFSET}"; fi if [ $TOP_OFFSET -gt 0 ]; then TOP_OFFSET="-${TOP_OFFSET}"; fi ## Transform the screen xrandr --display :0.0 --output "$MONITOR_ID" --transform "1,0,${LEFT_OFFSET},0,1,${TOP_OFFSET},0,0,1" xrandr --verbose --fb "${LEFT_RES_WIDTH}x${BOTTOM_RES_HEIGHT}"Test it first before adding it to startup. Check that it works by restarting the session (Menu > Logout. In the window, select Restart Session). This way you don’t need to restart the system.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.January 23, 2021 at 12:53 pm #50502MemberPPC
::@Xecure – I bet your script will be a great help for users with damaged laptop screens… Why not add a link to it in the Wiki? [ I’m aware that most people, me included, suck at searching for answers in foruns/wikis, but at least, there’s a link we can point users in need to)
I tested the script but it worked pretty funky on my fluxbox/tint2 setup- automaticaly putting the toolbar on top, covering all open window’s title bar 🙂 )P.
January 23, 2021 at 2:04 pm #50509Member
Xecure
::I tested the script but it worked pretty funky on my fluxbox/tint2 setup- automaticaly putting the toolbar on top, covering all open window’s title bar 🙂 )
You are right there are some issues with some programs if they load before the screen reduction. I thought I had solved this by changing the order of some of the resolution resize and display placement. Most of my tests were on icewm (as most new users spend their time there), so there is probably still a lot of issues in other WMs (and even more if other programs are loaded before it).
Reloading the session may help, hopefully I can figure this out and improve it (and also add it to the wiki if there is interest).
Thanks for testing it and the kind words, PPC.
antiX Live system enthusiast.
General Live Boot Parameters for antiX.January 24, 2021 at 9:00 pm #50680Member
marcelocripe
::@Xecure,
I tested the new version of the program on the Rox-IceWM desktop, it was possible to reduce the size, position it to the four corners of the screen (top and bottom) and center it. The name “reduce-screen.sh” was also perfect when translating into my language …
The program will be very useful and this topic too, because when other people ask for help in cases of damaged screen, we will already have the solution.
Thank you!
Note:
There was a typo in my Brazilian Portuguese text, which reads: “I smart not be asking too much…”, the correct one is “I hope I’m not asking too much …”, caused the error in the translation of the internet translator for the English language. Therefore, where is “I’m smart not asking too much …”, the correct one is “I hope I’m not asking for too much …”. I apologize for any misunderstandings that may have occurred.
marcelocripe
(Original text in Brazilian Portuguese)———-
@Xecure,
Eu testei a nova versão do programa na área de trabalho Rox-IceWM, foi possível reduzir o tamanho, posicionar para os quatro cantos da tela (superior e inferior) e centralizar. O nome “reduce-screen.sh”, também ficou perfeito na tradução para o meu idioma…
O programa será de grande utilidade e este tópico também, pois quando outras pessoas solicitarem ajuda para os casos de tela danificada, já teremos a solução.
Muito obrigado!
Observação:
Ocorreu um erro de digitação no meu texto em idioma Português do Brasil, onde se lê: “Eu esperto não estar pedindo demais…”, o correto é “Eu espero não estar pedindo demais…”, causou o erro na tradução do tradutor da internet para o idioma Inglês. Por tanto, onde está “I’m smart not asking too much …”, o correto é “I hope I’m not asking for too much …”. Eu peço desculpas por qualquer mal entendido que possa ter ocorrido.
marcelocripe
(Texto original em Português do Brasil) -
AuthorPosts
- You must be logged in to reply to this topic.