Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

Multiple monitors under Ultimate Edition

Source code I have written openly published for your viewing pleasure.


Multiple monitors under Ultimate Edition

Postby TheeMahn » Mon Sep 24, 2012 5:10 pm

Love to see software I wrote in use and working. Makes it all worth while. Thanks for testing it gentlemen.


EDIT 02/16/14: Is one of your monitors a touchscreen? Have a look here. Re-wrote multi-monitor with preliminary support for touch screen monitors.
Changelog:
# ==============================================================================
#
# Change-log:
# 1.7.1-6 Initial public release
# 1.7.1-7 Added support for mirroring monitors
# 1.7.1-8 Added boot support.
# Added bash auto completion
# Code cleanup using software I have written (code-cleanup).
# 1.7.2 Added initial touch screen support. Will provide commands, but
# not implement touch screen calibration.
# Added scan function
# ==============================================================================


What is your resolution with dual monitors? Why I ask:
tonie@Tigger:~$ ./Conky-Builder.Sh
Ultimate Edition Conky builder version 1.22
Please report errors / issues to TheeMahn <TheeMahn@ultimateedition.info>
Warning: hddtemp is not installed, sudo apt-get install hddtemp
Codebase detected: raring
Release debugging info:
Ultimate_Edition
3.8
Ultimate Edition 3.8
====================
Kubuntu base not detected - even number release
Distro detected: Ultimate_Edition 3.8
Detected current resolution: 1920x2280
Resolution not programmed defaulting, please report detected resolution
above to <theemahn@ultimateedition.info>
expr: syntax error
Processor: AMD Athlon(TheeMahn) II X4 635 Processor resonating at 2909.554 Mhz
64 Bit O/S detected.
4 CPU core(s) Detected.
Update interval set: 3
MemTotal: 16353304 kB
No Swap detected; not going to populate Conky.
Network interfaces detected
eth0
eth1
lo
Scanning for active
Interface eth0: up
Active Network: eth0
Interface eth1: down
Interface lo: unknown
Active Monitoring Connection: eth0
SCANNING MOTHERBOARD FOR TEMP SENSOR(S)...
OBJECT DISCOVERED SENSOR
CPU NO N/A
FANSPEED NO N/A
GPU YES 81.3°F
MAIN-BOARD NO N/A
DEVICE MOUNTPOINT HDTEMP HDSIZE
rootfs / °F 63G
/dev/sda1 / N/A 63G
/dev/sdb1 3TB N/A 3.0T
/dev/sdc1 Storage N/A 250G
/dev/sdd1 multisystem N/A 127G
/dev/sde1 WINBLOWZ N/A 32G
/dev/sdf1 MUSHKIN N/A 61G
/dev/sdg1 Work N/A 1.0T
total 4.6T 2.3T 2.4T 50%
tonie@Tigger:~$


1920x2280, a dual monitor configuration. 1920 X 1080 on one and set below is a monitor with 1920 X 1200. Conky builder latest at time of edit will have to be re-written just because that resolution is not programmed 1920x2280. GF's Computer. Entered code into conky-builder:
Code: Select all
   1920x2280)
   DUAL=1
   AHW=78
   AARTY=74
   GRAPHWIDTH=480
   FONTSIZE=12
   echo "Dual monitors detected. Taking advantage of extra screen resources."
   echo "Setting font size to $FONTSIZE and graph width to $GRAPHWIDTH" ;;

