cleaned files

This commit is contained in:
acidburn
2023-04-29 20:35:25 -04:00
parent 3f022c1bbd
commit db25ff4a5d
7 changed files with 3 additions and 132 deletions
-41
View File
@@ -1,41 +0,0 @@
import subprocess
programs =[]
with open("data.txt", 'r') as file:
for line in file:
programs.append(line.strip())
print(programs)
try:
subprocess.check_call(['dnf', 'install', *programs])
except:
print(Exception())
'''
def programs_installed_check(programs):
missing_programs = []
for program in programs:
result = os.system(f"which {program} > /dev/null 2>&1")
if result != 0:
missing_programs.append(program)
if missing_programs:
print(f"The following programs are missing: {', '.join(missing_programs)}")
return False
else:
print("All programs are installed.")
return True
programs_to_check = ["awk", "sed", "grffffep"]
programs_installed_check(programs_to_check)
'''
-16
View File
@@ -1,16 +0,0 @@
import os
import subprocess
this_dir = os.getcwd()
for root ,b,files in os.walk(os.path.join(this_dir,'dotfiles')):
for element in files:
if '.sh' in element or '.py' in element:
try:
subprocess.run(f"chmod +x {os.path.join(root,element)}", shell=True)
except Exception():
print(Exception())
print(os.path.join(root,element))
-28
View File
@@ -1,28 +0,0 @@
import os
import subprocess
home = os.path.expanduser("~")
this = os.getcwd()
# list of relevant configs
lis = list(next(os.walk('.'))[1])
lis.append('picom.conf')
lis.remove('.git')
if ('desktop' in lis):
lis.remove('desktop')
if ( '.git'in lis ):
lis.remove('.git')
if ('.bachrc' in lis):
lis.remove('.bashrc')
if ('.zshrc' in lis) :
lis.remove('.zshrc')
destination = os.path.join(home,'.config')
# copying files recusrsively
for dir in lis:
source = os.path.join(home, 'repos/dotfiles', dir)
print(subprocess.run(f'cp -r {this} {destination}', shell=True))
-14
View File
@@ -1,14 +0,0 @@
import os
def dnf():
programs = []
with open('data.txt', 'r+') as f:
for line in f:
programs.append(line.strip())
print(programs)
print(os.getcwd())
-29
View File
@@ -1,29 +0,0 @@
import os
import gdown
import subprocess
import requests
current_dir = os.getcwd()
try :
os.mkdir('misic')
os.mkdir(os.path.join(home,'.fonts'))
except FileExistsError:
pass
os.chdir(os.path.join(current_dir,'misic'))
#### Fonts
# https://drive.google.com/drive/folders/1BciF4x3_K3T8p1Y17lHn_xWXnSAZpvDE
fonts_url = 'https://drive.google.com/uc?id=1-3g_CjiJHKhRrJNjjZeAYu9KIGIAAAhC'
output ='fonts-c.zip'
gdown.download(fonts_url,output, quiet=False)
subprocess.run(f"unzip {output} {os.path.join(home,'.fonts')}",stdout=subprocess.DEVNULL ,shell=True)
subprocess.run("fc-cache -f",stdout=subprocess.DEVNULL ,shell=True)
#### i3 autotiling
autotiling_url = 'https://raw.githubusercontent.com/nwg-piotr/autotiling/master/autotiling/main.py'
tiler = requests.get(autotiling_url, allow_redirects=True)
open('autotiling', 'wb').write(tiler.content)
subprocess.run('chmod +x autotiling', shell=True, stdout=subprocess.DEVNULL)
subprocess.run('cp autotiling /bin', shell=True, stdout=subprocess.DEVNULL)
+2 -3
View File
@@ -1,3 +1,2 @@
add popen themes send keyboard command ro restart i3
may need to move ohmy zsh add info logs
send keyboard command ro restart i3
+1 -1
View File
@@ -296,5 +296,5 @@ def msic_configs():
if __name__ == '__main__': if __name__ == '__main__':
logger.info(main()) main()