mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-05 21:28:48 +00:00
fix: Launch script from the directory in which it's contained
This commit is contained in:
parent
1d5b1e6676
commit
d4489648b4
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
setupAlacritty() {
|
setupAlacritty() {
|
||||||
echo "Install Alacritty if not already installed..."
|
echo "Install Alacritty if not already installed..."
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
makeDWM(){
|
makeDWM(){
|
||||||
cd $HOME && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
|
cd $HOME && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
|
||||||
|
@ -24,4 +24,4 @@ setupDWM() {
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
setupDWM
|
setupDWM
|
||||||
makeDWM
|
makeDWM
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
setupKitty() {
|
setupKitty() {
|
||||||
echo "Install Kitty if not already installed..."
|
echo "Install Kitty if not already installed..."
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
setupRofi() {
|
setupRofi() {
|
||||||
echo "Install Rofi if not already installed..."
|
echo "Install Rofi if not already installed..."
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
# Function to install zsh
|
# Function to install zsh
|
||||||
install_zsh() {
|
install_zsh() {
|
||||||
|
@ -48,4 +48,4 @@ EOL
|
||||||
|
|
||||||
checkEnv
|
checkEnv
|
||||||
setup_zsh_config
|
setup_zsh_config
|
||||||
install_zsh
|
install_zsh
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installPkg() {
|
installPkg() {
|
||||||
echo "Install UFW if not already installed..."
|
echo "Install UFW if not already installed..."
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
# Check if the home directory and linuxtoolbox folder exist, create them if they don't
|
# Check if the home directory and linuxtoolbox folder exist, create them if they don't
|
||||||
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
installDepend() {
|
installDepend() {
|
||||||
## Check for dependencies.
|
## Check for dependencies.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
# Check if the home directory and linuxtoolbox folder exist, create them if they don't
|
# Check if the home directory and linuxtoolbox folder exist, create them if they don't
|
||||||
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
removeSnaps() {
|
removeSnaps() {
|
||||||
case $PACKAGER in
|
case $PACKAGER in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ./common-script.sh
|
. ../common-script.sh
|
||||||
|
|
||||||
fastUpdate() {
|
fastUpdate() {
|
||||||
case ${PACKAGER} in
|
case ${PACKAGER} in
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to auto-detect displays and set common resolution
|
# Function to auto-detect displays and set common resolution
|
||||||
auto_detect_displays() {
|
auto_detect_displays() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to change monitor orientation
|
# Function to change monitor orientation
|
||||||
change_orientation() {
|
change_orientation() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
RESET='\033[0m'
|
RESET='\033[0m'
|
||||||
BOLD='\033[1m'
|
BOLD='\033[1m'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to duplicate displays
|
# Function to duplicate displays
|
||||||
duplicate_displays() {
|
duplicate_displays() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
RESET='\033[0m'
|
RESET='\033[0m'
|
||||||
BOLD='\033[1m'
|
BOLD='\033[1m'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to extend displays
|
# Function to extend displays
|
||||||
extend_displays() {
|
extend_displays() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to manage monitor arrangement
|
# Function to manage monitor arrangement
|
||||||
manage_arrangement() {
|
manage_arrangement() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to reset scaling back to 1 (native resolution) for all monitors
|
# Function to reset scaling back to 1 (native resolution) for all monitors
|
||||||
reset_scaling() {
|
reset_scaling() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to scale smaller monitors to the highest resolution of a bigger monitor
|
# Function to scale smaller monitors to the highest resolution of a bigger monitor
|
||||||
scale_monitors() {
|
scale_monitors() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
# Function to set a monitor as primary
|
# Function to set a monitor as primary
|
||||||
set_primary_monitor() {
|
set_primary_monitor() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source ./utils/monitor-control/utility_functions.sh
|
source ./utility_functions.sh
|
||||||
|
|
||||||
RESET='\033[0m'
|
RESET='\033[0m'
|
||||||
BOLD='\033[1m'
|
BOLD='\033[1m'
|
||||||
|
|
|
@ -137,7 +137,10 @@ impl RunningCommand {
|
||||||
cmd.arg(prompt);
|
cmd.arg(prompt);
|
||||||
}
|
}
|
||||||
Command::LocalFile(file) => {
|
Command::LocalFile(file) => {
|
||||||
cmd.arg(file);
|
cmd.arg(&file);
|
||||||
|
if let Some(parent) = file.parent() {
|
||||||
|
cmd.cwd(parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Command::None => panic!("Command::None was treated as a command"),
|
Command::None => panic!("Command::None was treated as a command"),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user