A few minutes later after installation of hddtemp:
tonie@Tigger:~$ ./Conky-Builder.Sh
Ultimate Edition Conky builder version 1.23
Please report errors / issues to TheeMahn <TheeMahn@ultimateedition.info>
Error: SUID for hddtemp is not set, sudo dpkg-reconfigure hddtemp
Codebase detected: raring
Release debugging info:
Ultimate_Edition
3.8
Ultimate Edition 3.8
====================
Kubuntu base not detected - even number release
Distro detected: Ultimate_Edition 3.8
Detected current resolution: 1920x2280
Dual monitors detected. Taking advantage of extra screen resources.
Setting font size to 12 and graph width to 480
Processor: AMD Athlon(TheeMahn) II X4 635 Processor resonating at 2909.554 Mhz
64 Bit O/S detected.
4 CPU core(s) Detected.
Update interval set: 3
MemTotal: 16353304 kB
No Swap detected; not going to populate Conky.
Network interfaces detected
eth0
eth1
lo
Scanning for active
Interface eth0: up
Active Network: eth0
Interface eth1: down
Interface lo: unknown
Active Monitoring Connection: eth0
SCANNING MOTHERBOARD FOR TEMP SENSOR(S)...
OBJECT DISCOVERED SENSOR
CPU NO N/A
FANSPEED NO N/A
GPU YES 82.6°F
MAIN-BOARD NO N/A
DEVICE MOUNTPOINT HDTEMP HDSIZE
rootfs / °F 63G
/dev/sda1 / N/A 63G
/dev/sdb1 3TB N/A 3.0T
/dev/sdc1 Storage N/A 250G
/dev/sdd1 multisystem N/A 127G
/dev/sde1 WINBLOWZ N/A 32G
/dev/sdf1 MUSHKIN N/A 61G
/dev/sdg1 Work N/A 1.0T
total 4.6T 2.3T 2.4T 50%
tonie@Tigger:~$

Code: Select all
# 1.22   Check for install of hddtemp. Set as recommended in deb not required
#   Fixed errors spitting out when checking temp of USB / NAS drives.
#   Adjusted colors for Ultimate Edition 4.0
#   Adjusted mountpoints to strip username if applicable (12.10+ changed this)
#   Added check for SUID for hddtemp
#   Added Hard drive size detection & total filesystem capacity output info
#   Added Detecttion of root filesystem

# 1.23   Added support for 1920X2280 Dual monitor vertical orientation.


That is why I care... The error listed above, tells you how to rectify the situation. Conky-Builder will not do either of the above for you, however does inform you and instructs how to fix both situations. After doing as instructed:
tonie@Tigger:~$ ./Conky-Builder.Sh
Ultimate Edition Conky builder version 1.23
Please report errors / issues to TheeMahn <TheeMahn@ultimateedition.info>
Congradulations, hddtemp is properly configured. Temperature information will be populated.
Codebase detected: raring
Release debugging info:
Ultimate_Edition
3.8
Ultimate Edition 3.8
====================
Kubuntu base not detected - even number release
Distro detected: Ultimate_Edition 3.8
Detected current resolution: 1920x2280
Dual monitors detected. Taking advantage of extra screen resources.
Setting font size to 12 and graph width to 480
Processor: AMD Athlon(TheeMahn) II X4 635 Processor resonating at 2909.554 Mhz
64 Bit O/S detected.
4 CPU core(s) Detected.
Update interval set: 3
MemTotal: 16353304 kB
No Swap detected; not going to populate Conky.
Network interfaces detected
eth0
eth1
lo
Scanning for active
Interface eth0: up
Active Network: eth0
Interface eth1: down
Interface lo: unknown
Active Monitoring Connection: eth0
SCANNING MOTHERBOARD FOR TEMP SENSOR(S)...
OBJECT DISCOVERED SENSOR
CPU NO N/A
FANSPEED NO N/A
GPU YES 82.6°F
MAIN-BOARD NO N/A
WARNING: Drive /dev/sda1 doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net).
WARNING: See --help, --debug and --drivebase options.
/dev/sda1: SAMSUNG SSD 830 Series: no sensor
DEVICE MOUNTPOINT HDTEMP HDSIZE
rootfs / °F 63G
WARNING: Drive /dev/sda1 doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net).
WARNING: See --help, --debug and --drivebase options.
/dev/sda1: SAMSUNG SSD 830 Series: no sensor
/dev/sda1 / N/A 63G
/dev/sdb1 3TB 93°F 3.0T
/dev/sdc1 Storage 93°F 250G
/dev/sdd1 multisystem 93°F 127G
/dev/sde1 WINBLOWZ 93°F 32G
/dev/sdf1 MUSHKIN 93°F 61G
/dev/sdg1 Work N/A 1.0T
total 4.6T 2.3T 2.4T 50%
tonie@Tigger:~$

