wip
This commit is contained in:
parent
e8026812a1
commit
70ed10f484
1 changed files with 34 additions and 9 deletions
29
install.sh
29
install.sh
|
@ -33,6 +33,28 @@ source-script() {
|
|||
fi
|
||||
}
|
||||
|
||||
check-powerstation() {
|
||||
local hn="$(hostname)"
|
||||
write-config() {
|
||||
echo "\$main = DP-1" >>"$HOME/.monitors.conf"
|
||||
echo "\$secondary = HDMI-A-1" >>"$HOME/.monitors.conf"
|
||||
echo "monitor = \$main, 3440x1440@165, 0x0, 1" >>"$HOME/.monitors.conf"
|
||||
echo "monitor = \$secondary, 2560x1440@95, 1600x-1440, 1" >>"$HOME/.monitors.conf"
|
||||
}
|
||||
|
||||
if [ "$hn" == 'cl-powerstation' ]; then
|
||||
if [ -e "$HOME/.monitors.conf" ]; then
|
||||
if ! grep -qi '3550x1440@165' <<<"$(cat $HOME/.monitors.conf)"; then
|
||||
write-config
|
||||
fi
|
||||
else
|
||||
write-config
|
||||
fi
|
||||
else
|
||||
return 69
|
||||
fi
|
||||
}
|
||||
|
||||
get-dependencies() {
|
||||
depends=(
|
||||
stow
|
||||
|
@ -251,6 +273,7 @@ __dep__() {
|
|||
}
|
||||
|
||||
__monitors__() {
|
||||
if ! check-powerstation; then
|
||||
if [ ! -e "$HOME/.monitors.conf" ]; then
|
||||
res="$(hyprctl monitors | grep -oP '\d+x\d+@\d+\.\d+' | head -n 1)"
|
||||
touch "$HOME/.monitors.conf"
|
||||
|
@ -260,6 +283,7 @@ __monitors__() {
|
|||
echo "monitor = preferred,, 0x0, 1" >>"$HOME/.monitors.conf"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_optional() {
|
||||
|
@ -267,6 +291,7 @@ pkg_optional() {
|
|||
"cowsay"
|
||||
"cmatrix"
|
||||
"trash-cli"
|
||||
"duf"
|
||||
)
|
||||
|
||||
for pkg in "${_opts[@]}"; do
|
||||
|
@ -329,9 +354,9 @@ c_fonts() {
|
|||
}
|
||||
|
||||
c_wallpapers() {
|
||||
local dirWallpaper="$HOME/.wallpapers"
|
||||
local dirWallpaper="$HOME/.wallpaper"
|
||||
if [[ ! -d "$dirWallpaper" ]]; then
|
||||
if confirm "Seems like you may miss some wallpapers.. Do you want to clone them now to $(pen blue bold $HOME/.wallpapers)?" </dev/tty; then
|
||||
if confirm "Seems like you may miss some wallpaper.. Do you want to clone them now to $(pen blue bold $HOME/.wallpaper)?" </dev/tty; then
|
||||
|
||||
if ! command_exists git; then
|
||||
spin "Installing dependencies.."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue