Add i3 installs, sddm

This commit is contained in:
flyingscorpio@arch-desktop 2020-04-22 17:49:36 +02:00
parent af7d8e0614
commit e0456fde8d
3 changed files with 18 additions and 11 deletions

View file

@ -6,7 +6,6 @@ Shamelessly copied from https://github.com/dmerejkowsky/dotfiles.
"""
import argparse
import shlex
import subprocess
from typing import List, Optional
from urllib.request import urlretrieve
@ -42,7 +41,7 @@ class Installer:
if condition in conditions.keys():
return conditions[condition]
command = subprocess.run(shlex.split(condition), check=False)
command = subprocess.run(condition, check=False, shell=True)
return command.returncode == 0
@ -73,7 +72,7 @@ class Installer:
ui.info_2("Cloning", url, "->", pretty_dest)
git_command = "git clone {} {} --branch {}".format(url, p_dest, branch)
subprocess.run(shlex.split(git_command), check=True)
subprocess.run(git_command, check=True, shell=True)
def do_copy(self, src: str, dest: str) -> None:
"""Copy two files."""
@ -124,8 +123,9 @@ class Installer:
return
install = subprocess.run(
shlex.split(command),
command,
check=False,
shell=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
@ -144,7 +144,7 @@ class Installer:
ui.info(
ui.yellow,
"Please check if the package was really meant for {} systems."
"Are the packages really meant for {} systems?"
.format(self.operating_system)
)
@ -156,7 +156,7 @@ class Installer:
return
ui.info_2("Running", "`{}`".format(command))
subprocess.run(shlex.split(command), check=True)
subprocess.run(command, check=True, shell=True)
self.base_dir.chdir()
def do_symlink(self, src: str, dest: str) -> None:
@ -270,9 +270,10 @@ def define_os() -> str:
if operating_system in ("debian", "ubuntu"):
subprocess.run(
shlex.split("sudo apt update"),
stdout=subprocess.DEVNULL,
"sudo apt update",
check=True,
shell=True,
stdout=subprocess.DEVNULL,
)
return "debian based"

View file

@ -12,6 +12,9 @@ if [ -z "$GITHUB_DOTFILES" ]; then
fi
# Install required packages {{{
######
# OK #
######
if [ "$OS" = 'arch' ]; then
pacman -Qe i3-gaps || sudo pacman -S --needed i3
@ -31,9 +34,9 @@ fi
# }}}
# Add clones from GitHub {{{
############################
# OK NEED TO DO GIT UPDATE #
############################
######
# OK #
######
mkdir -p "$GITHUB_DOTFILES"

View file

@ -306,6 +306,9 @@ setup_bash_git_prompt() { # {{{
} # }}}
setup_i3() { # {{{
######
# OK #
######
# Update i3 configuration