Hdtemps are picked up.

Ppl typically get a woody when they see my system sporting compiz on dual monitors. Those that do not run nix, ask can you make my computer do that? Do not feel bad about having windows. I have windows installed on my computer. I was recently plauged by a black screen of death. Yes, Linux does have one. Immenent hardware failure. Was going to use windows to flash my BIOS, completely unecessary clogged fan on my vid card. Goliath cleaned it and fixed it while I was at work. I have a aftermarket GPU cooler, he unseated it cleaned it and applied artic silver. Amazing how computer savvy that man is now. A guy that did not want anything to do with computers a year or so back. I do want to put it out there he has the most tempermental mainboard I have ever seen. When it works do not touch it. He is most likely going to send it back, 0 reviews on newegg when he bought it. Perhaps now revised.

On to the app:
Code: Select all
Multi-Monitor 1.7.2, 02/17/2014
GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word repomaster somewhere in the Subject: field.

Multi-Monitor is a part of the tm-tools package. Many of the tools are heavy and
are not intended to be ran by the common user. The tools are geared for the
admininstrator. Please see man tmtools for more info.

Usage: multi-monitor -<-COMMAND>
   possible [COMMAND]...
   -b   --boot         Set multi-monitor to load on bootup
   -d   --dual         Set xinerama for monitors
   -m   --mirror      Set mirror mode for monitors
   -s   --scan         Scans for monitors
   -h   --help         This help message
   -v   --version      Dump version info

multi-monitor --help [COMMAND] for further information.
theemahn@JackHammer:~$

Code: Select all
theemahn@JackHammer:~$ multi-monitor --scan
Multi-monitor Version: 1.7.2, Build date:02/17/2014.
GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word multi-monitor somewhere in the Subject: field.
3 Ports detected and 2 Monitors detected.
Enabling 2 monitors(s) and setting default resolution(s).

Touchscreen device detected: 3M 3M MicroTouch USB controller            id=11   
DEVICE:3M 3M MicroTouch USB controller
ID: 11

Port(s) connected:
HDMI-0
VGA-0

Default resolution(s):
   1920x1200      60.0*+
   1280x1024      60.0*+   75.0 
Command to be executed:
xrandr --output HDMI-0 --auto --output VGA-0 --auto --right-of HDMI-0
TO ENABLE TOUCHSCREEN CALIBRATION COMMANDS:
xsetwacom set "3M 3M MicroTouch USB controller" MapToOutput VGA-0
xsetwacom set 11 MapToOutput VGA-0
theemahn@JackHammer:~$ multi-monitor --dual
Multi-monitor Version: 1.7.2, Build date:02/17/2014.
GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word multi-monitor somewhere in the Subject: field.
3 Ports detected and 2 Monitors detected.
Enabling 2 monitors(s) and setting default resolution(s).

Touchscreen device detected: 3M 3M MicroTouch USB controller            id=11   
DEVICE:3M 3M MicroTouch USB controller
ID: 11

Port(s) connected:
HDMI-0
VGA-0

Default resolution(s):
   1920x1200      60.0*+
   1280x1024      60.0*+   75.0 
Command to be executed:
xrandr --output HDMI-0 --auto --output VGA-0 --auto --right-of HDMI-0
TO ENABLE TOUCHSCREEN CALIBRATION COMMANDS:
xsetwacom set "3M 3M MicroTouch USB controller" MapToOutput VGA-0
xsetwacom set 11 MapToOutput VGA-0
If you can read this we were successful.
If you would like to make changes permenant use boot switch.
theemahn@JackHammer:~$ xrandr --output HDMI-0 --auto --output VGA-0 --auto --right-of HDMI-0
theemahn@JackHammer:~$ xrandr --output HDMI-0 --auto --output VGA-0 --auto --left-of HDMI-0
theemahn@JackHammer:~$ xsetwacom set "3M 3M MicroTouch USB controller" MapToOutput VGA-0
theemahn@JackHammer:~$ xsetwacom set 11 MapToOutput VGA-0
theemahn@JackHammer:~$

