This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NVIDIA_DEV=/dev/nvidia0 | |
BUMBLEBEE_SOCKET=/var/run/bumblebee.socket | |
function init { | |
set -e | |
# Create named pipes for talking with bumblebee | |
local input output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NVHDA_FILE="/proc/acpi/nvhda" | |
# Check all HDMI connections | |
while IFS= read -r; do | |
DRIVER=$(realpath "$(dirname "$REPLY")"/../device/driver) | |
if [ "$(basename "$DRIVER")" = "nvidia" ]; then | |
HDMI_CONNECTED=1 | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
platform_args="" | |
flatpak_args="" | |
# Check platform argument | |
case "$1" in | |
-electron) | |
platform=electron | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__ps1() { | |
local undo_color="\[\e[m\]" | |
local host_color="\[\e[38;5;153m\]" | |
local user_color="\[\e[38;5;172m\]" | |
if [ $EUID -eq 0 ]; then | |
user_color="\[\e[0;31m\]" | |
fi | |
echo "[$user_color\u$undo_color@$host_color\h$undo_color \W]" | |
} |