modified: .gitignore
modified: data.conf modified: rice-cook.py
This commit is contained in:
+2
-1
@@ -2,4 +2,5 @@ project_vnv
|
|||||||
build
|
build
|
||||||
dist
|
dist
|
||||||
rice-cook.spec
|
rice-cook.spec
|
||||||
|
__pycache__
|
||||||
|
test.py
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ hyprpaper
|
|||||||
hyprpicker
|
hyprpicker
|
||||||
hyprutils
|
hyprutils
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
|
qt6ct
|
||||||
waybar
|
waybar
|
||||||
wl-copy
|
wl-copy
|
||||||
alacritty
|
|
||||||
pip
|
pip
|
||||||
flatpak
|
flatpak
|
||||||
neovim
|
neovim
|
||||||
@@ -31,10 +31,10 @@ qt6-qtwayland
|
|||||||
|
|
||||||
[Programs]
|
[Programs]
|
||||||
gnome-font-viewer
|
gnome-font-viewer
|
||||||
|
alacritty
|
||||||
gnome-software
|
gnome-software
|
||||||
kitty
|
kitty
|
||||||
ranger
|
ranger
|
||||||
gnome-software
|
|
||||||
nemo
|
nemo
|
||||||
|
|
||||||
[Flatpak]
|
[Flatpak]
|
||||||
|
|||||||
+116
-79
@@ -28,34 +28,23 @@ f_handler.setFormatter(formatter)
|
|||||||
logger.addHandler(f_handler)
|
logger.addHandler(f_handler)
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
format="%(asctime)s | %(levelno)s | %(funcName)s| %(message)s ",
|
format="%(asctime)s | %(levelno)s | %(funcName)s| %(message)s ", filename='logg.log', level=logging.WARNING
|
||||||
filename='logg.log', level=logging.WARNING
|
)
|
||||||
)
|
|
||||||
|
|
||||||
ap_theme = Theme({'ok':'green', 'error':'red', 'checked':'bold cyan','rule':'orange1'})
|
ap_theme = Theme({'ok': 'green', 'error': 'red', 'checked': 'bold cyan', 'rule': 'orange1'})
|
||||||
console = Console(theme=ap_theme)
|
console = Console(theme=ap_theme)
|
||||||
|
|
||||||
user = os.getlogin()
|
user = os.getlogin()
|
||||||
home = os.path.join('/home',user)
|
home = os.path.join('/home', user)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
setup = ''
|
setup = ''
|
||||||
# confirm_user =''
|
|
||||||
local_user = user
|
local_user = user
|
||||||
|
|
||||||
sudo_check()
|
sudo_check()
|
||||||
|
|
||||||
console.print(f"Setting up for user {local_user} ", style='rule')
|
console.print(f"Setting up for user {local_user} ", style='rule')
|
||||||
# while(True):
|
|
||||||
# confirm_user = input(" y/n ")
|
|
||||||
# if (confirm_user.lower() == 'n'):
|
|
||||||
# user := input('Type username : ')
|
|
||||||
# continue
|
|
||||||
# elif (confirm_user.lower() == 'y'):
|
|
||||||
# break
|
|
||||||
|
|
||||||
|
|
||||||
console.print('optimizing dnf.conf', style='ok')
|
console.print('optimizing dnf.conf', style='ok')
|
||||||
dnf_config()
|
dnf_config()
|
||||||
@@ -64,9 +53,9 @@ def main():
|
|||||||
hyprland()
|
hyprland()
|
||||||
msic_configs()
|
msic_configs()
|
||||||
|
|
||||||
#This should not need sudo
|
# This should not need sudo
|
||||||
# Pass D or L to copy_dotfiles function
|
# Pass D or L to copy_dotfiles function
|
||||||
while (True):
|
while True:
|
||||||
console.print('Set up dotfiles for Desktop (D) or Laptop (L) ?', style='rule')
|
console.print('Set up dotfiles for Desktop (D) or Laptop (L) ?', style='rule')
|
||||||
setup = input('>').lower()
|
setup = input('>').lower()
|
||||||
if setup == 'l' or setup == 'd':
|
if setup == 'l' or setup == 'd':
|
||||||
@@ -76,20 +65,20 @@ def main():
|
|||||||
executable_scripts()
|
executable_scripts()
|
||||||
systemd()
|
systemd()
|
||||||
|
|
||||||
#correcting ownership
|
# correcting ownership
|
||||||
subprocess.run(f"chown -R {user}:{user} {home}",shell=True ,stdout=subprocess.DEVNULL)
|
subprocess.run(f"chown -R {user}:{user} {home}", shell=True, stdout=subprocess.DEVNULL)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################
|
################
|
||||||
# END OF MAIN #
|
# END OF MAIN #
|
||||||
################
|
################
|
||||||
|
|
||||||
|
|
||||||
def dnf_config():
|
def dnf_config():
|
||||||
console.rule("Configuring dnf", style='checked')
|
console.rule("Configuring dnf", style='checked')
|
||||||
|
|
||||||
# dnf conf
|
# dnf conf
|
||||||
with open('/etc/dnf/dnf.conf' , 'r+') as f:
|
with open('/etc/dnf/dnf.conf', 'r+') as f:
|
||||||
text = 'max_parallel_downloads=10 \nfastestmirror=true'
|
text = 'max_parallel_downloads=10 \nfastestmirror=true'
|
||||||
match = re.search(r'(max_parallel_downloads=10)', f.read())
|
match = re.search(r'(max_parallel_downloads=10)', f.read())
|
||||||
if not match:
|
if not match:
|
||||||
@@ -100,24 +89,31 @@ def dnf_config():
|
|||||||
else:
|
else:
|
||||||
console.print(' dnf.conf already optimized :heavy_check_mark:', style='checked')
|
console.print(' dnf.conf already optimized :heavy_check_mark:', style='checked')
|
||||||
|
|
||||||
subprocess.check_call('sudo dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm',stdout=subprocess.DEVNULL, shell=True)
|
subprocess.check_call(
|
||||||
subprocess.check_call('sudo dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm',stdout=subprocess.DEVNULL, shell=True)
|
'sudo dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm',
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
shell=True,
|
||||||
|
)
|
||||||
|
subprocess.check_call(
|
||||||
|
'sudo dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm',
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
shell=True,
|
||||||
|
)
|
||||||
console.print('rpmfusion added to repos :heavy_check_mark:', style='ok')
|
console.print('rpmfusion added to repos :heavy_check_mark:', style='ok')
|
||||||
logger.info('rpmfusion added to repos')
|
logger.info('rpmfusion added to repos')
|
||||||
|
|
||||||
#update Dnf
|
# update Dnf
|
||||||
subprocess.run('dnf upgrade -y', shell=True)
|
subprocess.run('dnf upgrade -y', shell=True)
|
||||||
logger.info('Updated Dnf ')
|
logger.info('Updated Dnf ')
|
||||||
|
|
||||||
|
|
||||||
def hyprland():
|
def hyprland():
|
||||||
|
|
||||||
console.rule("Configuring hyprland", style='checked')
|
console.rule("Configuring hyprland", style='checked')
|
||||||
if not os.path.exists(home +'/.local/bin'):
|
if not os.path.exists(home + '/.local/bin'):
|
||||||
os.mkdir(home +'/.local/bin')
|
os.mkdir(home + '/.local/bin')
|
||||||
|
|
||||||
# create tty launcher
|
# create tty launcher
|
||||||
with open(home +'/.local/bin/wrappedhl', 'w+') as file:
|
with open(home + '/.local/bin/wrappedhl', 'w+') as file:
|
||||||
file.write('''#!/bin/sh
|
file.write('''#!/bin/sh
|
||||||
cd ~
|
cd ~
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
@@ -140,7 +136,7 @@ Type=Application ''')
|
|||||||
for line in file:
|
for line in file:
|
||||||
line.strip()
|
line.strip()
|
||||||
|
|
||||||
#making them executable
|
# making them executable
|
||||||
subprocess.run(f'chmod +x {home}/.local/bin/wrappedhl', shell=True)
|
subprocess.run(f'chmod +x {home}/.local/bin/wrappedhl', shell=True)
|
||||||
subprocess.run('chmod +x /usr/share/wayland-sessions/hyprland.desktop', shell=True)
|
subprocess.run('chmod +x /usr/share/wayland-sessions/hyprland.desktop', shell=True)
|
||||||
|
|
||||||
@@ -158,42 +154,41 @@ def install_programs_dnf():
|
|||||||
repos = parser.get('Repolist')
|
repos = parser.get('Repolist')
|
||||||
main = parser.get('Main')
|
main = parser.get('Main')
|
||||||
programs = parser.get('Programs')
|
programs = parser.get('Programs')
|
||||||
flatpaks= parser.get('Flatpak')
|
flatpaks = parser.get('Flatpak')
|
||||||
copr = parser.get('Copr')
|
copr = parser.get('Copr')
|
||||||
|
|
||||||
|
# try to add repos
|
||||||
#try to add repos
|
|
||||||
if repos:
|
if repos:
|
||||||
for url in repos:
|
for url in repos:
|
||||||
try:
|
try:
|
||||||
subprocess.run(f'sudo dnf config-manager addrepo --from-repofile={url}', shell=True)
|
subprocess.run(f'sudo dnf config-manager addrepo --from-repofile={url}', shell=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print(Exception(),":x:" , style='error')
|
console.print(Exception(), ":x:", style='error')
|
||||||
logging.critical(f"Error adding extra repos: {str(e)}")
|
logging.critical(f"Error adding extra repos: {str(e)}")
|
||||||
|
|
||||||
if copr:
|
if copr:
|
||||||
for id in copr:
|
for id in copr:
|
||||||
try:
|
try:
|
||||||
subprocess.run(f'sudo dnf copr enable -y {id}',shell=True)
|
subprocess.run(f'sudo dnf copr enable -y {id}', shell=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print(Exception(),":x:" , style='error')
|
console.print(Exception(), ":x:", style='error')
|
||||||
logging.critical(f"Err adding Copr: {str(e)}")
|
logging.critical(f"Err adding Copr: {str(e)}")
|
||||||
|
|
||||||
#for some reason they have to be passed to dnf individually
|
# for some reason they have to be passed to dnf individually
|
||||||
# instead of unpacked list *programs
|
# instead of unpacked list *programs
|
||||||
main.extend(programs)
|
main.extend(programs)
|
||||||
for program in main:
|
for program in main:
|
||||||
try:
|
try:
|
||||||
subprocess.run(f'dnf install -y {program} ', shell=True)
|
subprocess.run(f'dnf install -y {program} ', shell=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print(Exception(),":x:" , style='error')
|
console.print(Exception(), ":x:", style='error')
|
||||||
logging.critical(f"Error at Installing programs: {str(e)}")
|
logging.critical(f"Error at Installing programs: {str(e)}")
|
||||||
|
|
||||||
for fp in flatpaks:
|
for fp in flatpaks:
|
||||||
try:
|
try:
|
||||||
subprocess.run(f'flatpak install flathub -y {fp}', shell=True)
|
subprocess.run(f'flatpak install flathub -y {fp}', shell=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print(Exception(),":x:" , style='error')
|
console.print(Exception(), ":x:", style='error')
|
||||||
logging.critical(f"Error at Installing flatpaks: {str(e)}")
|
logging.critical(f"Error at Installing flatpaks: {str(e)}")
|
||||||
|
|
||||||
logger.info('Installed programs in data.config')
|
logger.info('Installed programs in data.config')
|
||||||
@@ -208,6 +203,7 @@ def sudo_check():
|
|||||||
else:
|
else:
|
||||||
console.print('ok :heavy_check_mark:', style='ok')
|
console.print('ok :heavy_check_mark:', style='ok')
|
||||||
|
|
||||||
|
|
||||||
# Oh my zsh setup + flathub
|
# Oh my zsh setup + flathub
|
||||||
def zsh_fonts():
|
def zsh_fonts():
|
||||||
console.rule("Installing Zsh fonts", style='checked')
|
console.rule("Installing Zsh fonts", style='checked')
|
||||||
@@ -215,12 +211,12 @@ def zsh_fonts():
|
|||||||
try:
|
try:
|
||||||
console.print("installing oh my zsh ", style='ok')
|
console.print("installing oh my zsh ", style='ok')
|
||||||
|
|
||||||
#installs oh my zsh
|
# installs oh my zsh
|
||||||
ohmy_url = "https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh"
|
ohmy_url = "https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh"
|
||||||
zsh_installer = requests.get(ohmy_url, timeout=10)
|
zsh_installer = requests.get(ohmy_url, timeout=10)
|
||||||
open('install.sh', 'wb').write(zsh_installer.content)
|
open('install.sh', 'wb').write(zsh_installer.content)
|
||||||
|
|
||||||
#removing exec line
|
# removing exec line
|
||||||
with open('install.sh', 'r') as f:
|
with open('install.sh', 'r') as f:
|
||||||
contents = f.read()
|
contents = f.read()
|
||||||
pattern = r'^\s*exec zsh -l$'
|
pattern = r'^\s*exec zsh -l$'
|
||||||
@@ -235,11 +231,17 @@ def zsh_fonts():
|
|||||||
|
|
||||||
console.print("installing oh my zsh auto suggestions ", style='ok')
|
console.print("installing oh my zsh auto suggestions ", style='ok')
|
||||||
# zsh auto suggestions
|
# zsh auto suggestions
|
||||||
subprocess.run(f'git clone https://github.com/zsh-users/zsh-autosuggestions {home}/.oh-my-zsh/custom/plugins/zsh-autosuggestions', shell=True)
|
subprocess.run(
|
||||||
|
f'git clone https://github.com/zsh-users/zsh-autosuggestions {home}/.oh-my-zsh/custom/plugins/zsh-autosuggestions',
|
||||||
|
shell=True,
|
||||||
|
)
|
||||||
|
|
||||||
console.print("installing powerlevel10k ", style='ok')
|
console.print("installing powerlevel10k ", style='ok')
|
||||||
#powerlevel 10k
|
# powerlevel 10k
|
||||||
subprocess.run(f"git clone --depth=1 https://github.com/romkatv/powerlevel10k.git {home}/.oh-my-zsh/custom/themes/powerlevel10k", shell=True)
|
subprocess.run(
|
||||||
|
f"git clone --depth=1 https://github.com/romkatv/powerlevel10k.git {home}/.oh-my-zsh/custom/themes/powerlevel10k",
|
||||||
|
shell=True,
|
||||||
|
)
|
||||||
logger.info('Installed Oh_my_zsh , powerlevel10k , autosuggestions')
|
logger.info('Installed Oh_my_zsh , powerlevel10k , autosuggestions')
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -248,36 +250,55 @@ def zsh_fonts():
|
|||||||
|
|
||||||
console.print("installing flathub", style='ok')
|
console.print("installing flathub", style='ok')
|
||||||
# flathub
|
# flathub
|
||||||
subprocess.run('flatpak remote-add --if-not-exists flathub https://flatInstalled programs in data.txthub.org/repo/flathub.flatpakrepo', shell=True, stdout=subprocess.DEVNULL)
|
subprocess.run(
|
||||||
|
'flatpak remote-add --if-not-exists flathub https://flatInstalled programs in data.txthub.org/repo/flathub.flatpakrepo',
|
||||||
|
shell=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
)
|
||||||
logger.info('Installed Flathub')
|
logger.info('Installed Flathub')
|
||||||
|
|
||||||
|
|
||||||
# copy and override dotfiles
|
# copy and override dotfiles
|
||||||
def copy_dotfiles(setup):
|
def copy_dotfiles(setup):
|
||||||
console.rule("Copying Dotfiles", style='checked')
|
console.rule("Copying Dotfiles", style='checked')
|
||||||
|
|
||||||
# list of relevant configs
|
# list of relevant configs
|
||||||
lis = os.listdir()
|
lis = os.listdir()
|
||||||
exceptions = ['.git', '.bashrc','.zshrc','retired','data.conf','wrappedhl','Hyprland','install.sh',
|
exceptions = [
|
||||||
'logg.log','README.md','.gitignore','rice-cook.py','Laptop-configs','.ideavimrc']
|
'.git',
|
||||||
|
'.bashrc',
|
||||||
|
'.zshrc',
|
||||||
|
'retired',
|
||||||
|
'data.conf',
|
||||||
|
'wrappedhl',
|
||||||
|
'Hyprland',
|
||||||
|
'install.sh',
|
||||||
|
'logg.log',
|
||||||
|
'README.md',
|
||||||
|
'.gitignore',
|
||||||
|
'rice-cook.py',
|
||||||
|
'Laptop-configs',
|
||||||
|
'.ideavimrc',
|
||||||
|
]
|
||||||
|
|
||||||
for z in exceptions:
|
for z in exceptions:
|
||||||
if z in lis:
|
if z in lis:
|
||||||
lis.remove(z)
|
lis.remove(z)
|
||||||
|
|
||||||
destination = os.path.join(home,'.config')
|
destination = os.path.join(home, '.config')
|
||||||
|
|
||||||
shutil.copy2('.zshrc',home)
|
shutil.copy2('.zshrc', home)
|
||||||
shutil.copy2('.p10k.zsh',home)
|
shutil.copy2('.p10k.zsh', home)
|
||||||
shutil.copy2('.vimrc',home)
|
shutil.copy2('.vimrc', home)
|
||||||
shutil.copy2('.ideavimrc',home)
|
shutil.copy2('.ideavimrc', home)
|
||||||
|
|
||||||
if (setup =='l'):
|
if setup == 'l':
|
||||||
console.print("Setting up dotfiles for Laptop", style='ok')
|
console.print("Setting up dotfiles for Laptop", style='ok')
|
||||||
# copying files recursively
|
# copying files recursively
|
||||||
for dir in lis:
|
for dir in lis:
|
||||||
print(subprocess.run(f'cp -r {dir} {destination}', shell=True))
|
print(subprocess.run(f'cp -r {dir} {destination}', shell=True))
|
||||||
|
|
||||||
elif (setup =='d'):
|
elif setup == 'd':
|
||||||
console.print("Setting up dotfiles for Desktop", style='ok')
|
console.print("Setting up dotfiles for Desktop", style='ok')
|
||||||
|
|
||||||
# copying files recursively
|
# copying files recursively
|
||||||
@@ -291,68 +312,79 @@ def copy_dotfiles(setup):
|
|||||||
def executable_scripts():
|
def executable_scripts():
|
||||||
console.rule('Making scripts executable', style='checked')
|
console.rule('Making scripts executable', style='checked')
|
||||||
|
|
||||||
for root ,_,files in os.walk(os.path.join(home,'.config')):
|
for root, _, files in os.walk(os.path.join(home, '.config')):
|
||||||
for element in files:
|
for element in files:
|
||||||
if '.sh' in element or '.py' in element:
|
if '.sh' in element or '.py' in element:
|
||||||
try:
|
try:
|
||||||
subprocess.run(f"chmod +x {os.path.join(root,element)}", shell=True)
|
subprocess.run(f"chmod +x {os.path.join(root, element)}", shell=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.critical(f"Error at executable_scripts: {str(e)}")
|
logging.critical(f"Error at executable_scripts: {str(e)}")
|
||||||
console.print("Job done :heavy_check_mark:", style='ok')
|
console.print("Job done :heavy_check_mark:", style='ok')
|
||||||
logger.info('Made scripts in .config executable')
|
logger.info('Made scripts in .config executable')
|
||||||
|
|
||||||
#need sudo
|
|
||||||
|
# need sudo
|
||||||
def msic_configs():
|
def msic_configs():
|
||||||
console.rule('Setting up final configs', style='checked')
|
console.rule('Setting up final configs', style='checked')
|
||||||
|
|
||||||
current_dir = os.getcwd()
|
current_dir = os.getcwd()
|
||||||
try :
|
try:
|
||||||
os.mkdir('misic')
|
os.mkdir('misic')
|
||||||
os.mkdir(os.path.join(home,'.themes'))
|
os.mkdir(os.path.join(home, '.themes'))
|
||||||
except FileExistsError:
|
except FileExistsError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
os.chdir(os.path.join(current_dir,'misic'))
|
os.chdir(os.path.join(current_dir, 'misic'))
|
||||||
|
|
||||||
fonts_url = "https://github.com/acidburnmonkey/fonts"
|
fonts_url = "https://github.com/acidburnmonkey/fonts"
|
||||||
fonts_dir = os.path.join(home,".fonts")
|
fonts_dir = os.path.join(home, ".fonts")
|
||||||
try:
|
try:
|
||||||
Repo.clone_from(fonts_url, fonts_dir)
|
Repo.clone_from(fonts_url, fonts_dir)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Failed to clone repository: {e}")
|
print(f"Failed to clone repository: {e}")
|
||||||
|
|
||||||
# to system
|
# to system
|
||||||
shutil.copytree(home+"/.fonts",'/usr/share/fonts/', dirs_exist_ok=True)
|
shutil.copytree(home + "/.fonts", '/usr/share/fonts/', dirs_exist_ok=True)
|
||||||
|
|
||||||
console.print("Fonts downloaded :heavy_check_mark:", style='ok')
|
console.print("Fonts downloaded :heavy_check_mark:", style='ok')
|
||||||
logger.info('Fonts downloaded ')
|
logger.info('Fonts downloaded ')
|
||||||
|
|
||||||
#Icons
|
# Icons
|
||||||
subprocess.run('git clone --depth 1 https://github.com/EliverLara/candy-icons.git /usr/share/icons/candy-icons', shell=True, stdout=subprocess.DEVNULL)
|
subprocess.run(
|
||||||
|
'git clone --depth 1 https://github.com/EliverLara/candy-icons.git /usr/share/icons/candy-icons',
|
||||||
|
shell=True,
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
)
|
||||||
console.print("Icons have been downloaded :heavy_check_mark:", style='ok')
|
console.print("Icons have been downloaded :heavy_check_mark:", style='ok')
|
||||||
logger.info('candy-icons downloaded')
|
logger.info('candy-icons downloaded')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
themes_urls =['https://drive.google.com/uc?id=1KkqC5vaBjePSHxjBI_8PWfm3jNW5gO7k','https://drive.google.com/uc?id=1-qq3wmuQhkKHpW_8OrRNS92AHD9LE4un'
|
themes_urls = [
|
||||||
,'https://drive.google.com/uc?id=1mxkN9b4Ws7CeqF_KaTlA3dA5e75UUa4y','https://drive.google.com/uc?id=1cYLRsxmWeQJMOS7QEGEgJenRPKxgwN7X']
|
'https://drive.google.com/uc?id=1KkqC5vaBjePSHxjBI_8PWfm3jNW5gO7k',
|
||||||
|
'https://drive.google.com/uc?id=1-qq3wmuQhkKHpW_8OrRNS92AHD9LE4un',
|
||||||
|
'https://drive.google.com/uc?id=1mxkN9b4Ws7CeqF_KaTlA3dA5e75UUa4y',
|
||||||
|
'https://drive.google.com/uc?id=1cYLRsxmWeQJMOS7QEGEgJenRPKxgwN7X',
|
||||||
|
]
|
||||||
|
|
||||||
for index,file in enumerate(themes_urls):
|
for index, file in enumerate(themes_urls):
|
||||||
output = str(index)+'.zip'
|
output = str(index) + '.zip'
|
||||||
gdown.download(file, output ,quiet=False)
|
gdown.download(file, output, quiet=False)
|
||||||
subprocess.run(f"unzip {output} -d {os.path.join(home,'.themes')}", shell=True, stdout=subprocess.DEVNULL)
|
subprocess.run(f"unzip {output} -d {os.path.join(home, '.themes')}", shell=True, stdout=subprocess.DEVNULL)
|
||||||
|
|
||||||
# to system
|
# to system
|
||||||
shutil.copytree(home+"/.themes",'/usr/share/themes/', dirs_exist_ok=True)
|
shutil.copytree(home + "/.themes", '/usr/share/themes/', dirs_exist_ok=True)
|
||||||
|
|
||||||
console.print("Themes have been downloaded :heavy_check_mark:", style='ok')
|
console.print("Themes have been downloaded :heavy_check_mark:", style='ok')
|
||||||
logger.info('Themes have been downloaded')
|
logger.info('Themes have been downloaded')
|
||||||
|
|
||||||
## Set themes Gtk
|
## Set themes Gtk
|
||||||
subprocess.run("gsettings set org.gnome.desktop.interface icon-theme 'candy-icons'", shell=True)
|
subprocess.run("gsettings set org.gnome.desktop.interface icon-theme 'candy-icons'", shell=True)
|
||||||
subprocess.run("gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Macchiato-Standard-Blue-Dark'", shell=True)
|
subprocess.run(
|
||||||
|
"gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Macchiato-Standard-Blue-Dark'", shell=True
|
||||||
|
)
|
||||||
subprocess.run("gsettings set org.gnome.desktop.interface font-name 'Roboto-Regular'", shell=True)
|
subprocess.run("gsettings set org.gnome.desktop.interface font-name 'Roboto-Regular'", shell=True)
|
||||||
|
|
||||||
#Flatpak force theme
|
# Flatpak force theme
|
||||||
subprocess.run("flatpak override --filesystem=$HOME/.themes", shell=True)
|
subprocess.run("flatpak override --filesystem=$HOME/.themes", shell=True)
|
||||||
subprocess.run("flatpak override --env=GTK_THEME=Catppuccin-Macchiato-Standard-Blue-Dark", shell=True)
|
subprocess.run("flatpak override --env=GTK_THEME=Catppuccin-Macchiato-Standard-Blue-Dark", shell=True)
|
||||||
console.print("Themes have been Set :heavy_check_mark:", style='ok')
|
console.print("Themes have been Set :heavy_check_mark:", style='ok')
|
||||||
@@ -365,7 +397,10 @@ def msic_configs():
|
|||||||
# codec and multimedia
|
# codec and multimedia
|
||||||
try:
|
try:
|
||||||
subprocess.run('dnf swap ffmpeg-free ffmpeg --allowerasing', shell=True)
|
subprocess.run('dnf swap ffmpeg-free ffmpeg --allowerasing', shell=True)
|
||||||
subprocess.run('dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin', shell=True)
|
subprocess.run(
|
||||||
|
'dnf update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin',
|
||||||
|
shell=True,
|
||||||
|
)
|
||||||
subprocess.run('dnf update @sound-and-video', shell=True)
|
subprocess.run('dnf update @sound-and-video', shell=True)
|
||||||
|
|
||||||
console.print("ffmpeg non free installed + all codecs :heavy_check_mark:", style='ok')
|
console.print("ffmpeg non free installed + all codecs :heavy_check_mark:", style='ok')
|
||||||
@@ -376,12 +411,16 @@ def msic_configs():
|
|||||||
console.print("Something failed with new codecs :X:", style='error')
|
console.print("Something failed with new codecs :X:", style='error')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def systemd():
|
def systemd():
|
||||||
console.rule('Enabling user services', style='checked')
|
console.rule('Enabling user services', style='checked')
|
||||||
|
|
||||||
user_services = ['gnome-keyring.service', 'ssh-agent.service', 'polkit-gnome-authentication-agent.service',
|
user_services = [
|
||||||
'hypridle.service','gnome-keyring-daemon.service']
|
'gnome-keyring.service',
|
||||||
|
'ssh-agent.service',
|
||||||
|
'polkit-gnome-authentication-agent.service',
|
||||||
|
'hypridle.service',
|
||||||
|
'gnome-keyring-daemon.service',
|
||||||
|
]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for services in user_services:
|
for services in user_services:
|
||||||
@@ -391,7 +430,5 @@ def systemd():
|
|||||||
console.print("Error starting some services :X:", style='error')
|
console.print("Error starting some services :X:", style='error')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user