ultimate-edition-multi-monitor_1.7.2_all.deb
Version 1.7.2 - With preliminary touchscreen support.
(5.95 KiB) Downloaded 353 times

ultimate-edition-multi-monitor_1.7.1-6_all.deb
(4.31 KiB) Downloaded 537 times


The Code (/bin/multi-monitor):
Code: Select all
#!/bin/bash
# Multi-Monitor - Multiple monitor detection xinerama script
# Script via TheeMahn <theemahn@ultimateedition.info>
#
# This script will detect ports and monitors enabling only monitors
# that are connected.
# title      :multi-monitor
# description   :detect monitors enabling only monitors that are connected.
# author   :Glenn Cady <theemahn@ultimateedition.info>
# date      :02/17/2014
# version   :1.7.2
# usage      :multi-monitor --help
# notes      :See change-log below for further information.
# bash_version   :4.2.8(1)-release
# ==============================================================================
#
# Change-log:
# 1.7.1-6    Initial public release
# 1.7.1-7   Added support for mirroring monitors
# 1.7.1-8   Added boot support.
#      Added bash auto completion
#      Code cleanup using software I have written (code-cleanup).
# 1.7.2      Added initial touch screen support.  Will provide commands, but
#      not implement touch screen calibration.
#      Added bash auto-completion
#      Added scan function
# ==============================================================================
# Multi-monitor(c) 2012 Glenn Cady under GNU GPL v2.0+ by
# Glenn Cady <theemahn@ultimateedition.info>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

MULTIMONITOR="1.7.2"
BUILDDATE="02/17/2014"

# set colors so errors etc. stand out.

txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
badgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'    # Text Reset


# provide info to user
function HEADER {
echo -e "${undwht}Multi-monitor Version: $MULTIMONITOR, Build date:$BUILDDATE.${txtrst}"
echo -e "${bldgrn}GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word multi-monitor somewhere in the Subject: field.${txtrst}"
}

function Scan {
   HEADER
   MONITORS=`xrandr | grep ' connected' -c`
   PORTS=`xrandr | grep 'connected' -c`
   TOUCHSCREEN=$(xinput --list | grep -i 'touch' | cut -d ' ' -f5-99 | sed 's/\[.*//g')
   ID=$(echo $TOUCHSCREEN | cut -d'=' -f2)
   echo -e "${bldgrn}$PORTS Ports detected and $MONITORS Monitors detected."
   echo -e "${bldgrn}Enabling $MONITORS monitors(s) and setting default resolution(s).${txtrst}"
   if [[ $TOUCHSCREEN ]]; then
      echo -e "\n${bldgrn}Touchscreen device detected: $TOUCHSCREEN"
      DEVICE=$(echo $TOUCHSCREEN | sed 's/ id=.*//g')
      echo -e "${bldgrn}DEVICE:$DEVICE"
      echo -e "${bldgrn}ID: $ID${txtrst}"
      
   fi
   echo ""
   echo "Port(s) connected: "
   xrandr | grep ' connected' | cut -d' ' -f1
   echo ""
   echo "Default resolution(s):"
   xrandr | grep '*+' | grep 'x'
   # begin detection & generate command to be executed.
   OUTPUTS=`xrandr | grep ' connected' | cut -d' ' -f1`
   PRIMARY=`xrandr | grep -m 1 ' connected' | cut -d' ' -f1`
   EXECUTE=""

   for CURRENT in $OUTPUTS
   do
      EXECUTE+="--output $CURRENT --auto "
   done
   EXECUTE+="--right-of $PRIMARY"
   echo "Command to be executed:"
   echo "xrandr $EXECUTE"
   
   if [[ $TOUCHSCREEN ]]; then
      echo -e "${bldred}TO ENABLE TOUCHSCREEN CALIBRATION COMMANDS:${txtrst}"
      echo "xsetwacom set \"$DEVICE\" MapToOutput VGA-0"
      echo "xsetwacom set "$ID" MapToOutput VGA-0"
   fi

   if [[ $1 != '-s' && $1 != '--scan' ]]; then
      echo -e ${bldgrn}"If you can read this we were successful.${txtrst}"
      echo -e "${bldgrn}If you would like to make changes permenant use boot switch.${txtrst}"
      xrandr $EXECUTE
   fi
}

