mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 21:28:48 +00:00
Fix monitor utility not working in debian
This commit is contained in:
parent
4119804683
commit
eb5028e085
|
@ -5,7 +5,7 @@
|
|||
# Function to change monitor orientation
|
||||
change_orientation() {
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
clear
|
||||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
|
|
@ -13,7 +13,7 @@ CYAN='\033[36m'
|
|||
# Function to disable a monitor
|
||||
disable_monitor() {
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
clear
|
||||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
|
|
@ -13,7 +13,7 @@ CYAN='\033[36m'
|
|||
# Function to enable a monitor
|
||||
enable_monitor() {
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
clear
|
||||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Function to manage monitor arrangement
|
||||
manage_arrangement() {
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
clear
|
||||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
|
|
@ -9,7 +9,7 @@ reset_scaling() {
|
|||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
for monitor in "${monitor_array[@]}"; do
|
||||
echo -e "${CYAN}Resetting scaling for $monitor to 1x1 (native resolution)${RESET}"
|
||||
|
|
|
@ -9,7 +9,7 @@ scale_monitors() {
|
|||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
# Get the highest resolution among all monitors
|
||||
max_width=0
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Function to set a monitor as primary
|
||||
set_primary_monitor() {
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
clear
|
||||
echo -e "${BLUE}=========================================${RESET}"
|
||||
|
|
|
@ -13,7 +13,7 @@ CYAN='\033[36m'
|
|||
# Function to set resolutions
|
||||
set_resolutions() {
|
||||
monitor_list=$(detect_connected_monitors)
|
||||
IFS=$'\n' read -r -d '' -a monitor_array <<<"$monitor_list"
|
||||
IFS=$'\n' read -r -a monitor_array <<<"$monitor_list"
|
||||
|
||||
while true; do
|
||||
clear
|
||||
|
|
|
@ -40,9 +40,8 @@ check_display_server() {
|
|||
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
|
||||
colored_echo "red" "You are using Wayland."
|
||||
colored_echo "red" "This script is designed for X11. It may not work correctly on Wayland."
|
||||
read -p "Do you want to continue anyway? (y/n): " response
|
||||
|
||||
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
||||
if ! confirm_action "Do you want to continue anyway?"; then
|
||||
echo "Exiting script."
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user