mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 04:49:44 +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
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
setupAlacritty() {
|
||||
echo "Install Alacritty if not already installed..."
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh -e
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
makeDWM(){
|
||||
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
|
||||
setupDWM
|
||||
makeDWM
|
||||
makeDWM
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
setupKitty() {
|
||||
echo "Install Kitty if not already installed..."
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
setupRofi() {
|
||||
echo "Install Rofi if not already installed..."
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
# Function to install zsh
|
||||
install_zsh() {
|
||||
|
@ -48,4 +48,4 @@ EOL
|
|||
|
||||
checkEnv
|
||||
setup_zsh_config
|
||||
install_zsh
|
||||
install_zsh
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
installPkg() {
|
||||
echo "Install UFW if not already installed..."
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
# Check if the home directory and linuxtoolbox folder exist, create them if they don't
|
||||
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
installDepend() {
|
||||
## Check for dependencies.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
# Check if the home directory and linuxtoolbox folder exist, create them if they don't
|
||||
LINUXTOOLBOXDIR="$HOME/linuxtoolbox"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
removeSnaps() {
|
||||
case $PACKAGER in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
. ./common-script.sh
|
||||
. ../common-script.sh
|
||||
|
||||
fastUpdate() {
|
||||
case ${PACKAGER} in
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
# Function to auto-detect displays and set common resolution
|
||||
auto_detect_displays() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
# Function to change monitor orientation
|
||||
change_orientation() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
RESET='\033[0m'
|
||||
BOLD='\033[1m'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
# Function to duplicate displays
|
||||
duplicate_displays() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
RESET='\033[0m'
|
||||
BOLD='\033[1m'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
# Function to extend displays
|
||||
extend_displays() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
# Function to manage monitor arrangement
|
||||
manage_arrangement() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/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
|
||||
reset_scaling() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/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
|
||||
scale_monitors() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
# Function to set a monitor as primary
|
||||
set_primary_monitor() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
source ./utils/monitor-control/utility_functions.sh
|
||||
source ./utility_functions.sh
|
||||
|
||||
RESET='\033[0m'
|
||||
BOLD='\033[1m'
|
||||
|
|
|
@ -137,7 +137,10 @@ impl RunningCommand {
|
|||
cmd.arg(prompt);
|
||||
}
|
||||
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"),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user