function Boot {
   HEADER
   if [[ $2 == "" ]]; then
      echo "Command sympnosis: multi-monitor -b <on/off>"
      exit 0
   fi
   if [[ $2 == "on" ]]; then
      echo "Installing bootscript for multiple monitors."
      sudo cp /usr/share/ultimate_edition/multi-monitor.desktop /etc/xdg/autostart/
      exit 0
   fi

   if [[ $2 == "off" ]]; then
      echo "Removing bootscript for multiple monitors."
      sudo rm /etc/xdg/autostart/multi-monitor.desktop
   fi
}

function Mirror {
   HEADER
   MONITORS=`xrandr | grep ' connected' -c`
   PORTS=`xrandr | grep 'connected' -c`
   TOUCHSCREEN=$(xinput --list | grep -i 'touch' | cut -d ' ' -f5-99 | sed 's/\[.*//g')
   ID=$(echo $TOUCHSCREEN | cut -d'=' -f2)
   echo -e "${bldgrn}$PORTS Ports detected and $MONITORS Monitors detected."
   echo -e "${bldgrn}Enabling $MONITORS monitors(s) and setting default resolution(s).${txtrst}"
   if [[ $TOUCHSCREEN ]]; then
      echo -e "${bldgrn}Touchscreen detected: $TOUCHSCREEN"
      DEVICE=$(echo $TOUCHSCREEN | sed 's/ id=.*//g')
      echo -e "${bldgrn}DEVICE:$DEVICE"
      echo -e "${bldgrn}ID: $ID${txtrst}"
      
   fi
   echo ""
   echo "Port(s) connected: "
   xrandr | grep ' connected' | cut -d' ' -f1
   echo ""
   echo "Default resolution(s):"
   xrandr | grep '*+' | grep 'x'

# begin detection & generate command to be executed.
   OUTPUTS=`xrandr | grep ' connected' | cut -d' ' -f1`
   PRIMARY=`xrandr | grep -m 1 ' connected' | cut -d' ' -f1`
   EXECUTE="--output "

   for CURRENT in $OUTPUTS
   do
      EXECUTE+="$CURRENT --auto --same-as "
   done
   EXECUTE=$(echo $EXECUTE | sed -r 's/(.*)--auto.*/\1/')
   echo "Command to be executed: xrandr $EXECUTE"
#xrandr --output HDMI-0 --auto --mode 1920x1200 --same-as DVI-0
   echo "If you can read this we were successful."
   echo "If you would like to make changes permenent use boot switch."
# the below command will be implemented after feedback of bugs if any.
   xrandr $EXECUTE
   if [[ $TOUCHSCREEN ]]; then
      echo -e "${bldred}TO ENABLE TOUCHSCREEN CALIBRATION COMMANDS:${txtrst}"
      echo "xsetwacom set \"$DEVICE\" MapToOutput VGA-0"
      echo "xsetwacom set "$ID" MapToOutput VGA-0"
   fi
}

function Help() {
   if [[ $1 == "" ]];
   then
      PRAM="ALL"
   else
      PRAM=$1
   fi

   echo -e "${undwht}Multi-Monitor $MULTIMONITOR, $BUILDDATE${txtrst}"
   case $PRAM in
      ALL)
echo -e "${txtgrn}GNU multi-monitor home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word repomaster somewhere in the Subject: field.${txtrst}";
echo "
Multi-Monitor is a part of the tm-tools package. Many of the tools are heavy and
are not intended to be ran by the common user. The tools are geared for the
admininstrator. Please see man tmtools for more info.";
echo -e "
${bldwht}Usage: multi-monitor -<-COMMAND>${txtrst}
   possible [COMMAND]...
   -b   --boot         Set multi-monitor to load on bootup
   -d   --dual         Set xinerama for monitors
   -m   --mirror      Set mirror mode for monitors
   -s   --scan         Scans for monitors
   -h   --help         This help message
   -v   --version      Dump version info

