1
0
Fork 0

replaced pamac with paru

This commit is contained in:
Kim, Jimin 2022-05-04 09:54:00 +09:00
parent 5459a6628b
commit aa69f73c23
28 changed files with 54 additions and 111 deletions

View file

@ -11,7 +11,6 @@
"FOSS", "FOSS",
"geteuid", "geteuid",
"noto", "noto",
"pamac",
"pytermgui", "pytermgui",
"ungoogled" "ungoogled"
], ],

View file

@ -72,7 +72,7 @@
A built-in installer (using [archinstall](https://github.com/archlinux/archinstall)) will be added in the future. A built-in installer (using [archinstall](https://github.com/archlinux/archinstall)) will be added in the future.
In the meantime, use [archfi](https://github.com/MatMoul/archfi) instead. In the meantime, use [archfi](https://github.com/MatMoul/archfi) instead.
`sudo` and `wget` must be installed. [`sudo`](https://archlinux.org/packages/core/x86_64/sudo/) and [`wget`](https://archlinux.org/packages/extra/x86_64/wget/), and [`paru-bin`](https://aur.archlinux.org/packages/paru-bin/) must be installed.
2. Create a user. 2. Create a user.

View file

@ -1,4 +1,4 @@
[org/gnome/shell] [org/gnome/shell]
disable-user-extensions=false disable-user-extensions=false
enabled-extensions=['lockkeys@vaina.lt', 'freon@UshakovVasilii_Github.yahoo.com', 'sound-output-device-chooser@kgshank.net', 'cpupower@mko-sl.de', 'TwitchLive_Panel@extensions.maweki.de', 'remove-alt-tab-delay@daase.net', 'trayIconsReloaded@selfmade.pl', 'blur-my-shell@aunetx', 'babar@fthx', 'pop-shell@system76.com', 'pamac-updates@manjaro.org', 'flypie@schneegans.github.com', 'wandering-pixel@justinrdonnelly.github.com', 'mediacontrols@cliffniff.github.com', 'systemd-manager@hardpixel.eu', 'shell-volume-mixer@derhofbauer.at', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'auto-move-windows@gnome-shell-extensions.gcampax.github.com', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', 'launch-new-instance@gnome-shell-extensions.gcampax.github.com', 'places-menu@gnome-shell-extensions.gcampax.github.com', 'screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com', 'drive-menu@gnome-shell-extensions.gcampax.github.com', 'user-theme@gnome-shell-extensions.gcampax.github.com', 'window-list@gnome-shell-extensions.gcampax.github.com', 'windowsNavigator@gnome-shell-extensions.gcampax.github.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'extension-list@tu.berry', 'Vitals@CoreCoding.com', 'appindicatorsupport@rgcjonas.gmail.com', 'bluetooth-quick-connect@bjarosze.gmail.com', 'no-overview@fthx', 'nothing-to-say@extensions.gnome.wouter.bolsterl.ee', 'gnome-ui-tune@itstime.tech'] enabled-extensions=['lockkeys@vaina.lt', 'freon@UshakovVasilii_Github.yahoo.com', 'sound-output-device-chooser@kgshank.net', 'cpupower@mko-sl.de', 'TwitchLive_Panel@extensions.maweki.de', 'remove-alt-tab-delay@daase.net', 'trayIconsReloaded@selfmade.pl', 'blur-my-shell@aunetx', 'babar@fthx', 'pop-shell@system76.com', 'flypie@schneegans.github.com', 'wandering-pixel@justinrdonnelly.github.com', 'mediacontrols@cliffniff.github.com', 'systemd-manager@hardpixel.eu', 'shell-volume-mixer@derhofbauer.at', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'auto-move-windows@gnome-shell-extensions.gcampax.github.com', 'native-window-placement@gnome-shell-extensions.gcampax.github.com', 'launch-new-instance@gnome-shell-extensions.gcampax.github.com', 'places-menu@gnome-shell-extensions.gcampax.github.com', 'screenshot-window-sizer@gnome-shell-extensions.gcampax.github.com', 'drive-menu@gnome-shell-extensions.gcampax.github.com', 'user-theme@gnome-shell-extensions.gcampax.github.com', 'window-list@gnome-shell-extensions.gcampax.github.com', 'windowsNavigator@gnome-shell-extensions.gcampax.github.com', 'workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'extension-list@tu.berry', 'Vitals@CoreCoding.com', 'appindicatorsupport@rgcjonas.gmail.com', 'bluetooth-quick-connect@bjarosze.gmail.com', 'no-overview@fthx', 'nothing-to-say@extensions.gnome.wouter.bolsterl.ee', 'gnome-ui-tune@itstime.tech']
disabled-extensions=['advanced-alt-tab@G-dH.github.com', 'autohide-battery@sitnik.ru'] disabled-extensions=['advanced-alt-tab@G-dH.github.com', 'autohide-battery@sitnik.ru']

View file

@ -1,50 +0,0 @@
### Pamac configuration file
## When removing a package, also remove those dependencies
## that are not required by other packages (recurse option):
RemoveUnrequiredDeps
## How often to check for updates, value in hours (0 to disable):
RefreshPeriod = 3
## When no update is available, hide the tray icon:
#NoUpdateHideIcon
## When applying updates, enable packages downgrade:
EnableDowngrade
## When installing packages, do not check for updates:
SimpleInstall
## Allow Pamac to search and install packages from AUR:
EnableAUR
## Keep built packages from AUR in cache after installation:
#KeepBuiltPkgs
## When AUR support is enabled check for updates from AUR:
CheckAURUpdates
## When check updates from AUR support is enabled check for vcs updates:
CheckAURVCSUpdates
## AUR build directory:
BuildDirectory = /var/tmp
## Number of versions of each package to keep when cleaning the packages cache:
KeepNumPackages = 0
## Remove only the versions of uninstalled packages when cleaning the packages cache:
#OnlyRmUninstalled
## Download updates in background:
#DownloadUpdates
## Maximum Parallel Downloads:
MaxParallelDownloads = 4
#CheckFlatpakUpdates
#EnableSnap
#EnableFlatpak

View file

@ -1,5 +1,5 @@
from src.constants import content_dir from src.constants import content_dir
from src.util import pamac_install, copy_file from src.util import paru_install, copy_file
from os import makedirs from os import makedirs
@ -9,7 +9,7 @@ name = "Alacritty terminal"
def setup() -> None: def setup() -> None:
"""terminal app written in rust""" """terminal app written in rust"""
pamac_install("alacritty") paru_install("alacritty")
# copy configuration file # copy configuration file
copy_file( copy_file(

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "bat" name = "bat"
@ -6,4 +6,4 @@ name = "bat"
def setup(): def setup():
"""cat but better""" """cat but better"""
pamac_install("bat") paru_install("bat")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "Btop" name = "Btop"
@ -6,4 +6,4 @@ name = "Btop"
def setup(): def setup():
"""top but better""" """top but better"""
pamac_install("btop") paru_install("btop")

View file

@ -1,7 +1,7 @@
from src.util import pamac_install from src.util import paru_install
name = "Davinci Resolve" name = "Davinci Resolve"
def setup(): def setup():
pamac_install("davinci-resolve") paru_install("davinci-resolve")

View file

@ -1,4 +1,4 @@
from src.util import flatpak_install, pamac_install, copy_file from src.util import flatpak_install, paru_install, copy_file
from src.constants import content_dir from src.constants import content_dir
from src import log from src import log
from os import system from os import system
@ -52,7 +52,7 @@ def setup():
"""Discord and better discord""" """Discord and better discord"""
flatpak_install("com.discordapp.Discord") flatpak_install("com.discordapp.Discord")
pamac_install("betterdiscordctl-git") paru_install("betterdiscordctl-git")
copy_file( copy_file(
f"{content_dir}/home/pomp/.config/autostart/discord.desktop", f"{content_dir}/home/pomp/.config/autostart/discord.desktop",

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "fd" name = "fd"
@ -6,4 +6,4 @@ name = "fd"
def setup(): def setup():
"""find but modern and rusty""" """find but modern and rusty"""
pamac_install("fd") paru_install("fd")

View file

@ -1,4 +1,4 @@
from src.util import flatpak_install, pamac_install from src.util import flatpak_install, paru_install
name = "OBS studio" name = "OBS studio"
@ -12,4 +12,4 @@ def setup():
flatpak_install("com.obsproject.Studio") flatpak_install("com.obsproject.Studio")
pamac_install("obs-plugin-input-overlay-bin") paru_install("obs-plugin-input-overlay-bin")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "timshift" name = "timshift"
@ -6,4 +6,4 @@ name = "timshift"
def setup(): def setup():
"""System backup and restoring utility""" """System backup and restoring utility"""
pamac_install("timeshift") paru_install("timeshift")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "deno" name = "deno"
@ -10,4 +10,4 @@ def setup():
check .zshrc for bin path stuff check .zshrc for bin path stuff
""" """
pamac_install("deno") paru_install("deno")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
from os import system from os import system
from getpass import getuser from getpass import getuser
@ -8,7 +8,7 @@ name = "Docker"
def setup(): def setup():
"""Not a VM""" """Not a VM"""
pamac_install("docker") paru_install("docker")
system(f'sudo usermod -aG docker "{getuser()}"') system(f'sudo usermod -aG docker "{getuser()}"')
system("sudo systemctl --now enable docker") system("sudo systemctl --now enable docker")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = ".NET" name = ".NET"
@ -6,4 +6,4 @@ name = ".NET"
def setup(): def setup():
"""Microsoft java""" """Microsoft java"""
pamac_install("dotnet-sdk") paru_install("dotnet-sdk")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
from os import system from os import system
name = "git" name = "git"
@ -7,7 +7,7 @@ name = "git"
def setup(): def setup():
"""What's a branch?""" """What's a branch?"""
pamac_install("git") paru_install("git")
system('git config --global user.email "developomp@gmail.com"') system('git config --global user.email "developomp@gmail.com"')
system('git config --global user.name "developomp"') system('git config --global user.name "developomp"')

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "go" name = "go"
@ -6,4 +6,4 @@ name = "go"
def setup(): def setup():
"""Golang stuff""" """Golang stuff"""
pamac_install("go") paru_install("go")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "JDK" name = "JDK"
@ -13,4 +13,4 @@ def setup():
jdk11-openjdk: jdk11 jdk11-openjdk: jdk11
""" """
pamac_install(["jdk-openjdk", "jdk8-openjdk", "jdk11-openjdk"]) paru_install(["jdk-openjdk", "jdk8-openjdk", "jdk11-openjdk"])

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
from os import system from os import system
name = "node" name = "node"
@ -18,4 +18,4 @@ def setup():
check .zshrc for bin path stuff check .zshrc for bin path stuff
""" """
pamac_install(["nodejs", "nvm", "npm", "yarn"]) paru_install(["nodejs", "nvm", "npm", "yarn"])

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
from os import system from os import system
name = "rust" name = "rust"
@ -7,6 +7,6 @@ name = "rust"
def setup(): def setup():
"""The next C""" """The next C"""
pamac_install(["rust", "rustup"]) paru_install(["rust", "rustup"])
system("rustup install stable") system("rustup install stable")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "shfmt" name = "shfmt"
@ -6,4 +6,4 @@ name = "shfmt"
def setup(): def setup():
"""Shell formatter""" """Shell formatter"""
pamac_install("shfmt") paru_install("shfmt")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
from os import system from os import system
name = "virtualbox" name = "virtualbox"
@ -7,7 +7,7 @@ name = "virtualbox"
def setup(): def setup():
"""It's a computer inside a computer!""" """It's a computer inside a computer!"""
pamac_install( paru_install(
[ [
"virtualbox", "virtualbox",
"virtualbox-host-modules-arch", "virtualbox-host-modules-arch",

View file

@ -1,4 +1,4 @@
from src.util import pamac_install, smart_mkdir, download, unzip from src.util import paru_install, smart_mkdir, download, unzip
from src.constants import content_dir from src.constants import content_dir
from shutil import rmtree, move from shutil import rmtree, move
from os import remove, system from os import remove, system
@ -27,7 +27,7 @@ def setup():
ttf-baekmuk: Korean font ttf-baekmuk: Korean font
""" """
pamac_install( paru_install(
[ [
"noto-fonts-emoji", "noto-fonts-emoji",
"nerd-fonts-noto-sans-mono", "nerd-fonts-noto-sans-mono",

View file

@ -1,5 +1,6 @@
from src.util import pamac_install, load_dconf from src.util import paru_install, load_dconf
from src import log from src import log
from os import system
name = "Gnome extensions" name = "Gnome extensions"
@ -25,7 +26,7 @@ def setup():
gnome-shell-extension-pop-shell-git: window tiling extension gnome-shell-extension-pop-shell-git: window tiling extension
""" """
pamac_install( paru_install(
["gnome-shell-extension-installer", "gnome-shell-extension-pop-shell-git"] ["gnome-shell-extension-installer", "gnome-shell-extension-pop-shell-git"]
) )

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
from os import system from os import system
name = "Intel CPU undervolting" name = "Intel CPU undervolting"
@ -10,7 +10,7 @@ def setup():
https://wiki.archlinux.org/index.php/Undervolting_CPU https://wiki.archlinux.org/index.php/Undervolting_CPU
""" """
pamac_install("intel-undervolt") paru_install("intel-undervolt")
# #
# configuration # configuration

View file

@ -1,4 +1,4 @@
from src.util import pamac_install from src.util import paru_install
name = "middle click paste" name = "middle click paste"
post_install = ["restart"] post_install = ["restart"]
@ -7,4 +7,4 @@ post_install = ["restart"]
def setup(): def setup():
"""Prevents middle click paste""" """Prevents middle click paste"""
pamac_install("xmousepasteblock-git") paru_install("xmousepasteblock-git")

View file

@ -1,4 +1,4 @@
from src.util import pamac_install, copy_file from src.util import paru_install, copy_file
from src.constants import content_dir from src.constants import content_dir
from src import log from src import log
@ -11,7 +11,7 @@ name = "Zsh"
def setup(): def setup():
"""Objectively better shell""" """Objectively better shell"""
pamac_install("zsh") paru_install("zsh")
if not isdir("/home/pomp/.oh-my-zsh"): if not isdir("/home/pomp/.oh-my-zsh"):
log.log("zsh already configured. Skipping.") log.log("zsh already configured. Skipping.")

View file

@ -6,20 +6,19 @@ from os.path import dirname
import zipfile import zipfile
# todo: remove all uses of AUR (use pacman instead of pamac) def paru_install(packages: str | list[str]) -> None:
def pamac_install(packages: str | list[str]) -> None:
""" """
Download package from the arch repository and AUR. Download arch linux packages (including AUR).
arguments: arguments:
packages: space-separated list of packages. packages: Either a string list of packages or a space-separated list of packages.
""" """
if type(packages) == str: if type(packages) == str:
system(f"pamac install --no-confirm {packages}") system(f"paru -S --noconfirm {packages}")
elif type(packages) == list[str]: elif type(packages) == list[str]:
packages = packages.join(" ") packages = packages.join(" ")
system(f"pamac install --no-confirm {packages}") system(f"paru -S --noconfirm {packages}")
def flatpak_install(packages: str) -> None: def flatpak_install(packages: str) -> None:
@ -110,12 +109,6 @@ def setup_essentials():
sudo pacman -S --needed base-devel wget sudo pacman -S --needed base-devel wget
dconf dconf
# install pamac if it does not exist
if ! command -v pamac &>/dev/null; then
log "pamac was not installed already. Installing now..."
setup_pamac
fi
# install dialog if it's not installed already # install dialog if it's not installed already
if ! command -v dialog &>/dev/null; then if ! command -v dialog &>/dev/null; then
log "dialog was not installed already. Installing now..." log "dialog was not installed already. Installing now..."