Пример #1
0
#  Git source:              github.com/manijamali2003/pyabr
#
#######################################################################################

import sys, subprocess

from libabr import Files, Control, Permissions, Colors, Process, Modules, Package, Commands, Res

modules = Modules()
files = Files()
control = Control()
colors = Colors()
process = Process()
permissions = Permissions()
pack = Package()
cmd = Commands()
res = Res()

## Check root ##
if not permissions.check_root(files.readall("/proc/info/su")):
    colors.show("paye", "perm", "")
    sys.exit(0)

## Check inputs ##
if sys.argv[1:] == []:
    colors.show("paye", "fail", "no inputs.")
    sys.exit(0)

option = sys.argv[1]

if option == "cl":
Пример #2
0
#  Git source:              github.com/PyFarsi/pyabr
#
#######################################################################################

from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5 import uic, QtGui, QtWidgets, QtCore
import sys, importlib, random, py_compile, imp
from libabr import System, App, Control, Files, Res, Commands

res = Res()
files = Files()
app = App()
control = Control()
commands = Commands()

f = QtGui.QFont()
f.setFamily('DejaVu Sans Mono')
f.setPointSize(12)


class FileListView(QListView):
    def format(self, it, text):
        if files.isdir(self.dir + '/' + text):
            it.setIcon(QIcon(res.get(res.etc('roller', 'folder-icon'))))
        else:
            format = it.whatsThis().split('.')
            format = max(format)
            if it.whatsThis().endswith(format):
                logo = control.read_record(format + '.icon', '/etc/ext')
Пример #3
0
#  Programmer & Creator:    Mani Jamali <*****@*****.**>
#  Gap channel: 			@pyabr
#  Gap group:   			@pyabr_community
#  Git source:              github.com/PyFarsi/pyabr
#
#######################################################################################

from PyQt5 import QtWidgets, uic, QtGui, QtCore
import sys, importlib, random, py_compile
from libabr import System, App, Control, Files, Res, Commands

res = Res()
files = Files()
app = App()
control = Control()
cmd = Commands()


class MainApp(QtWidgets.QMainWindow):
    def __init__(self, args):
        super(MainApp, self).__init__()

        # ports
        self.Backend = args[0]
        self.Env = args[1]
        self.Widget = args[2]
        self.AppName = args[3]
        self.External = args[4]

        # resize
        self.Widget.Resize(self, 700, 500)