${bldgrn}multi-monitor --help [COMMAND] for further information.${txtrst}";;
      ALL|b|boot)
         echo -e "
${bldwht}Usage boot;${txtrst}
${txtgrn}multi-monitor -b <on/off>${txtrst}
  Installs a startup script [on] to engage multi-monitor on boot up or
  removes [off] startup script.";;
      ALL|d|dual)
         echo -e "
${bldwht}Usage dual;${txtrst}
${txtgrn}multi-monitor -d${txtrst}
  Detects ports and monitors enabling only monitors that are conected
  and sets xinerama view spanning connected monitors.";;
      ALL|m|mirror)
         echo -e "
${bldwht}Usage mirror;${txtrst}
${txtgrn}multi-monitor -m${txtrst}
  Detect ports and monitors enabling only monitors that are conected
  and sets mirror view.";;
      ALL|v|version)
         echo -e "
${bldwht}Usage version;${txtrst}
${txtgrn}multi-monitor -v${txtrst}
  Displays multi-monitors version number and exits.";;
      ALL|h|help|\?)
         echo -e "
${bldwht}Useage Help [COMMAND];${txtrst}
${txtgrn}multi-monitor -h [COMMAND]${txtrst}
  Displays this message. Futher information multi-monitor help [COMMAND]
  or refer to the manpages.

man multi-monitor"
esac
exit 0
}

function Version {
HEADER
exit 0
}

case "$1" in
   -h|--help|-\?) Help $2; exit 0;;
   -v|--version) Version; exit 0;;
   -s|--scan) Scan $*; exit 0;;
   -d|--dual) Scan $*; exit 0;;
   -m|--mirror) Mirror $*; exit 0;;
   -b|--boot) Boot $*; exit 0;;
   *) Help; exit 0;;
esac

/etc/bash_completion.d/multi-monitor:
Code: Select all
# Debian multi-monitor(8) completion.

