tuirun debug
This commit is contained in:
41
.scripts/bin/tuirun-debug.sh
Executable file
41
.scripts/bin/tuirun-debug.sh
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
# Log file location
|
||||||
|
LOGFILE="/.cache/tuirun/tuirun-toggle.log"
|
||||||
|
# Redirect all output and errors to the log file
|
||||||
|
exec >>"$LOGFILE" 2>&1
|
||||||
|
# Enable command tracing
|
||||||
|
set -x
|
||||||
|
|
||||||
|
echo "Script started at $(date)"
|
||||||
|
|
||||||
|
# Log the environment variables
|
||||||
|
echo "Environment variables:"
|
||||||
|
env
|
||||||
|
|
||||||
|
# Define TERMINAL if not set
|
||||||
|
TERMINAL="${TERMINAL:-foot}"
|
||||||
|
echo "TERMINAL is set to: $TERMINAL"
|
||||||
|
|
||||||
|
# Ensure USER is set
|
||||||
|
USER="${USER:-$(whoami)}"
|
||||||
|
echo "USER is set to: $USER"
|
||||||
|
|
||||||
|
# Path to the tuirun executable
|
||||||
|
TUIRUN_PATH="/etc/profiles/per-user/$USER/bin/tuirun"
|
||||||
|
echo "TUIRUN_PATH is set to: $TUIRUN_PATH"
|
||||||
|
|
||||||
|
# Use absolute paths for commands
|
||||||
|
PGREP="/run/current-system/sw/bin/pgrep"
|
||||||
|
PKILL="/run/current-system/sw/bin/pkill"
|
||||||
|
HYPRCTL="/etc/profiles/per-user/$USER/bin/hyprctl"
|
||||||
|
|
||||||
|
echo "Checking if tuirun is already running..."
|
||||||
|
|
||||||
|
if "$PGREP" -f "$TERMINAL --title tuirun" >/dev/null; then
|
||||||
|
echo "Found existing tuirun process. Terminating..."
|
||||||
|
"$PKILL" -f "$TERMINAL --title tuirun"
|
||||||
|
else
|
||||||
|
echo "No existing tuirun process. Starting a new one..."
|
||||||
|
"$HYPRCTL" dispatch exec "$TERMINAL --title tuirun -e $TUIRUN_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Script finished at $(date)"
|
||||||
@@ -29,6 +29,14 @@ in {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
".local/bin/tuirun-debug.sh" = {
|
||||||
|
source = getExe (pkgs.writeShellApplication {
|
||||||
|
name = "tuirun-debug";
|
||||||
|
runtimeInputs = with pkgs; [hyprland]; # Add any required runtime dependencies here
|
||||||
|
text = readFile ./bin/tuirun-debug.sh; # Path to your tuirun-toggle.sh script
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
".local/bin/calcurse-toggle.sh" = {
|
".local/bin/calcurse-toggle.sh" = {
|
||||||
source = getExe (pkgs.writeShellApplication {
|
source = getExe (pkgs.writeShellApplication {
|
||||||
name = "calcurse-toggle";
|
name = "calcurse-toggle";
|
||||||
|
|||||||
38
flake.lock
generated
38
flake.lock
generated
@@ -250,11 +250,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726960811,
|
"lastModified": 1727008366,
|
||||||
"narHash": "sha256-dsXtISWmjHReplx9V18iCoEEKU9RcwmZJrIq0Jkzu3I=",
|
"narHash": "sha256-OiOHnf4l6XTjxsfj01m4Et+WmaMnYGey+nkdDbCTo0o=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "flake-firefox-nightly",
|
"repo": "flake-firefox-nightly",
|
||||||
"rev": "e202a3f7dd9c9d1016e47124bea4f44e7a551284",
|
"rev": "7fd582df23097fc56f14f07f37f1f332fb3f3840",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1058,11 +1058,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726600542,
|
"lastModified": 1727007123,
|
||||||
"narHash": "sha256-4ZP8rYtad1Z0LY3vZ1eYSRUzqPd3x7K0j7SpP3vReWc=",
|
"narHash": "sha256-B2WqDa4Sd7EVrGfxnVSCL39yOKWqn14vhhTGlbtd+48=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "lib-aggregate",
|
"repo": "lib-aggregate",
|
||||||
"rev": "e0cc0b05b0296fdc52fa683d47a3470dfe4f79ea",
|
"rev": "e4bb2b4962e79814c38862dce5eca90af3de6a3c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1211,11 +1211,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726362065,
|
"lastModified": 1726966855,
|
||||||
"narHash": "sha256-4h15WKdrs9zf6DGaeeV7ntU/pHHGkH6geYt1QBW0CP4=",
|
"narHash": "sha256-25ByioeOBFcnitO5lM/Mufnv/u7YtHEHEM8QFuiS40k=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "9db4db09d82e4b2207bfa7f1e747a4f49d214555",
|
"rev": "575704ff85d3a41dc5bfef7b55380cbc7b87f3c2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1401,11 +1401,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726995785,
|
"lastModified": 1727017850,
|
||||||
"narHash": "sha256-qpY9TCjtyhAeHa64NCyo3SoaHslxrrxQiMOPPY5lXEM=",
|
"narHash": "sha256-C361iPL0hyKNbCRpkU4MbaoGCN2Z1Tc3dqfO/0sbnKk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "474ea929fade537a0ba4f1e5b73abc0d157a293f",
|
"rev": "d65b8378613424be887a23730febc25a7a06c337",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1740,11 +1740,11 @@
|
|||||||
"systems": "systems_8"
|
"systems": "systems_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726998061,
|
"lastModified": 1727020217,
|
||||||
"narHash": "sha256-VgTXpSQuHQkSLvx3/lR8spnZK/iNniVoR3dcsQbEyQo=",
|
"narHash": "sha256-cJK0OiqwrFe84i73mhGqcA6kT7UtSFdOX5RtYamVXkA=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "05f2efc7135167613ef4b190efd7ba4e01c424d6",
|
"rev": "c030b08bd62ba3feebef4924623a27d4b57ffa9b",
|
||||||
"revCount": 24,
|
"revCount": 25,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.sr.ht/~canasta/tuirun"
|
"url": "https://git.sr.ht/~canasta/tuirun"
|
||||||
},
|
},
|
||||||
@@ -1792,11 +1792,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "nix",
|
"dir": "nix",
|
||||||
"lastModified": 1726976812,
|
"lastModified": 1727017570,
|
||||||
"narHash": "sha256-7LHyNF/IATpeDg+fLH4LnwGbK3IymdNHTPRNLXnIoZs=",
|
"narHash": "sha256-fRuqCC7CBlkDh5x7hJy7+4MJGcyiG2h3u7Xj47fZAsM=",
|
||||||
"owner": "wez",
|
"owner": "wez",
|
||||||
"repo": "wezterm",
|
"repo": "wezterm",
|
||||||
"rev": "1c4fdd3f7131785d0afaed08bed6cf1856f84328",
|
"rev": "16a8bcdd89653205b446628a3107c8292ae2ba0d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
Reference in New Issue
Block a user