Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevithakannan2 committed Aug 21, 2024
1 parent 14137d4 commit 7ad4212
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 40 deletions.
2 changes: 1 addition & 1 deletion src/commands/utils/bluetooth-control.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./common-script.sh
. ../common-script.sh

# Function to check bluetoothctl is installed
setupBluetooth() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/auto_detect_displays.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to auto-detect displays and set common resolution
auto_detect_displays() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/change_orientation.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to change monitor orientation
change_orientation() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/disable_monitor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

RESET='\033[0m'
BOLD='\033[1m'
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/duplicate_displays.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to duplicate displays
duplicate_displays() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/enable_monitor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

RESET='\033[0m'
BOLD='\033[1m'
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/extend_displays.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to extend displays
extend_displays() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/manage_arrangement.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to manage monitor arrangement
manage_arrangement() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/reset_scaling.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to reset scaling back to 1 (native resolution) for all monitors
reset_scaling() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/scale_monitor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to scale smaller monitors to the highest resolution of a bigger monitor
scale_monitors() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/set_primary_monitor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

# Function to set a monitor as primary
set_primary_monitor() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/monitor-control/set_resolutions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./utils/monitor-control/utility_functions.sh
. ./utility_functions.sh

RESET='\033[0m'
BOLD='\033[1m'
Expand Down
25 changes: 2 additions & 23 deletions src/commands/utils/monitor-control/utility_functions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./common-script.sh
. ../../common-script.sh

# Function to check bluetoothctl is installed
setup_xrandr() {
Expand Down Expand Up @@ -35,26 +35,6 @@ colored_echo() {
esac
}

# Function to check the display server type
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."

if ! confirm_action "Do you want to continue anyway?"; then
echo "Exiting script."
exit 1
fi

elif [ "$XDG_SESSION_TYPE" = "x11" ]; then
colored_echo "green" "You are using X11 (X-server)."
return 0
else
colored_echo "red" "Unable to determine the display server type."
exit 1
fi
}

# Function to execute xrandr commands and handle errors
execute_command() {
local command="$1"
Expand Down Expand Up @@ -91,5 +71,4 @@ confirm_action() {
}

checkEnv
setup_xrandr
check_display_server
setup_xrandr
4 changes: 0 additions & 4 deletions src/commands/utils/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ values = ["x11"]
name = "Set Resolution"
script = "monitor-control/set_resolutions.sh"

[[data.entries]]
name = "Set Resolution"
script = "monitor-control/set_resolutions.sh"

[[data.entries]]
name = "Duplicate Displays"
script = "monitor-control/duplicate_displays.sh"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/utils/wifi-control.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

. ./common-script.sh
. ../common-script.sh

# Function to check if NetworkManager is installed
setupNetworkManager() {
Expand Down

0 comments on commit 7ad4212

Please sign in to comment.