have multi-monitor &&
_multi-monitor()
{
   dashify()
   {
      local i

      for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
         if [ ${#COMPREPLY[i]} -le 2 ]; then
            COMPREPLY[i]=-${COMPREPLY[i]}
         else
            COMPREPLY[i]=--${COMPREPLY[i]}
         fi
      done
   }

   local cur cur_nodash prev

   COMPREPLY=()
   cur=${COMP_WORDS[COMP_CWORD]}
   cur_nodash=${cur#-}
   prev=${COMP_WORDS[COMP_CWORD-1][COMP_CWORD-2]}

   if [ $COMP_CWORD = 1 ]; then
      # first parameter on line
      case "$cur" in
      -b*)
         COMPREPLY=( $( compgen -W 'boot' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      -d*)
         COMPREPLY=( $( compgen -W 'dual' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      -h*)
         COMPREPLY=( $( compgen -W 'help' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      -m*)
         COMPREPLY=( $( compgen -W 'mirror' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      -s*)
         COMPREPLY=( $( compgen -W 'scan' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      -v*)
         COMPREPLY=( $( compgen -W 'version' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      --*)
         COMPREPLY=( $( compgen -W 'help dual mirror scan version' ${cur_nodash#-} ) )
         dashify;
         return 0
         ;;
      *)
         COMPREPLY=( $( compgen -W 'h d m v' \
                   $cur_nodash ) )
         dashify
         return 0
         ;;
      esac
   fi
   if [ $COMP_CWORD = 2 ]; then
      case "${COMP_WORDS[1]}" in
      --h*)
         # complete on list of relevant options
         COMPREPLY=( $( compgen -W 'help dual mirror version' ${cur_nodash#-} ) )
         #dashify;
         return 0
         ;;
      -h)
         # complete on list of relevant options
         COMPREPLY=( $( compgen -W 'help dual mirror version' ${cur_nodash#-} ) )
         #dashify;
         return 0
         ;;
      --b*)
         # boot long
         COMPREPLY=( $( compgen -W 'on off' ${cur_nodash#-} ) )
         dashify
         return 0
         ;;
      -b)
         # boot short
         COMPREPLY=( $( compgen -W 'on off' ${cur_nodash#-} ) )
         dashify
         return 0
         ;;
      esac
   fi
}
complete -F _multi-monitor multi-monitor



Enjoy, your feedback is appriciated.

TheeMahn
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: Over 50 TB total Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 0 used, Multiple NAS's on Gigabit AC wireless 3200 (Netgear X6 r8000)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers (just drug up the other 2 speakers today)
User avatar
TheeMahn
Site Admin
 
Posts: 4194
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer



Re: Multiple monitors under Ultimate Edition

Postby Gilgamesh777 » Mon Feb 17, 2014 3:56 am

I tip my hat to you :D :D Genius :D
Always forgive your enemies; nothing annoys them so much.”
User avatar
Gilgamesh777
U.E. Graduate
U.E. Graduate
 
Posts: 92
Joined: Wed Nov 13, 2013 11:03 am
Operating System: Ultimate Edition 3.1 64 BIT



Re: Multiple monitors under Ultimate Edition

Postby TheeMahn » Mon Feb 17, 2014 4:44 am

Thank you sir, funny I wrote that app back in 2012 & just now got around to revising it ;)
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: Over 50 TB total Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 0 used, Multiple NAS's on Gigabit AC wireless 3200 (Netgear X6 r8000)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers (just drug up the other 2 speakers today)
User avatar
TheeMahn
Site Admin
 
Posts: 4194
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer



Re: Multiple monitors under Ultimate Edition

Postby Acaster » Thu Feb 20, 2014 4:58 am

Does this work on monitors positioned one above the other or only side by side?

It's just that I'm not into gaming and never really saw the point in having a wide screen. I do a lot of work with documents which are portrait oriented and trying to use a wide screen with them can be a pain. To see the whole document I have to zoom out so far the text is difficult to read and when I zoom in close enough to be able to read it I can only get the top or the bottom of the document and already wore out one mouse wheel scrolling up and down.
I did try mounting a 19" wide screen sideways with the 1440 pixels vertical and the 900 horizontal on an elaborate wood structure bolted to the side of my
desk and both Ultimate Edition and bill gates' legacy handled it well but I couldn't get the bios boot and log in screens to reorient.
Also I know where to get a couple of 19" square monitors cheap and mounting one above the other is as simple as positioning the system unit behind the lower and sitting the upper on top.
Change ain't what it used to be

Ultimate Edition 3.0, 3.5, 3.5.1, 3.6, 3.8, 3.9, 4.2b & bgl
i5-760 @ 2.8 GHz cpu
MSI MS 7613 MainBoard
16 GigaBytes RAM
Hitachi 1 TB & Western Digitial 1 TB HDs
Radeon HD 5570
User avatar
Acaster
U.E. Graduate
U.E. Graduate
 
Posts: 53
Joined: Tue Jul 24, 2012 11:43 pm
Operating System: Ultimate Edition 3.1 64 BIT



Re: Multiple monitors under Ultimate Edition

Postby TheeMahn » Thu Jul 03, 2014 11:00 pm

Does not yet, yes it will. I will have to re-write it because of my GF's current configuration. I don't typically do much programming when I am here. She is running what will be Ultimate Edition 4.2 final and that is one thing that does not work correctly, bet I fix it so it does. When I see an issue I try to rectify the situation, however priorities are a release of multiple Operating systems in short order. It will currently sit on the burner.
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: Over 50 TB total Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 0 used, Multiple NAS's on Gigabit AC wireless 3200 (Netgear X6 r8000)
Monitors: 4K Samsung 28", HannsG HH281, Various others
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers (just drug up the other 2 speakers today)
User avatar
TheeMahn
Site Admin
 
Posts: 4194
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest