first commit
|
@ -0,0 +1,76 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# BldHelper-nightly.sh
|
||||||
|
# This script is meant to be run on the build server and expects to find and update itself from adjacent repos.
|
||||||
|
# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build.
|
||||||
|
|
||||||
|
### ## # Set build working variables HERE # ## ###
|
||||||
|
|
||||||
|
PREFIX=PepOS # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||||
|
SUFFIX=i386 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||||
|
BUILD=nightly # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
### ## # Make NO Edits Below This Line !! # ## ###
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
[ $TODAY ! = " " ] || TODAY=$(date -u +"%Y-%m-%d") # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||||
|
FileName=${PREFIX}-${SUFFIX}-${TODAY}-${BUILD} # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||||
|
LOCATION=/var/www/html/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||||
|
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||||
|
#WorkingDir=~/pep_builder/${PREFIX}${SUFFIX} # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||||
|
WorkingDir=~/pep_builder/PepX686Configs # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||||
|
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||||
|
|
||||||
|
|
||||||
|
# Sunday 27 March, 2022
|
||||||
|
# The first night testing automated update . RepoUpdater
|
||||||
|
cd ${WorkingDir} && ./RepoUpdater | tee /tmp/${PREFIX}${SUFFIX}.out
|
||||||
|
|
||||||
|
# Run the build script - expect 50 minutes, allow 60.
|
||||||
|
./PepBld-${BUILD}.sh 2>&1 | tee --append /tmp/${PREFIX}${SUFFIX}.out
|
||||||
|
|
||||||
|
# Timing matters, don't destroy the old one without a replacement.
|
||||||
|
# Check for the ISO to appear and wait for things to settle.
|
||||||
|
until [ -e fusato/*.iso ]
|
||||||
|
do ((++_break))
|
||||||
|
[ $_break -gt $_wait ] && break || sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${_break} -lt ${_wait} ] ; then
|
||||||
|
### 10 June, 2022 - After 17 June, this comment and the following line can be removed
|
||||||
|
echo -e "\n\tISO appeared after $_break seconds.\n" | tee --append /tmp/${PREFIX}${SUFFIX}.out
|
||||||
|
|
||||||
|
mv fusato/*.iso fusato/${FileName}.iso
|
||||||
|
|
||||||
|
# Define a 2GiB partition, at offset 4194304, in the ISO's 3rd entry of the MBR .
|
||||||
|
dd bs=1 count=16 seek=478 conv=notrunc if=peploadersplash/P4-2GB-MBR.hex of=fusato/${FileName}.iso
|
||||||
|
|
||||||
|
# Make the checksum file.
|
||||||
|
cd fusato
|
||||||
|
echo "# ${FileName}" > ${FileName}-sha512.checksum
|
||||||
|
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||||
|
|
||||||
|
### <HouseKeeping>
|
||||||
|
# Remove the previous files in ${LOCATION} .
|
||||||
|
rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso
|
||||||
|
rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum
|
||||||
|
|
||||||
|
#mv $(FileName}* ${LOCATION}/
|
||||||
|
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||||
|
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||||
|
|
||||||
|
# touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}*
|
||||||
|
touch ${LOCATION}/${FileName}*
|
||||||
|
|
||||||
|
lb clean &
|
||||||
|
|
||||||
|
# Move the log file to the log directory.
|
||||||
|
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||||
|
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||||
|
### </HouseKeeping>
|
||||||
|
|
||||||
|
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append /tmp/${PREFIX}${SUFFIX}.out
|
||||||
|
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# BldHelper-release.sh
|
||||||
|
# This script is meant to be run on the build server and expects to find and update itself from adjacent repos.
|
||||||
|
# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build.
|
||||||
|
|
||||||
|
### ## # Set build working variables HERE # ## ###
|
||||||
|
|
||||||
|
PREFIX=PeppermintOS # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||||
|
SUFFIX=i386 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||||
|
BUILD=release # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
### ## # Make NO Edits Below This Line !! # ## ###
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
[ $TODAY ! = " " ] || TODAY=$(date -u +"%Y-%m-%d") # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||||
|
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||||
|
LOCATION=/var/www/html/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||||
|
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||||
|
WorkDir=~/pep_builder/PepDistroConfigs/PepOSx86_32 # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||||
|
_break=0 ; _wait=30 # Time (in seconds) to wait
|
||||||
|
|
||||||
|
cd ${WorkDir}/../
|
||||||
|
./RepoUpdater | tee /tmp/${FileName}.out
|
||||||
|
./RepoUpdater -c -a PepOSx86_32 | tee -a /tmp/${FileName}.out
|
||||||
|
cd ${WorkDir}
|
||||||
|
|
||||||
|
# Run the build script - expect 50 minutes, allow 60.
|
||||||
|
./pepbld.sh 2>&1 | tee -a /tmp/${FileName}.out
|
||||||
|
|
||||||
|
|
||||||
|
# Timing matters, don't destroy the old one without a replacement.
|
||||||
|
# Check for the ISO to appear and wait for things to settle.
|
||||||
|
until [ -e fusato/*.iso ]
|
||||||
|
do ((++_break))
|
||||||
|
[ $_break -gt $_wait ] && break || sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${_break} -lt ${_wait} ] ; then
|
||||||
|
### 10 June, 2022 - After 17 June, this comment and the following line can be removed
|
||||||
|
echo -e "\n\tISO appeared after $_break seconds.\n" | tee --append /tmp/${FileName}.out
|
||||||
|
|
||||||
|
mv fusato/*.iso fusato/${FileName}.iso
|
||||||
|
|
||||||
|
# Define a 2GiB partition, at offset 4194304, in the ISO's 3rd entry of the MBR .
|
||||||
|
dd bs=1 count=16 seek=478 conv=notrunc if=peploadersplash/P4-2GB-MBR.hex of=fusato/${FileName}.iso
|
||||||
|
|
||||||
|
# Make the checksum file.
|
||||||
|
cd fusato
|
||||||
|
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
|
||||||
|
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||||
|
|
||||||
|
### <HouseKeeping>
|
||||||
|
# Remove the previous files in ${LOCATION} .
|
||||||
|
rm -f ${LOCATION}/${FileName}*.iso
|
||||||
|
rm -f ${LOCATION}/${FileName}*-sha512.checksum
|
||||||
|
|
||||||
|
#mv $(FileName}* ${LOCATION}/
|
||||||
|
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||||
|
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||||
|
|
||||||
|
# touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}*
|
||||||
|
touch ${LOCATION}/${FileName}*
|
||||||
|
|
||||||
|
lb clean &
|
||||||
|
|
||||||
|
# Move the log file to the log directory.
|
||||||
|
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||||
|
mv /tmp/${FileName}.out ${LogDir}/${FileName}-${BUILD}.log
|
||||||
|
### </HouseKeeping>
|
||||||
|
|
||||||
|
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append /tmp/${FileName}.out
|
||||||
|
mv /tmp/${FileName}.out ${LogDir}/${FileName}-${BUILD}.log
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script is meant to be run on the build server and expects to find and update itself from adjacent repos.
|
||||||
|
# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build.
|
||||||
|
|
||||||
|
### ## # Set build working variables HERE # ## ###
|
||||||
|
|
||||||
|
PREFIX=PepOS # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
|
||||||
|
SUFFIX=i386 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
|
||||||
|
BUILD=testing # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
|
||||||
|
|
||||||
|
##################################################
|
||||||
|
### ## # Make NO Edits Below This Line !! # ## ###
|
||||||
|
##################################################
|
||||||
|
|
||||||
|
[ $TODAY ! = " " ] || TODAY=$(date -u +"%Y-%m-%d") # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
|
||||||
|
FileName=${PREFIX}-${SUFFIX}-${TODAY}-${BUILD} # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
|
||||||
|
LOCATION=/var/www/html/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
|
||||||
|
LogDir=/var/log/Live-Build # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
|
||||||
|
#WorkingDir=~/pep_builder/${PREFIX}${SUFFIX} # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||||
|
WorkingDir=~/pep_builder/PepX686Configs # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
|
||||||
|
|
||||||
|
# Sunday 27 March, 2022
|
||||||
|
# The first night testing RepoUpdater (GReaper LOL, get some sleep)
|
||||||
|
cd ${WorkingDir} && . RepoUpdater | tee /tmp/${PREFIX}${SUFFIX}.out
|
||||||
|
|
||||||
|
#### This section is marked for removal
|
||||||
|
## Move into the builder directory.
|
||||||
|
## Make sure the local repos are up to date.
|
||||||
|
#cd ~/pep_builder
|
||||||
|
#cd ./PepProPixMaps && git pull
|
||||||
|
#cd ../PepProTools && git pull
|
||||||
|
#cd ${WorkingDir} && git pull
|
||||||
|
|
||||||
|
# Run the build script - expect 50 minutes, allow 60.
|
||||||
|
./PepBld-${BUILD}.sh 2>&1 | tee --append /tmp/${PREFIX}${SUFFIX}.out
|
||||||
|
|
||||||
|
|
||||||
|
# Timing matters, don't destroy the old one without a replacement.
|
||||||
|
# Check for the ISO to appear and wait for things to settle.
|
||||||
|
until [ -e fusato/*.iso ]
|
||||||
|
do sleep 2 # Waiting for ISO image
|
||||||
|
done # && sync fusato/*.iso || sync fusato/*.iso
|
||||||
|
|
||||||
|
mv fusato/*.iso ./${FileName}.iso
|
||||||
|
|
||||||
|
# Define a 2GiB partition, at offset 4194304, in the ISO's 4th entry of the MBR .
|
||||||
|
dd bs=1 count=16 seek=494 conv=notrunc if=peploadersplash/P4-2GB-MBR.hex of=${FileName}.iso
|
||||||
|
|
||||||
|
# Make the checksum file.
|
||||||
|
echo "# PeppermintOS ${TODAY}" > ${FileName}-sha512.checksum
|
||||||
|
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
|
||||||
|
|
||||||
|
### <HouseKeeping>
|
||||||
|
# Remove the previous files in ${LOCATION} .
|
||||||
|
rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*.iso
|
||||||
|
rm -f ${LOCATION}/${PREFIX}-${SUFFIX}*-sha512.checksum
|
||||||
|
|
||||||
|
# Move the log file to the log directory.
|
||||||
|
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
|
||||||
|
mv /tmp/${PREFIX}${SUFFIX}.out ${LogDir}/${PREFIX}-${SUFFIX}-${BUILD}.log
|
||||||
|
|
||||||
|
# Set the timestamps to the ISO's internal before moving them to the DL directory.
|
||||||
|
# _stamp=$(hexdump -C -s 33598 -n 12 ${FileName}.iso | head -1 | cut -f2 -d"|" )
|
||||||
|
|
||||||
|
#mv $(FileName}* ${LOCATION}/
|
||||||
|
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
|
||||||
|
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
|
||||||
|
|
||||||
|
# touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}*
|
||||||
|
touch ${LOCATION}/${FileName}*
|
||||||
|
### </HouseKeeping>
|
||||||
|
|
||||||
|
|
||||||
|
# This will "flush" our variables without handing any back to MasterBuilder.sh .
|
||||||
|
# exit # But NOT `return`.
|
||||||
|
|
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 677 B |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=Welcome to Peppermint
|
||||||
|
Exec=python3 /opt/pypep/welcome.py &
|
||||||
|
Icon=/usr/share/pixmaps/peppermint.png
|
||||||
|
Terminal=false
|
||||||
|
StartupNotify=True
|
||||||
|
Name[en_US]=Welcome to Peppermint
|
||||||
|
Path=
|
|
@ -0,0 +1,94 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
# User and Tweaks #
|
||||||
|
#Settings Manager
|
||||||
|
def osettingsmgr():
|
||||||
|
subprocess.Popen ("xfce4-settings-manager")
|
||||||
|
#Deconf Editor
|
||||||
|
def odeconf():
|
||||||
|
subprocess.Popen ("dconf-editor")
|
||||||
|
#Mouse Settings
|
||||||
|
def omt():
|
||||||
|
subprocess.Popen ("xfce4-mouse-settings")
|
||||||
|
#Appearence
|
||||||
|
def oclf():
|
||||||
|
subprocess.Popen ("xfce4-appearance-settings")
|
||||||
|
#Panel Preferences
|
||||||
|
def opp():
|
||||||
|
subprocess.Popen (["xfce4-panel", "--preferences"])
|
||||||
|
#Notifications Configuration
|
||||||
|
def ons():
|
||||||
|
subprocess.Popen ("xfce4-notifyd-config")
|
||||||
|
#Default settings
|
||||||
|
def opa():
|
||||||
|
subprocess.Popen ("xfce4-mime-settings")
|
||||||
|
#Keyboardsettings
|
||||||
|
def oks():
|
||||||
|
subprocess.Popen ("xfce4-keyboard-settings")
|
||||||
|
# Network and Hardware #
|
||||||
|
#Network Manager
|
||||||
|
def nhnm():
|
||||||
|
subprocess.Popen ("nm-connection-editor")
|
||||||
|
#Printers
|
||||||
|
def nhpr():
|
||||||
|
subprocess.Popen ("system-config-printer")
|
||||||
|
#Display
|
||||||
|
def nhdis():
|
||||||
|
subprocess.Popen ("xfce4-display-settings")
|
||||||
|
#Power Manager
|
||||||
|
def nhpom():
|
||||||
|
subprocess.Popen ("xfce4-power-manager-settings")
|
||||||
|
#Pulse Audio Volume
|
||||||
|
def nhpav():
|
||||||
|
subprocess.Popen ("pavucontrol")
|
||||||
|
# Settings and Software #
|
||||||
|
#User and Groups
|
||||||
|
def ssug():
|
||||||
|
subprocess.Popen ("users-admin")
|
||||||
|
#Disk Utilities
|
||||||
|
def ssdu():
|
||||||
|
subprocess.Popen ("gnome-disks")
|
||||||
|
#Update Manager
|
||||||
|
def ssum():
|
||||||
|
subprocess.Popen(["pkexec", "python3", "/opt/pypep/pepu.py"])
|
||||||
|
|
||||||
|
#Accessibilitity
|
||||||
|
def ssas():
|
||||||
|
subprocess.Popen ("xfce4-accessibility-settings")
|
||||||
|
#System Informaion
|
||||||
|
def sssi():
|
||||||
|
cmd = "xfce4-terminal -e 'bash -c \"neofetch\";bash'"
|
||||||
|
subprocess.Popen(cmd,shell=True)
|
||||||
|
#Flathub
|
||||||
|
def ssfh():
|
||||||
|
os.system('python3 /opt/pypep/fh.py')
|
||||||
|
def ssfgnm():
|
||||||
|
pass
|
||||||
|
#Snapstore
|
||||||
|
def ssss():
|
||||||
|
os.system('python3 /opt/pypep/spstore.py')
|
||||||
|
def ssst():
|
||||||
|
cmd = "[ -e /snap/bin ] && snap-store || xfce4-terminal -T \"Snap Store Installer\" -e \"bash -c 'sudo snap install snap-store'\""
|
||||||
|
subprocess.Popen(cmd,shell=True)
|
||||||
|
#App Image
|
||||||
|
def ssai():
|
||||||
|
os.system('python3 /opt/pypep/aih.py')
|
||||||
|
#gnomestore
|
||||||
|
def ssgn():
|
||||||
|
subprocess.Popen ("gnome-software")
|
||||||
|
#gnomestoreweb
|
||||||
|
def ssgns():
|
||||||
|
os.system('python3 /opt/pypep/gstore.py')
|
||||||
|
#Synaptic Package Manager
|
||||||
|
def ssspm():
|
||||||
|
subprocess.Popen ("synaptic-pkexec")
|
||||||
|
#Installer
|
||||||
|
def packages():
|
||||||
|
subprocess.Popen(["pkexec", "python3", "/opt/pypep/peppackages.py"])
|
||||||
|
|
||||||
|
#Launch ICE
|
||||||
|
def lice():
|
||||||
|
subprocess.Popen ("ice")
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("App Image Hub")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://www.appimagehub.com/"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import sqlite3
|
||||||
|
from tkinter import *
|
||||||
|
from tkinter import ttk
|
||||||
|
from tkinter import font
|
||||||
|
from ttkthemes import ThemedTk
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
from tendo import singleton
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ThemedTk(theme='clam')
|
||||||
|
window_height = 130
|
||||||
|
window_width = 350
|
||||||
|
pexs.title('Install Complete')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
pexs['bg']='#2f2f2f'
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
#main information syles
|
||||||
|
subpmt = ttk.Style()
|
||||||
|
subpmt.configure("Whiteb.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '14', 'bold') )
|
||||||
|
|
||||||
|
#style the buttons
|
||||||
|
stbnt = ttk.Style()
|
||||||
|
stbnt.configure('pep.TButton', font = ('Helvetica', '14', 'bold'))
|
||||||
|
stbnt.map("pep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', '#2f2f2f'), ('active', 'white')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')],
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
cbtn = ttk.Style()
|
||||||
|
cbtn.map("hpep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', 'white'), ('active', '#F62817')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')]
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
def killme():
|
||||||
|
pexs.destroy()
|
||||||
|
|
||||||
|
#Message information
|
||||||
|
lblexp = ttk.Label(pexs, style="Whiteb.TLabel", text="Installation Completed!", wraplength=500)
|
||||||
|
lblexp.place(x=70, y=30)
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
bttut = ttk.Button(text='Close', style="pep.TButton", width=8, command=killme )
|
||||||
|
bttut.place(x=120, y=70)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,78 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ttk.Window(themename="darkly")
|
||||||
|
window_height = 130
|
||||||
|
window_width = 400
|
||||||
|
pexs.title('Check CodeBerg Connection')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
#Check if user can connect to codeberg
|
||||||
|
def cb ():
|
||||||
|
|
||||||
|
cmd = os.system('wget -q --spider https://codeberg.org/Peppermint_OS/ ')
|
||||||
|
# cmd = os.system('ping codeberg.org -w 4 >/dev/null ')
|
||||||
|
if cmd == 0:
|
||||||
|
#new placement for install
|
||||||
|
btgo.place(x=220, y=70)
|
||||||
|
#take the check button way out of view (hide)
|
||||||
|
btck.place(x=-9000, y=0)
|
||||||
|
#reset the label text
|
||||||
|
lblexp.configure(text="Connection to CodeBerg successful!")
|
||||||
|
#neplatment for label
|
||||||
|
lblexp.place(x=40, y=30)
|
||||||
|
|
||||||
|
else:
|
||||||
|
os.system('python3 /opt/pypep/nointer.py')
|
||||||
|
|
||||||
|
def ico ():
|
||||||
|
|
||||||
|
sp.call(['xfce4-terminal', '-x','/opt/pypep/icons.sh'])
|
||||||
|
|
||||||
|
|
||||||
|
def killme():
|
||||||
|
pexs.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
|
||||||
|
#Message information
|
||||||
|
lblexp = ttk.Label(pexs, text="Check Codeberg Connection...")
|
||||||
|
lblexp.place(x=80, y=30)
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
|
||||||
|
btcan = ttk.Button(text='Cancel', bootstyle="danger-outline", width=8, command=killme )
|
||||||
|
btcan.place(x=100, y=70)
|
||||||
|
btgo = ttk.Button(text='Install', bootstyle="danger-outline", width=8, command=ico)
|
||||||
|
|
||||||
|
btck = ttk.Button(text='Check', bootstyle="danger-outline", width=8, command=cb)
|
||||||
|
btck.place(x=220, y=70)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,77 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ttk.Window(themename="darkly")
|
||||||
|
window_height = 130
|
||||||
|
window_width = 400
|
||||||
|
pexs.title('Check CodeBerg Connection')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
def cb ():
|
||||||
|
"""Check if user can connect to codeberg"""
|
||||||
|
cmd = os.system('wget -q --spider https://codeberg.org/Peppermint_OS/ ')
|
||||||
|
if cmd == 0:
|
||||||
|
#new placement for install
|
||||||
|
btgo.place(x=220, y=70)
|
||||||
|
#take the check button way out of view (hide)
|
||||||
|
btck.place(x=-9000, y=0)
|
||||||
|
#reset the label text
|
||||||
|
lblexp.configure(text="Connection to CodeBerg successful!")
|
||||||
|
#neplatment for label
|
||||||
|
lblexp.place(x=40, y=30)
|
||||||
|
|
||||||
|
else:
|
||||||
|
os.system('python3 /opt/pypep/nointer.py')
|
||||||
|
|
||||||
|
def thm ():
|
||||||
|
|
||||||
|
sp.call(['xfce4-terminal', '-x','/opt/pypep/themes.sh'])
|
||||||
|
|
||||||
|
|
||||||
|
def killme():
|
||||||
|
pexs.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
#Message information
|
||||||
|
lblexp = ttk.Label(pexs,text="Check Codeberg Connection...")
|
||||||
|
lblexp.place(x=80, y=30)
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
|
||||||
|
btcan = ttk.Button(text='Cancel', bootstyle="danger-outline", width=8, command=killme )
|
||||||
|
btcan.place(x=100, y=70)
|
||||||
|
btgo = ttk.Button(text='Install', bootstyle="danger-outline", width=8, command=thm)
|
||||||
|
|
||||||
|
btck = ttk.Button(text='Check', bootstyle="danger-outline", width=8, command=cb)
|
||||||
|
btck.place(x=220, y=70)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,76 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ttk.Window(themename="darkly")
|
||||||
|
window_height = 130
|
||||||
|
window_width = 400
|
||||||
|
pexs.title('Check CodeBerg Connection')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
def cb ():
|
||||||
|
"""Check if user can connect to codeberg"""
|
||||||
|
cmd = os.system('wget -q --spider https://codeberg.org/Peppermint_OS/ ')
|
||||||
|
if cmd == 0:
|
||||||
|
#new placement for install
|
||||||
|
btgo.place(x=220, y=70)
|
||||||
|
#take the check button way out of view (hide)
|
||||||
|
btck.place(x=-9000, y=0)
|
||||||
|
#reset the label text
|
||||||
|
lblexp.configure(text="Connection to CodeBerg successful!")
|
||||||
|
#neplatment for label
|
||||||
|
lblexp.place(x=40, y=30)
|
||||||
|
|
||||||
|
else:
|
||||||
|
os.system('python3 /opt/pypep/nointer.py')
|
||||||
|
|
||||||
|
def ico ():
|
||||||
|
"""Run the bash"""
|
||||||
|
sp.call(['xfce4-terminal', '-x','/opt/pypep/walls.sh'])
|
||||||
|
|
||||||
|
|
||||||
|
def killme():
|
||||||
|
"""Close the window"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
#Message information
|
||||||
|
lblexp = ttk.Label(pexs, text="Check Codeberg Connection...")
|
||||||
|
lblexp.place(x=80, y=30)
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
|
||||||
|
btcan = ttk.Button(text='Cancel', bootstyle="danger-outline", width=8, command=killme )
|
||||||
|
btcan.place(x=100, y=70)
|
||||||
|
btgo = ttk.Button(text='Install', bootstyle="danger-outline", width=8, command=ico)
|
||||||
|
|
||||||
|
btck = ttk.Button(text='Check', bootstyle="danger-outline", width=8, command=cb)
|
||||||
|
btck.place(x=220, y=70)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Peppermint FaceBook(meta) page")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/fb.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://www.facebook.com/peppermintos/"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Flat Hub")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://flathub.org/"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Peppermint Community Forum")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-fm-20.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://sourceforge.net/p/peppermintos/pepos/"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Gnome Store")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://wiki.gnome.org/Projects/SandboxedApps"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,534 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
"""This is for the Hub GUI """
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
from tendo import singleton
|
||||||
|
from os import path
|
||||||
|
import tkinter as tk
|
||||||
|
import tkinter.ttk as ttk
|
||||||
|
import sqlite3
|
||||||
|
import subprocess
|
||||||
|
import putilities
|
||||||
|
import actions
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# data connection srting
|
||||||
|
conn = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
pcur = conn.cursor()
|
||||||
|
# Create the table if it does not exist
|
||||||
|
pcur.execute(
|
||||||
|
""" CREATE TABLE IF NOT EXISTS hbchk
|
||||||
|
( id integer PRIMARY KEY AUTOINCREMENT, hstat text); """
|
||||||
|
)
|
||||||
|
conn.commit()
|
||||||
|
conn.close()
|
||||||
|
|
||||||
|
# see if there is a record table.
|
||||||
|
# If the table is empty then make a new
|
||||||
|
# record and set the hstat value to off
|
||||||
|
|
||||||
|
|
||||||
|
def newrech():
|
||||||
|
db = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
hbcur = db.cursor()
|
||||||
|
hbcur.execute("SELECT COUNT(*) FROM hbchk LIMIT 1")
|
||||||
|
hbckempty = hbcur.fetchall()
|
||||||
|
if hbckempty[0][0] == 0:
|
||||||
|
newrec = """ INSERT INTO hbchk(hstat) VALUES ('off'); """
|
||||||
|
hbcur.execute(newrec)
|
||||||
|
db.commit()
|
||||||
|
db.close()
|
||||||
|
|
||||||
|
|
||||||
|
# makes sure only a single instance is running
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
x = 1
|
||||||
|
|
||||||
|
|
||||||
|
class PepHub(tk.Tk):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
self.title("Peppermint Hub")
|
||||||
|
self.style = ttk.Style(self)
|
||||||
|
self.style.theme_use('clam')
|
||||||
|
self.resizable(False, False)
|
||||||
|
|
||||||
|
# styling for darker theme here
|
||||||
|
self.style.configure('TFrame', background='#2f2f2f')
|
||||||
|
self.style.configure('TLabel', background='#2f2f2f',
|
||||||
|
foreground='#ffffff')
|
||||||
|
self.style.configure(
|
||||||
|
'TButton',
|
||||||
|
background='#2f2f2f',
|
||||||
|
bordercolor='#ffffff',
|
||||||
|
lightcolor='#3b4536',
|
||||||
|
darkcolor='#0A0B0B',
|
||||||
|
)
|
||||||
|
self.style.map("TButton", background=[(
|
||||||
|
'pressed', '#1d221b'), (
|
||||||
|
'active', '#272e24')], darkcolor=[(
|
||||||
|
'pressed', '#0c0e0b')], lightcolor=[(
|
||||||
|
'pressed', '#0c0e0b')])
|
||||||
|
self.tk.call('wm', 'iconphoto',
|
||||||
|
self._w, tk.PhotoImage(
|
||||||
|
file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
detpmt = ttk.Style()
|
||||||
|
detpmt.configure(
|
||||||
|
"det.TLabel",
|
||||||
|
foreground="#ffffff",
|
||||||
|
background="#2f2f2f",
|
||||||
|
font=(
|
||||||
|
'Helvetica',
|
||||||
|
'12',
|
||||||
|
'underline'))
|
||||||
|
detpmtsmall = ttk.Style()
|
||||||
|
detpmtsmall.configure(
|
||||||
|
"detsm.TLabel",
|
||||||
|
foreground="yellow",
|
||||||
|
background="#2f2f2f",
|
||||||
|
font=('Helvetica', '10', 'italic'))
|
||||||
|
# The tabbing feature
|
||||||
|
pnb = ttk.Notebook(self)
|
||||||
|
pnb.pack(expand=True)
|
||||||
|
|
||||||
|
# tabs and thier sized.
|
||||||
|
tbdes = ttk.Frame(pnb, padding=30)
|
||||||
|
tbsys = ttk.Frame(pnb, padding=30)
|
||||||
|
# the tab names
|
||||||
|
pnb.add(tbdes, text='Desktop Environment Settings')
|
||||||
|
pnb.add(tbsys, text='Hardware & Software')
|
||||||
|
|
||||||
|
# icons section - used self.name since regular assignment
|
||||||
|
# ended with all images being garbage collected
|
||||||
|
# xfce settings icons
|
||||||
|
self.icosm = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/applications-system.png")
|
||||||
|
self.icopwm = PhotoImage(file="/usr/share/pixmaps/battery.png")
|
||||||
|
self.icomtp = PhotoImage(file="/usr/share/pixmaps/mouse.png")
|
||||||
|
self.icoclf = PhotoImage(file="/usr/share/pixmaps/glade.png")
|
||||||
|
self.icopp = PhotoImage(file="/usr/share/pixmaps/panel-applets.png")
|
||||||
|
self.icons = PhotoImage(file="/usr/share/pixmaps/cs-notifications.png")
|
||||||
|
self.icopa = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/cs-default-applications.png")
|
||||||
|
self.icoks = PhotoImage(file="/usr/share/pixmaps/keyboard.png")
|
||||||
|
self.icomon = PhotoImage(file="/usr/share/pixmaps/video-display.png")
|
||||||
|
self.icoas = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/preferences-desktop-accessibility.png")
|
||||||
|
#Harware & Software
|
||||||
|
self.icont = PhotoImage(file="/usr/share/pixmaps/network-wired.png")
|
||||||
|
self.icoptr = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/gnome-dev-printer.png")
|
||||||
|
self.icodconf = PhotoImage(file="/usr/share/pixmaps/dconf-editor.png")
|
||||||
|
self.icopav = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/stock_music-library.png")
|
||||||
|
self.icoug = PhotoImage(file="/usr/share/pixmaps/stock_people.png")
|
||||||
|
self.icodu = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/drive-harddisk-system.png")
|
||||||
|
self.icoum = PhotoImage(file="/usr/share/pixmaps/update-manager.png")
|
||||||
|
self.icosi = PhotoImage(file="/usr/share/pixmaps/gnome-session.png")
|
||||||
|
self.icoflat = PhotoImage(file="/usr/share/pixmaps/flat.png")
|
||||||
|
self.icosnap = PhotoImage(file="/usr/share/pixmaps/snap.png")
|
||||||
|
self.icoice = PhotoImage(file="/opt/pypep/icesm.png")
|
||||||
|
self.icoaih = PhotoImage(file="/usr/share/pixmaps/ai.png")
|
||||||
|
self.icospm = PhotoImage(file="/usr/share/pixmaps/synaptic.png")
|
||||||
|
self.icogno = PhotoImage(file="/usr/share/pixmaps/gnome-software.png")
|
||||||
|
self.icoghboff = PhotoImage(file="/usr/share/pixmaps/hblock.png")
|
||||||
|
self.icoghbon = PhotoImage(file="/usr/share/pixmaps/hblockon.png")
|
||||||
|
# Install Icons
|
||||||
|
self.icocr = PhotoImage(
|
||||||
|
file="/usr/share/pixmaps/peppermint-inst-48.png")
|
||||||
|
|
||||||
|
def hbon():
|
||||||
|
db = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
uphbon = """ UPDATE hbchk SET hstat = 'on';"""
|
||||||
|
updcur = db.cursor()
|
||||||
|
updcur.execute(uphbon)
|
||||||
|
db.commit()
|
||||||
|
db.close()
|
||||||
|
btnhbof.lower()
|
||||||
|
btnhbon.grid(row=11, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
cmd = "xfce4-terminal -e 'bash -c \"hblock exit 0\";bash'"
|
||||||
|
subprocess.Popen(cmd, shell=True)
|
||||||
|
# Turn off hblock
|
||||||
|
|
||||||
|
def hboff():
|
||||||
|
db = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
uphbof = """ UPDATE hbchk SET hstat = 'off';"""
|
||||||
|
updocur = db.cursor()
|
||||||
|
updocur.execute(uphbof)
|
||||||
|
db.commit()
|
||||||
|
db.close()
|
||||||
|
btnhbon.lower()
|
||||||
|
btnhbof.grid(row=11, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
cmd = "xfce4-terminal -e 'bash -c \"hblock -S none -D none exit 0\";bash'"
|
||||||
|
subprocess.Popen(cmd, shell=True)
|
||||||
|
# Button Section - Use this area to manage and configure the buttone on each tab.
|
||||||
|
# xfce settings
|
||||||
|
btnsm = ttk.Button(tbdes,
|
||||||
|
text='Settings Manager',
|
||||||
|
width='20',
|
||||||
|
command=actions.osettingsmgr,
|
||||||
|
image=self.icosm, cursor="hand2")
|
||||||
|
btnas = ttk.Button(tbdes,
|
||||||
|
text='Accessibilitity Settings',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssas,
|
||||||
|
image=self.icoas,
|
||||||
|
cursor="hand2")
|
||||||
|
btndis = ttk.Button(tbdes,
|
||||||
|
text='Display',
|
||||||
|
width='20',
|
||||||
|
command=actions.nhdis,
|
||||||
|
image=self.icomon, cursor="hand2")
|
||||||
|
btnpmgr = ttk.Button(tbdes,
|
||||||
|
text='Power Manager',
|
||||||
|
width='20',
|
||||||
|
command=actions.nhpom,
|
||||||
|
image=self.icopwm, cursor="hand2")
|
||||||
|
btmtp = ttk.Button(tbdes,
|
||||||
|
text='Mouse and Touchpad',
|
||||||
|
width='20',
|
||||||
|
command=actions.omt,
|
||||||
|
image=self.icomtp, cursor="hand2")
|
||||||
|
btnks = ttk.Button(tbdes,
|
||||||
|
text='Keyboard',
|
||||||
|
width='20',
|
||||||
|
command=actions.oks,
|
||||||
|
image=self.icoks, cursor="hand2")
|
||||||
|
btnclf = ttk.Button(tbdes,
|
||||||
|
text='Customize Look and Feel',
|
||||||
|
width='20',
|
||||||
|
command=actions.oclf,
|
||||||
|
image=self.icoclf, cursor="hand2")
|
||||||
|
btnpp = ttk.Button(tbdes,
|
||||||
|
text='Panel Preferences',
|
||||||
|
width='20',
|
||||||
|
command=actions.opp,
|
||||||
|
image=self.icopp, cursor="hand2")
|
||||||
|
btnns = ttk.Button(tbdes,
|
||||||
|
text='Notification Settings',
|
||||||
|
width='20',
|
||||||
|
command=actions.ons,
|
||||||
|
image=self.icons, cursor="hand2")
|
||||||
|
btnpa = ttk.Button(tbdes,
|
||||||
|
text='Preferred Applications',
|
||||||
|
width='20',
|
||||||
|
command=actions.opa,
|
||||||
|
image=self.icopa, cursor="hand2")
|
||||||
|
#system & hardware
|
||||||
|
btnnm = ttk.Button(tbsys,
|
||||||
|
text='Network Manager',
|
||||||
|
width='20',
|
||||||
|
command=actions.nhnm,
|
||||||
|
image=self.icont, cursor="hand2")
|
||||||
|
btnprint = ttk.Button(tbsys,
|
||||||
|
text='Printers',
|
||||||
|
width='20', command=actions.nhpr,
|
||||||
|
image=self.icoptr, cursor="hand2")
|
||||||
|
btdconf = ttk.Button(tbsys,
|
||||||
|
text='dconf Editor',
|
||||||
|
width='20',
|
||||||
|
command=actions.odeconf,
|
||||||
|
image=self.icodconf, cursor="hand2")
|
||||||
|
btnuag = ttk.Button(tbsys,
|
||||||
|
text='Users & Groups',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssug,
|
||||||
|
image=self.icoug,
|
||||||
|
cursor="hand2")
|
||||||
|
btnvol = ttk.Button(tbsys,
|
||||||
|
text='Pulse Audio Volume',
|
||||||
|
width='20', command=actions.nhpav,
|
||||||
|
image=self.icopav,
|
||||||
|
cursor="hand2")
|
||||||
|
btndu = ttk.Button(tbsys,
|
||||||
|
text='Disk Utilities',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssdu,
|
||||||
|
image=self.icodu,
|
||||||
|
cursor="hand2")
|
||||||
|
btnupmgr = ttk.Button(tbsys,
|
||||||
|
text='Update Manager',
|
||||||
|
width='20',
|
||||||
|
image=self.icoum,
|
||||||
|
command=actions.ssum,
|
||||||
|
cursor="hand2")
|
||||||
|
btnsi = ttk.Button(tbsys,
|
||||||
|
text='System Information',
|
||||||
|
width='20',
|
||||||
|
command=actions.sssi,
|
||||||
|
image=self.icosi,
|
||||||
|
cursor="hand2")
|
||||||
|
btnflt = ttk.Button(tbsys,
|
||||||
|
text='Flathub',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssfh,
|
||||||
|
image=self.icoflat,
|
||||||
|
cursor="hand2")
|
||||||
|
btnfltgnn = ttk.Button(tbsys,
|
||||||
|
text='Flathub Gnome Store',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssfh,
|
||||||
|
image=self.icoflat,
|
||||||
|
cursor="hand2")
|
||||||
|
btnice = ttk.Button(tbsys,
|
||||||
|
text='ICE',
|
||||||
|
width='20',
|
||||||
|
command=actions.lice,
|
||||||
|
image=self.icoice,
|
||||||
|
cursor="hand2")
|
||||||
|
btnsnap = ttk.Button(tbsys,
|
||||||
|
text='Snap Store',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssss,
|
||||||
|
image=self.icosnap,
|
||||||
|
cursor="hand2")
|
||||||
|
btnsnst = ttk.Button(tbsys,
|
||||||
|
text='Snap Store',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssst,
|
||||||
|
image=self.icosnap,
|
||||||
|
cursor="hand2")
|
||||||
|
btnai = ttk.Button(tbsys,
|
||||||
|
text='App Image Hub',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssai,
|
||||||
|
image=self.icoaih,
|
||||||
|
cursor="hand2")
|
||||||
|
btnsc = ttk.Button(tbsys,
|
||||||
|
text='Synaptic',
|
||||||
|
width='20',
|
||||||
|
command=actions.ssspm,
|
||||||
|
image=self.icospm,
|
||||||
|
cursor="hand2")
|
||||||
|
btncore = ttk.Button(tbsys,
|
||||||
|
text='Packages',
|
||||||
|
command=actions.packages,
|
||||||
|
image=self.icocr,
|
||||||
|
cursor="hand2")
|
||||||
|
btngnomesoftware = ttk.Button(tbsys,
|
||||||
|
text='Gnome Software',
|
||||||
|
command=actions.ssgn,
|
||||||
|
image=self.icogno,
|
||||||
|
cursor="hand2")
|
||||||
|
btngnomeweb = ttk.Button(tbsys,
|
||||||
|
text='Gnome Software',
|
||||||
|
command=actions.ssgns,
|
||||||
|
image=self.icogno,
|
||||||
|
cursor="hand2")
|
||||||
|
btnhbof = ttk.Button(tbsys,
|
||||||
|
text='hBlockRed',
|
||||||
|
command=hbon,
|
||||||
|
image=self.icoghboff,
|
||||||
|
cursor="hand2")
|
||||||
|
btnhbon = ttk.Button(tbsys,
|
||||||
|
text='hBlockgreen',
|
||||||
|
command=hboff,
|
||||||
|
image=self.icoghbon,
|
||||||
|
cursor="hand2")
|
||||||
|
|
||||||
|
# these are the label section - Use this area to manage the lables for the tabs
|
||||||
|
# xfcesettings
|
||||||
|
lblas = ttk.Label(tbdes,
|
||||||
|
text='Accessibilitity')
|
||||||
|
lblsm = ttk.Label(tbdes,
|
||||||
|
text='Settings Manager')
|
||||||
|
lblclf = ttk.Label(tbdes,
|
||||||
|
text='Appearance')
|
||||||
|
lblpp = ttk.Label(tbdes,
|
||||||
|
text='Panel')
|
||||||
|
lblns = ttk.Label(tbdes,
|
||||||
|
text='Notification Settings')
|
||||||
|
lblpa = ttk.Label(tbdes,
|
||||||
|
text='Default Applications')
|
||||||
|
lbldis = ttk.Label(tbdes,
|
||||||
|
text='Display')
|
||||||
|
lblpmgr = ttk.Label(tbdes,
|
||||||
|
text='Power Manager')
|
||||||
|
lblmtp = ttk.Label(tbdes,
|
||||||
|
text='Mouse and Touchpad')
|
||||||
|
lblks = ttk.Label(tbdes,
|
||||||
|
text='Keyboard')
|
||||||
|
lblcom = ttk.Label(tbdes,
|
||||||
|
style="det.TLabel",
|
||||||
|
text='Commonly used xfce settings')
|
||||||
|
lblall = ttk.Label(tbdes,
|
||||||
|
style="detsm.TLabel",
|
||||||
|
text='*Try the xfce Settings Manager')
|
||||||
|
# Hardware Labels
|
||||||
|
lblnm = ttk.Label(tbsys,
|
||||||
|
text='Network Connections')
|
||||||
|
lblprint = ttk.Label(tbsys,
|
||||||
|
text='Printers')
|
||||||
|
lbldu = ttk.Label(tbsys,
|
||||||
|
text='Disk Utilities')
|
||||||
|
lbluag = ttk.Label(tbsys,
|
||||||
|
text='Users & Groups')
|
||||||
|
lblvol = ttk.Label(tbsys,
|
||||||
|
text='Pulse Audio Volume')
|
||||||
|
lbldconf = ttk.Label(tbsys,
|
||||||
|
text='dconf Editor')
|
||||||
|
# Software Labels
|
||||||
|
lblcore = ttk.Label(tbsys,
|
||||||
|
text='Suggested Packages')
|
||||||
|
lblupmgr = ttk.Label(tbsys,
|
||||||
|
text='Update Manager')
|
||||||
|
lblsi = ttk.Label(tbsys,
|
||||||
|
text='System Information')
|
||||||
|
lblsnap = ttk.Label(tbsys,
|
||||||
|
text='Snap Store')
|
||||||
|
lblsnst = ttk.Label(tbsys,
|
||||||
|
text='Snap Store')
|
||||||
|
lblai = ttk.Label(tbsys,
|
||||||
|
text='App Image Hub')
|
||||||
|
lblsc = ttk.Label(tbsys,
|
||||||
|
text='Synaptic')
|
||||||
|
lblflt = ttk.Label(tbsys,
|
||||||
|
text='Flathub')
|
||||||
|
lblfltgnm = ttk.Label(tbsys,
|
||||||
|
text='Flathub')
|
||||||
|
lblgnome = ttk.Label(tbsys,
|
||||||
|
text='Gnome Store')
|
||||||
|
lblhb = ttk.Label(tbsys,
|
||||||
|
text='hBlock')
|
||||||
|
# xfce settings
|
||||||
|
btndis.grid(row=1, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnas.grid(row=1, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnpp.grid(row=1, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnclf.grid(row=3, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnpmgr.grid(row=3, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnns.grid(row=3, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnpa.grid(row=5, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btmtp.grid(row=5, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnks.grid(row=5, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnsm.grid(row=9, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# Label POS
|
||||||
|
# xfce settings
|
||||||
|
lblcom.grid(
|
||||||
|
row=0,
|
||||||
|
column=0,
|
||||||
|
columnspan=3,
|
||||||
|
ipadx=2,
|
||||||
|
ipady=2,
|
||||||
|
padx=2,
|
||||||
|
pady=2)
|
||||||
|
lblas.grid(row=2, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblpp.grid(row=2, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lbldis.grid(row=2, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblclf.grid(row=4, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblns.grid(row=4, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblpmgr.grid(row=4, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblmtp.grid(row=6, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblks.grid(row=6, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblpa.grid(row=6, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblall.grid(
|
||||||
|
row=8,
|
||||||
|
column=0,
|
||||||
|
columnspan=3,
|
||||||
|
ipadx=2,
|
||||||
|
ipady=2,
|
||||||
|
padx=2,
|
||||||
|
pady=2)
|
||||||
|
lblsm.grid(row=10, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# Software Buttons
|
||||||
|
btncore.grid(row=7, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnsi.grid(row=7, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnupmgr.grid(row=7, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnai.grid(row=9, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnsc.grid(row=9, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnsnap.grid(row=11, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# System and hardware buttons
|
||||||
|
btnnm.grid(row=0, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnprint.grid(row=0, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btndu.grid(row=0, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnvol.grid(row=2, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnuag.grid(row=2, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# Network label positioning
|
||||||
|
lblnm.grid(row=1, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblprint.grid(row=1, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lbldu.grid(row=1, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblvol.grid(row=3, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblhb.grid(row=12, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lbluag.grid(row=3, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# Sofwtare
|
||||||
|
lblcore.grid(row=8, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblsi.grid(row=8, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblupmgr.grid(row=8, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblai.grid(row=10, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblsc.grid(row=10, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblsnap.grid(row=12, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# Sql check stat
|
||||||
|
dbhb = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
hbofn = dbhb.cursor()
|
||||||
|
hbofn.execute("SELECT COUNT(*) FROM hbchk WHERE hstat ='on'")
|
||||||
|
hbresult = hbofn.fetchone()
|
||||||
|
dbhb.commit()
|
||||||
|
dbhb.close
|
||||||
|
# dconf condition
|
||||||
|
# cache['dconf-editor'].is_installed:
|
||||||
|
if putilities.installcheck('dconf-editor'):
|
||||||
|
lbldconf.grid(row=3, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btdconf.grid(row=2, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
#check what version this is and hid and show buttons
|
||||||
|
if path.exists("/etc/devuan_version"):
|
||||||
|
btnsnap.destroy()
|
||||||
|
btnsnst.destroy()
|
||||||
|
lblsnap['text'] = "ICE"
|
||||||
|
lblsnst.destroy()
|
||||||
|
btnice.grid(row=11, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
elif path.exists("/etc/debian_version"):
|
||||||
|
# if snap is installed, open app, otherwise make a button to the snap
|
||||||
|
# store
|
||||||
|
if putilities.installcheck('snapd'): # cache['snapd'].is_installed:
|
||||||
|
btnsnst.grid(row=11, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblsnst.grid(row=12, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
else:
|
||||||
|
btnsnap.grid(row=11, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
lblsnap.grid(row=12, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# if FlatPak is installed, open the gnome store otherwise open flathub
|
||||||
|
# cache['flatpak'].is_installed:
|
||||||
|
if putilities.installcheck('flatpak'):
|
||||||
|
##If the Gnome store is installed dont show the Flatpak button
|
||||||
|
##If it is NOT installed Show the flatpak button
|
||||||
|
if putilities.installcheck('gnome-software'):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
lblflt.grid(row=10, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnflt.grid(row=9, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
else:
|
||||||
|
lblflt.grid(row=10, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
btnflt.grid(row=9, column=0, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# if gnome store is installed, link the applicaton, otherwise link to
|
||||||
|
# their website
|
||||||
|
# cache['gnome-software'].is_installed:
|
||||||
|
if putilities.installcheck('gnome-software'):
|
||||||
|
btngnomesoftware.grid(
|
||||||
|
row=11,
|
||||||
|
column=1,
|
||||||
|
ipadx=2,
|
||||||
|
ipady=2,
|
||||||
|
padx=2,
|
||||||
|
pady=2)
|
||||||
|
lblgnome.grid(row=12, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
else:
|
||||||
|
btngnomeweb.grid(
|
||||||
|
row=11,
|
||||||
|
column=1,
|
||||||
|
ipadx=2,
|
||||||
|
ipady=2,
|
||||||
|
padx=2,
|
||||||
|
pady=2)
|
||||||
|
lblgnome.grid(row=12, column=1, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
# see if the window should show or not.
|
||||||
|
if int(hbresult[0]) > 0:
|
||||||
|
btnhbon.grid(row=11, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
else:
|
||||||
|
btnhbof.grid(row=11, column=2, ipadx=2, ipady=2, padx=2, pady=2)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
newrech()
|
||||||
|
PepHub().mainloop()
|
After Width: | Height: | Size: 19 KiB |
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
_extras=pepicons
|
||||||
|
_repo="PepIcons"
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Quietly have wget -q0- "pipe" its output directly to tar.
|
||||||
|
# Use tar -xvz to decompress, list and untar the DL file
|
||||||
|
# to the symlink 'pepicons' in /usr/share, on the fly.
|
||||||
|
# Leaving no files to remove and no permission changes required.
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
echo -en "\n\t Password required to update icon cache\n\t"
|
||||||
|
sudo clear || exit
|
||||||
|
|
||||||
|
echo -en "\n Downloadng new ${_extras} to /usr/share/"
|
||||||
|
wget -qO- https://codeberg.org/Peppermint_OS/${_repo}/archive/main.tar.gz |
|
||||||
|
tar -vxz -C /usr/share 2>/dev/null
|
||||||
|
sudo /usr/sbin/update-icon-caches /usr/share/icons/*
|
||||||
|
|
||||||
|
# Go back to the Extras
|
||||||
|
python3 /opt/pypep/pge.py &
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import tkinter as tk
|
||||||
|
from tendo import singleton
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ttk.Window(themename="darkly")
|
||||||
|
window_height = 120
|
||||||
|
window_width = 420
|
||||||
|
pexs.title('Additional Icons')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
def ico ():
|
||||||
|
"""Check if user can connect to codeberg"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.system('python3 /opt/pypep/diagicochk.py')
|
||||||
|
|
||||||
|
def xc ():
|
||||||
|
"""close the form start back at pge"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#title message
|
||||||
|
lblexp = ttk.Label(pexs, bootstyle="light", text="Would you like to install addtional icons created by the Peppermint Team and Community?.", wraplength=400)
|
||||||
|
lblexp.pack(side ="top")
|
||||||
|
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
btncore = ttk.Button(text="Install", bootstyle="danger-outline", command=ico, width=8)
|
||||||
|
btncore.pack(side="left", padx=5, pady=5)
|
||||||
|
bttut = ttk.Button(text='Cancel', bootstyle="danger-outline", width=8, command=xc)
|
||||||
|
bttut.pack(side="left", padx=5, pady=5)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
pexs.mainloop()
|
After Width: | Height: | Size: 79 KiB |
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import sqlite3
|
||||||
|
from tkinter import *
|
||||||
|
from tkinter import ttk
|
||||||
|
from tkinter import font
|
||||||
|
from ttkthemes import ThemedTk
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
from tendo import singleton
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ThemedTk(theme='clam')
|
||||||
|
window_height = 130
|
||||||
|
window_width = 350
|
||||||
|
pexs.title('General Dialog')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
pexs['bg']='#2f2f2f'
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
#main information syles
|
||||||
|
subpmt = ttk.Style()
|
||||||
|
subpmt.configure("Whiteb.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '14', 'bold') )
|
||||||
|
|
||||||
|
#style the buttons
|
||||||
|
stbnt = ttk.Style()
|
||||||
|
stbnt.configure('pep.TButton', font = ('Helvetica', '14', 'bold'))
|
||||||
|
stbnt.map("pep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', '#2f2f2f'), ('active', 'white')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')],
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
cbtn = ttk.Style()
|
||||||
|
cbtn.map("hpep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', 'white'), ('active', '#F62817')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')]
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
def killme():
|
||||||
|
pexs.destroy()
|
||||||
|
|
||||||
|
#Message information
|
||||||
|
lblexp = ttk.Label(pexs, style="Whiteb.TLabel", text="Done!", wraplength=500)
|
||||||
|
lblexp.place(x=140, y=30)
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
bttut = ttk.Button(text='Close', style="pep.TButton", width=8, command=killme )
|
||||||
|
bttut.place(x=120, y=70)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,70 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import sqlite3
|
||||||
|
from tkinter import *
|
||||||
|
from tkinter import ttk
|
||||||
|
from tkinter import font
|
||||||
|
from ttkthemes import ThemedTk
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
from tendo import singleton
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ThemedTk(theme='clam')
|
||||||
|
window_height = 130
|
||||||
|
window_width = 350
|
||||||
|
pexs.title('No Connection!')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
pexs['bg']='#2f2f2f'
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
#main information syles
|
||||||
|
subpmt = ttk.Style()
|
||||||
|
subpmt.configure("Whiteb.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '14', 'bold') )
|
||||||
|
|
||||||
|
#style the buttons
|
||||||
|
stbnt = ttk.Style()
|
||||||
|
stbnt.configure('pep.TButton', font = ('Helvetica', '14', 'bold'))
|
||||||
|
stbnt.map("pep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', '#2f2f2f'), ('active', 'white')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')],
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
cbtn = ttk.Style()
|
||||||
|
cbtn.map("hpep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', 'white'), ('active', '#F62817')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')]
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
def killme():
|
||||||
|
pexs.destroy()
|
||||||
|
|
||||||
|
#Message information
|
||||||
|
lblexp = ttk.Label(pexs, style="Whiteb.TLabel", text="Cannot connect to CodeBerg!", wraplength=500)
|
||||||
|
lblexp.place(x=30, y=30)
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
bttut = ttk.Button(text='Close', style="pep.TButton", width=8, command=killme )
|
||||||
|
bttut.place(x=120, y=70)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,282 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import tkinter as tk
|
||||||
|
import time
|
||||||
|
from tkinter import *
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
from tkinter import font
|
||||||
|
#from ttkthemes import ThemedTk
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
import apt
|
||||||
|
import putilities
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
#makes sure only a single instance is running
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
#list of all checkboxes and their current value
|
||||||
|
checkboxstates = []
|
||||||
|
|
||||||
|
#this will set the window name and style.
|
||||||
|
instw = ttk.Window(themename="darkly")
|
||||||
|
#the window size
|
||||||
|
instw.geometry('680x520')
|
||||||
|
#the title of the window
|
||||||
|
instw.title("Suggested Packages")
|
||||||
|
#set the icon for the window
|
||||||
|
instw.tk.call('wm', 'iconphoto', instw._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
|
||||||
|
#logo for the main window
|
||||||
|
#peplogo = PhotoImage(file = "/usr/share/pixmaps/peppermint-48.png")
|
||||||
|
#logo = tk.Label(instw, image=peplogo, borderwidth=0,bg='#2f2f2f').place(x=85, y=5)
|
||||||
|
|
||||||
|
#row for all the items but the logo and the title
|
||||||
|
row = 20
|
||||||
|
row2 = 360
|
||||||
|
|
||||||
|
#main title style
|
||||||
|
spmt = ttk.Style()
|
||||||
|
spmt.configure("F62817.TLabel", foreground ="#ffffff", background ="#222222", font = ("Helvetica", '22', 'bold') )
|
||||||
|
|
||||||
|
###This is all the lables and verbiage used and thier placements
|
||||||
|
lblpmtitle = ttk.Label(instw, style="F62817.TLabel", text="Select Your Software Packages").place(x=140, y=10)
|
||||||
|
lblpmsubtitle = ttk.Label(instw, bootstyle="light", text="Darkened items are already installed. \nPackages are from Debian Repositories.").place(x=row2, y=310)
|
||||||
|
lblpmsubtitle = ttk.Label(instw, bootstyle="light", text="At PeppermintOS, we let our users decide what software is on their system.").place(x=140, y=40)
|
||||||
|
|
||||||
|
lblsoftware = ttk.Label(instw, bootstyle="light", text="Software").place(x=100, y=80)
|
||||||
|
lblbrowsers = ttk.Label(instw, bootstyle="light", text="Browsers").place(x=440, y=80)
|
||||||
|
|
||||||
|
#installed message
|
||||||
|
|
||||||
|
#instaledtitle = ttk.Label(instw, style="Dark.TLabel", text="ColoF62817 Packages are installed.").place(x=row2, y=300)
|
||||||
|
|
||||||
|
#output textbox
|
||||||
|
textbox = Text(instw, background="#2f2f2f",foreground="white", height="50",state='disabled')
|
||||||
|
textbox.place(x=0, y=420, height=100, width=680)
|
||||||
|
textbox.configure(font = ("GNU Unifont", '8') )
|
||||||
|
|
||||||
|
#if this package is already installed, grey out the item
|
||||||
|
def InstallCheck(appname, checkbox):
|
||||||
|
if putilities.installcheck(appname):
|
||||||
|
checkbox.configure(state=["disabled"])
|
||||||
|
|
||||||
|
#firefox
|
||||||
|
firefox = StringVar()
|
||||||
|
firefox.set("off")
|
||||||
|
cbfirefox = ttk.Checkbutton(instw, bootstyle="danger", variable=firefox, onvalue='firefox-esr', offvalue="off", text="Firefox: Mozilla's Open-source browser")
|
||||||
|
cbfirefox.place(x=row2,y=100)
|
||||||
|
checkboxstates.append(firefox)
|
||||||
|
InstallCheck("firefox-esr", cbfirefox)
|
||||||
|
|
||||||
|
#konqueror
|
||||||
|
konqueror = StringVar()
|
||||||
|
konqueror.set("off")
|
||||||
|
cbkonqueror = ttk.Checkbutton(instw, bootstyle="danger", variable=konqueror, onvalue="konqueror", offvalue="off", text="Konqueror: KDE browser and file manager")
|
||||||
|
cbkonqueror.place(x=row2,y=120)
|
||||||
|
checkboxstates.append(konqueror)
|
||||||
|
InstallCheck("konqueror", cbkonqueror)
|
||||||
|
|
||||||
|
#epiphany-browser
|
||||||
|
epiphany = StringVar()
|
||||||
|
epiphany.set("off")
|
||||||
|
cbepiphany = ttk.Checkbutton(instw, bootstyle="danger", variable=epiphany, onvalue="epiphany-browser", offvalue="off", text="Gnome Web (Epiphany): Intuitive browser")
|
||||||
|
cbepiphany.place(x=row2,y=140)
|
||||||
|
checkboxstates.append(epiphany)
|
||||||
|
InstallCheck("epiphany-browser", cbepiphany)
|
||||||
|
|
||||||
|
#falkon
|
||||||
|
falkon = StringVar()
|
||||||
|
falkon.set("off")
|
||||||
|
cbfalkon = ttk.Checkbutton(instw, bootstyle="danger", variable=falkon, onvalue="falkon", offvalue="off", text="Falkon: Qt5 browser by KDE")
|
||||||
|
cbfalkon.place(x=row2,y=160)
|
||||||
|
checkboxstates.append(falkon)
|
||||||
|
InstallCheck("falkon", cbfalkon)
|
||||||
|
|
||||||
|
#torbrowser-launcher
|
||||||
|
torbrowser = StringVar()
|
||||||
|
torbrowser.set("off")
|
||||||
|
cbtorbrowser = ttk.Checkbutton(instw, bootstyle="danger", variable=torbrowser, onvalue="torbrowser-launcher", offvalue="off", text="Tor Browser: Privacy browser")
|
||||||
|
cbtorbrowser.place(x=row2,y=180)
|
||||||
|
checkboxstates.append(torbrowser)
|
||||||
|
InstallCheck("torbrowser-launcher", cbtorbrowser)
|
||||||
|
|
||||||
|
#midori
|
||||||
|
midori = StringVar()
|
||||||
|
midori.set("off")
|
||||||
|
cbmidori = ttk.Checkbutton(instw, bootstyle="danger", variable=midori, onvalue="midori", offvalue="off", text="Midori: Fast, lightweight browser")
|
||||||
|
cbmidori.place(x=row2,y=200)
|
||||||
|
checkboxstates.append(midori)
|
||||||
|
InstallCheck("midori", cbmidori)
|
||||||
|
|
||||||
|
#qutebrowser
|
||||||
|
qutebrowser = StringVar()
|
||||||
|
qutebrowser.set("off")
|
||||||
|
cbqutebrowser = ttk.Checkbutton(instw, bootstyle="danger", variable=qutebrowser, onvalue="qutebrowser", offvalue="off", text="Qutebrowser: Vim-like browser")
|
||||||
|
cbqutebrowser.place(x=row2,y=220)
|
||||||
|
checkboxstates.append(qutebrowser)
|
||||||
|
InstallCheck("qutebrowser", cbqutebrowser)
|
||||||
|
|
||||||
|
#luakit
|
||||||
|
luakit = StringVar()
|
||||||
|
luakit.set("off")
|
||||||
|
cbluakit = ttk.Checkbutton(instw, bootstyle="danger", variable=luakit, onvalue="luakit", offvalue="off", text="Luakit: Browser extensible by Lua")
|
||||||
|
cbluakit.place(x=row2,y=240)
|
||||||
|
checkboxstates.append(luakit)
|
||||||
|
InstallCheck("luakit", cbluakit)
|
||||||
|
|
||||||
|
#chromium
|
||||||
|
chromium = StringVar()
|
||||||
|
chromium.set("off")
|
||||||
|
cbchromium = ttk.Checkbutton(instw, bootstyle="danger", variable=chromium, onvalue="chromium", offvalue="off", text="Chromium: Google's Open-Source browser")
|
||||||
|
cbchromium.place(x=row2,y=260)
|
||||||
|
checkboxstates.append(chromium)
|
||||||
|
InstallCheck("chromium", cbchromium)
|
||||||
|
|
||||||
|
#atril
|
||||||
|
atril = StringVar()
|
||||||
|
atril.set("off")
|
||||||
|
cbatril = ttk.Checkbutton(instw, bootstyle="danger", variable=atril, onvalue="atril", offvalue="off", text="Atril: a multi-page document viewer")
|
||||||
|
cbatril.place(x=row,y=100)
|
||||||
|
checkboxstates.append(atril)
|
||||||
|
InstallCheck("atril", cbatril)
|
||||||
|
|
||||||
|
#transmission
|
||||||
|
transmission = StringVar()
|
||||||
|
transmission.set("off")
|
||||||
|
cbtransmission = ttk.Checkbutton(instw, bootstyle="danger", variable=transmission, onvalue="transmission", offvalue="off", text="Transmission BitTorrent Client")
|
||||||
|
cbtransmission.place(x=row,y=120)
|
||||||
|
checkboxstates.append(transmission)
|
||||||
|
InstallCheck("transmission", cbtransmission)
|
||||||
|
|
||||||
|
#ARandR
|
||||||
|
arandr = StringVar()
|
||||||
|
arandr.set("off")
|
||||||
|
cbarandr = ttk.Checkbutton(instw, bootstyle="danger", variable=arandr, onvalue="arandr", offvalue="off", text="ARandR: Another XRandR GUI")
|
||||||
|
cbarandr.place(x=row,y=140)
|
||||||
|
checkboxstates.append(arandr)
|
||||||
|
InstallCheck("arandr", cbarandr)
|
||||||
|
|
||||||
|
#pmount
|
||||||
|
pmount = StringVar()
|
||||||
|
pmount.set("off")
|
||||||
|
cbpmount = ttk.Checkbutton(instw, bootstyle="danger", variable=pmount, onvalue="pmount", offvalue="off", text="pmount: Standard mount program")
|
||||||
|
cbpmount.place(x=row,y=160)
|
||||||
|
checkboxstates.append(pmount)
|
||||||
|
InstallCheck("pmount", cbpmount)
|
||||||
|
|
||||||
|
#dconf-editor
|
||||||
|
dconfeditor = StringVar()
|
||||||
|
dconfeditor.set("off")
|
||||||
|
cbdconfeditor = ttk.Checkbutton(instw, bootstyle="danger", variable=dconfeditor, onvalue="dconf-editor", offvalue="off", text="DConf Editor: For environment settings")
|
||||||
|
cbdconfeditor.place(x=row,y=180)
|
||||||
|
checkboxstates.append(dconfeditor)
|
||||||
|
InstallCheck("dconf-editor", cbdconfeditor)
|
||||||
|
|
||||||
|
#gpicview
|
||||||
|
gpicview = StringVar()
|
||||||
|
gpicview.set("off")
|
||||||
|
cbgpicview = ttk.Checkbutton(instw, bootstyle="danger", variable=gpicview, onvalue="gpicview", offvalue="off", text="GpicView image viewer")
|
||||||
|
cbgpicview.place(x=row,y=200)
|
||||||
|
checkboxstates.append(gpicview)
|
||||||
|
InstallCheck("gpicview", cbgpicview)
|
||||||
|
|
||||||
|
#parole
|
||||||
|
parole = StringVar()
|
||||||
|
parole.set("off")
|
||||||
|
cbparole = ttk.Checkbutton(instw, bootstyle="danger", variable=parole, onvalue="parole", offvalue="off", text="Parole: Media player for Xfce")
|
||||||
|
cbparole.place(x=row,y=220)
|
||||||
|
checkboxstates.append(parole)
|
||||||
|
InstallCheck("parole", cbparole)
|
||||||
|
|
||||||
|
#mate-calc
|
||||||
|
matecalc = StringVar()
|
||||||
|
matecalc.set("off")
|
||||||
|
cbmatecalc = ttk.Checkbutton(instw, bootstyle="danger", variable=matecalc, onvalue="mate-calc", offvalue="off", text="Mate Calculator")
|
||||||
|
cbmatecalc.place(x=row,y=240)
|
||||||
|
checkboxstates.append(matecalc)
|
||||||
|
InstallCheck("mate-calc", cbmatecalc)
|
||||||
|
|
||||||
|
#snapd
|
||||||
|
snapd = StringVar()
|
||||||
|
snapd.set("off")
|
||||||
|
cbsnapd = ttk.Checkbutton(instw, bootstyle="danger", variable=snapd, onvalue="snapd", offvalue="off", text="Snap Package Platform")
|
||||||
|
cbsnapd.place(x=row,y=260)
|
||||||
|
checkboxstates.append(snapd)
|
||||||
|
InstallCheck("snapd", cbsnapd)
|
||||||
|
|
||||||
|
#flatpak
|
||||||
|
flatpak = StringVar()
|
||||||
|
flatpak.set("off")
|
||||||
|
cbflatpak = ttk.Checkbutton(instw, bootstyle="danger", variable=flatpak, onvalue="flatpak", offvalue="off", text="Flatpak Packages Platform")
|
||||||
|
cbflatpak.place(x=row,y=280)
|
||||||
|
checkboxstates.append(flatpak)
|
||||||
|
InstallCheck("flatpak", cbflatpak)
|
||||||
|
|
||||||
|
#gnome-software
|
||||||
|
gnomesoftware = StringVar()
|
||||||
|
gnomesoftware.set("off")
|
||||||
|
cbgnomesoftware = ttk.Checkbutton(instw, bootstyle="danger", variable=gnomesoftware, onvalue="gnome-software", offvalue="off", text="Gnome software store")
|
||||||
|
cbgnomesoftware.place(x=row,y=300)
|
||||||
|
checkboxstates.append(gnomesoftware)
|
||||||
|
InstallCheck("gnome-software", cbgnomesoftware)
|
||||||
|
|
||||||
|
#youtube-dl
|
||||||
|
youtubedl = StringVar()
|
||||||
|
youtubedl.set("off")
|
||||||
|
cbyoutubedl = ttk.Checkbutton(instw, bootstyle="danger", variable=youtubedl, onvalue="youtube-dl", offvalue="off", text="YouTube-DL: YouTube Downloader Tool")
|
||||||
|
cbyoutubedl.place(x=row,y=320)
|
||||||
|
checkboxstates.append(youtubedl)
|
||||||
|
InstallCheck("youtube-dl", cbyoutubedl)
|
||||||
|
|
||||||
|
def install(applist):
|
||||||
|
btn.place_forget()
|
||||||
|
textbox.configure(state='normal')
|
||||||
|
|
||||||
|
def textout(line):
|
||||||
|
textbox.insert(tk.END, line)
|
||||||
|
textbox.update_idletasks()
|
||||||
|
textbox.see("end")
|
||||||
|
print(line + "\n")
|
||||||
|
|
||||||
|
if(len(applist) > 0):
|
||||||
|
with subprocess.Popen( ["apt-get","install","-y"] + applist,shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) as p:
|
||||||
|
if p.stdout:
|
||||||
|
for line in p.stdout:
|
||||||
|
textout(line)
|
||||||
|
if p.stderr:
|
||||||
|
for line in p.stderr:
|
||||||
|
textout(line)
|
||||||
|
textout("Done.")
|
||||||
|
textbox.configure(state='disabled')
|
||||||
|
btn.place(x=245, y=375, height= 30, width=150)
|
||||||
|
def fin ():
|
||||||
|
instw.destroy()
|
||||||
|
|
||||||
|
def getcheckboxes():
|
||||||
|
btnwk = ttk.Button(instw,text="Installing...")
|
||||||
|
btn.place(x=245, y=375, height= 30, width=150)
|
||||||
|
appqueue = []
|
||||||
|
for item in checkboxstates:
|
||||||
|
if item.get() != "off":
|
||||||
|
appqueue.append(item.get())
|
||||||
|
print(appqueue)
|
||||||
|
|
||||||
|
if(len(appqueue) > 0):
|
||||||
|
install(appqueue)
|
||||||
|
else:
|
||||||
|
textbox.configure(state='normal')
|
||||||
|
textbox.insert(tk.END, "No packages selected. Please select a package.\n")
|
||||||
|
textbox.update_idletasks()
|
||||||
|
textbox.see("end")
|
||||||
|
textbox.configure(state='disabled')
|
||||||
|
|
||||||
|
#inital Begin install button
|
||||||
|
btn = ttk.Button(instw,text="Install Selected",bootstyle="light-outline",command=getcheckboxes)
|
||||||
|
##Placement of the Begin install button##
|
||||||
|
btn.place(x=245, y=375, height= 30, width=150)
|
||||||
|
btnf = ttk.Button(instw,bootstyle="light-outline", text="Done",command=getcheckboxes)
|
||||||
|
btn.place(x=245, y=375, height= 30, width=150)
|
||||||
|
##Start the window#
|
||||||
|
instw.mainloop()
|
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 18 KiB |
|
@ -0,0 +1,140 @@
|
||||||
|
/*/ Set the body base/*/
|
||||||
|
body {
|
||||||
|
background-color: #111111;
|
||||||
|
color: white;
|
||||||
|
font-family: Cantarell;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*/ set the td syles /*/
|
||||||
|
td {
|
||||||
|
font-size: 13.3px;
|
||||||
|
text-align:left;
|
||||||
|
padding:5px;
|
||||||
|
border: 1.5px solid white;
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* unvisited link */
|
||||||
|
a:link {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* visited link */
|
||||||
|
a:visited {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* mouse over link */
|
||||||
|
a:hover {
|
||||||
|
color: black;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*/Controle the search bar title style/*/
|
||||||
|
p {
|
||||||
|
font-size: 30px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: Cantarell;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*/ the base Grid container/*/
|
||||||
|
.grid-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto auto auto;
|
||||||
|
background-color: #770a0a;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*/ Each block in the grid/*/
|
||||||
|
.grid-item {
|
||||||
|
background-color: #770a0a;
|
||||||
|
border: #770a0a;
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
font-family: Cantarell;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
/*/Search button style/*/
|
||||||
|
.button {
|
||||||
|
background-color: #770a0a; /* go */
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
padding: 5px 20px;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 16px;
|
||||||
|
margin: 4px 2px;
|
||||||
|
transition-duration: 0.4s;
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height:42px;
|
||||||
|
}
|
||||||
|
.btngo {
|
||||||
|
background-color: #770a0a;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid white;
|
||||||
|
}
|
||||||
|
.btngo:hover {
|
||||||
|
background-color: #7b3737;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid #770a0a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*/Search box Style*/
|
||||||
|
input[type=search], select {
|
||||||
|
width: 70%;
|
||||||
|
padding: 12px 20px;
|
||||||
|
margin: 8px 0;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style the tab */
|
||||||
|
.tab {
|
||||||
|
overflow: hidden;
|
||||||
|
border: 0px solid #ccc;
|
||||||
|
background-color: #ffffff;
|
||||||
|
width: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style the buttons that are used to open the tab content */
|
||||||
|
.tab button {
|
||||||
|
background-color: #770a0a;
|
||||||
|
color: white;
|
||||||
|
float: left;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 14px 16px;
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Change background color of buttons on hover */
|
||||||
|
.tab button:hover {
|
||||||
|
background-color: #7b3737;
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create an active/current tablink class */
|
||||||
|
.tab button.active {
|
||||||
|
background-color: #7b3737;
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style the tab content */
|
||||||
|
.tabcontent {
|
||||||
|
display: none;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border: 0px solid #ccc;
|
||||||
|
border-top: none;
|
||||||
|
background-color: #770a0a;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,690 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
__author__ = "PepDebian"
|
||||||
|
__copyright__ = "Copyright (C) 2022 PepDebian"
|
||||||
|
__license__ = "GPL"
|
||||||
|
__version__ = "3.0 or greater"
|
||||||
|
import tkinter as tk
|
||||||
|
import subprocess
|
||||||
|
import tkinter
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
import filecmp
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import time
|
||||||
|
import sqlite3
|
||||||
|
import datetime
|
||||||
|
from crontab import CronTab
|
||||||
|
from git import Repo
|
||||||
|
from ttkbootstrap.scrolled import ScrolledText
|
||||||
|
from ttkbootstrap.constants import *
|
||||||
|
from tkinter import Frame
|
||||||
|
from threading import Thread
|
||||||
|
|
||||||
|
|
||||||
|
##setup the window
|
||||||
|
pwin = ttk.Window(themename="darkly")
|
||||||
|
pwin.title('Peppermint Update Manager')
|
||||||
|
pwin.tk.call('wm', 'iconphoto', pwin._w,
|
||||||
|
tk.PhotoImage(
|
||||||
|
file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
pwin['bg'] = '#000000'
|
||||||
|
window_height = 630
|
||||||
|
window_width = 750
|
||||||
|
|
||||||
|
##set the database connection string
|
||||||
|
dcon = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
pcur = dcon.cursor()
|
||||||
|
#Create the update table
|
||||||
|
pcur.execute(""" CREATE TABLE IF NOT EXISTS upsched (id integer PRIMARY KEY AUTOINCREMENT, dname text, cronnum int, hr int, min int);""")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## The Functions
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen. """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
screen_width = pwin.winfo_screenwidth()
|
||||||
|
screen_height = pwin.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window
|
||||||
|
# to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pwin.geometry("{}x{}+{}+{}".format(window_width,
|
||||||
|
window_height, x_cordinate,
|
||||||
|
y_cordinate))
|
||||||
|
def drepo():
|
||||||
|
"""Delete the temp repo files."""
|
||||||
|
fld = '/opt/tmprpo/'
|
||||||
|
for filename in os.listdir(fld):
|
||||||
|
fp = os.path.join(fld, filename)
|
||||||
|
try:
|
||||||
|
if os.path.isfile(fp) or os.path.islink(fp):
|
||||||
|
os.unlink(fp)
|
||||||
|
elif os.path.isdir(fp):
|
||||||
|
shutil.rmtree(fld)
|
||||||
|
except Exception as e:
|
||||||
|
print('Failed to delete %s. Reason: %s' % (fp, e))
|
||||||
|
def cbclone():
|
||||||
|
"""Clones the Production Tools Repo locally"""
|
||||||
|
repo_url = 'https://codeberg.org/Peppermint_OS/PepProTools.git'
|
||||||
|
repo_path = '/opt/tmprpo/'
|
||||||
|
if os.path.exists(repo_path):
|
||||||
|
shutil.rmtree(repo_path)
|
||||||
|
else:
|
||||||
|
os.makedirs(repo_path)
|
||||||
|
Repo.clone_from(repo_url, repo_path)
|
||||||
|
def checkfiles():
|
||||||
|
"""Compare the repo files downloaded with what is in opt and detemrine if an update is needed"""
|
||||||
|
b = '/opt/pypep/'
|
||||||
|
a = '/opt/tmprpo/'
|
||||||
|
comp = filecmp.dircmp(a, b)
|
||||||
|
common = sorted(comp.common)
|
||||||
|
left = sorted(comp.left_list)
|
||||||
|
right = sorted(comp.right_list)
|
||||||
|
if left != common or right != common:
|
||||||
|
file_names = os.listdir(a)
|
||||||
|
for file_name in file_names:
|
||||||
|
if file_name.endswith(".git"):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
shutil.copy(os.path.join(a, file_name), b)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
def updtpeptools():
|
||||||
|
"""brings all the update tool functions together"""
|
||||||
|
terminalstuff.delete(1.0,END)
|
||||||
|
pwin.update()
|
||||||
|
msg1='''
|
||||||
|
Checking Codeberg for updates'''
|
||||||
|
terminalstuff.insert('end', msg1)
|
||||||
|
pwin.update()
|
||||||
|
cbclone()
|
||||||
|
msg2='''
|
||||||
|
Applying updates'''
|
||||||
|
terminalstuff.insert('end', msg2)
|
||||||
|
pwin.update()
|
||||||
|
checkfiles()
|
||||||
|
msg3='''
|
||||||
|
Cleaning up....'''
|
||||||
|
terminalstuff.insert('end', msg3)
|
||||||
|
pwin.update()
|
||||||
|
drepo()
|
||||||
|
message ='''
|
||||||
|
Your Peppermint Tools have been updated!'''
|
||||||
|
terminalstuff.insert('end', message)
|
||||||
|
pwin.update()
|
||||||
|
def pu(cmd, terminal):
|
||||||
|
"""set up the pipe process."""
|
||||||
|
#set thecompleted message
|
||||||
|
pepipe = subprocess.Popen(cmd, stdin=subprocess.PIPE,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
bufsize=1,
|
||||||
|
universal_newlines=True,
|
||||||
|
shell=True)
|
||||||
|
pepipe.poll()
|
||||||
|
|
||||||
|
while True:
|
||||||
|
line = pepipe.stdout.readline()
|
||||||
|
terminal.insert(tk.END, line)
|
||||||
|
terminal.see(tk.END)
|
||||||
|
if not line and pepipe.poll is not None:
|
||||||
|
break
|
||||||
|
|
||||||
|
commsg='''Completed!'''
|
||||||
|
terminalstuff.insert('end', commsg)
|
||||||
|
def peppersys():
|
||||||
|
""" This will apt command and send the results to the terminal textbox """
|
||||||
|
sysu = "apt update && apt upgrade -y"
|
||||||
|
pepper = Thread(target=lambda: pu(sysu, terminalstuff))
|
||||||
|
pepper.start()
|
||||||
|
terminalstuff.delete(1.0,END)
|
||||||
|
def ldsettings():
|
||||||
|
"""Preset the update options based on what is stored in the database"""
|
||||||
|
##set the connector
|
||||||
|
dbst = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
mvar ="Mon"
|
||||||
|
tuvar ="Tue"
|
||||||
|
wvar ="Wed"
|
||||||
|
tvar ="Thu"
|
||||||
|
fvar ="Fri"
|
||||||
|
savar ="Sat"
|
||||||
|
suvar ="Sun"
|
||||||
|
##set the queries
|
||||||
|
cbval= """ SELECT COUNT(*) FROM upsched WHERE dname = ?;"""
|
||||||
|
hval= """ SELECT hr FROM upsched WHERE hr IS NOT NULL;"""
|
||||||
|
hcval= """ SELECT COUNT(*) FROM upsched WHERE hr IS NOT NULL;"""
|
||||||
|
mval= """ SELECT min FROM upsched WHERE min IS NOT NULL;"""
|
||||||
|
mcval= """ SELECT COUNT(*) FROM upsched WHERE min IS NOT NULL;"""
|
||||||
|
##set the cursor to be used for execution
|
||||||
|
dcur = dbst.cursor()
|
||||||
|
##Start the hr call
|
||||||
|
dcur.execute(hcval)
|
||||||
|
hrc = dcur.fetchone()
|
||||||
|
if int(hrc[0])>0:
|
||||||
|
#If there is a hour value in the databes set the texbox
|
||||||
|
#widget to that value.
|
||||||
|
dcur.execute(hval)
|
||||||
|
hsel = dcur.fetchone()
|
||||||
|
txtopthour.insert(0,hsel)
|
||||||
|
else:
|
||||||
|
#if there is no value print this message and pass.
|
||||||
|
print ('No hour value is there')
|
||||||
|
pass
|
||||||
|
##Start the minute call
|
||||||
|
dcur.execute(mcval)
|
||||||
|
minc = dcur.fetchone()
|
||||||
|
if int(minc[0])>0:
|
||||||
|
#If there is a minute value in the databes set the texbox
|
||||||
|
#widget to that value.
|
||||||
|
dcur.execute(mval)
|
||||||
|
msel = dcur.fetchone()
|
||||||
|
txtoptmin.insert(0,msel)
|
||||||
|
else:
|
||||||
|
#if there is no value print this message and pass.
|
||||||
|
print ('No minute value is there')
|
||||||
|
pass
|
||||||
|
##Start text box settings...##
|
||||||
|
##Monday
|
||||||
|
dcur.execute (cbval,(mvar,))
|
||||||
|
mr = dcur.fetchone()
|
||||||
|
if int(mr[0]) > 0:
|
||||||
|
#if the cbval is in the DB then print and set the checkbutton
|
||||||
|
#value
|
||||||
|
cbm_v.set(1)
|
||||||
|
print ("Mon is there")
|
||||||
|
else:
|
||||||
|
#If the cbval is 0 then print this message
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
|
||||||
|
#Tue##
|
||||||
|
dcur.execute (cbval,(tuvar,))
|
||||||
|
tur = dcur.fetchone()
|
||||||
|
if int(tur[0]) > 0:
|
||||||
|
cbtu_v.set(1)
|
||||||
|
print ("Tue is there")
|
||||||
|
else:
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
|
||||||
|
##Wed##
|
||||||
|
dcur.execute (cbval,(wvar,))
|
||||||
|
wr = dcur.fetchone()
|
||||||
|
if int(wr[0]) > 0:
|
||||||
|
cbw_v.set(1)
|
||||||
|
print ("Wed is there")
|
||||||
|
else:
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
##Thu##
|
||||||
|
dcur.execute (cbval,(tvar,))
|
||||||
|
tr = dcur.fetchone()
|
||||||
|
if int(tr[0]) > 0:
|
||||||
|
cbt_v.set(1)
|
||||||
|
print ("Thu is there")
|
||||||
|
else:
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
##Fri##
|
||||||
|
dcur.execute (cbval,(fvar,))
|
||||||
|
fr = dcur.fetchone()
|
||||||
|
if int(fr[0]) > 0:
|
||||||
|
cbf_v.set(1)
|
||||||
|
print ("Fri is there")
|
||||||
|
else:
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
##Sat##
|
||||||
|
dcur.execute (cbval,(savar,))
|
||||||
|
sar = dcur.fetchone()
|
||||||
|
if int(sar[0]) > 0:
|
||||||
|
cbsa_v.set(1)
|
||||||
|
print ("Sat is there")
|
||||||
|
else:
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
##Sun##
|
||||||
|
dcur.execute (cbval,(suvar,))
|
||||||
|
sur = dcur.fetchone()
|
||||||
|
if int(sur[0]) > 0:
|
||||||
|
cbsu_v.set(1)
|
||||||
|
print ("Sun is there")
|
||||||
|
else:
|
||||||
|
print ('Nothing There')
|
||||||
|
pass
|
||||||
|
def pcron():
|
||||||
|
"""This will set ccron table schedule to run updates"""
|
||||||
|
cron = CronTab(user='root')
|
||||||
|
# get the value that is entered in the hour text box
|
||||||
|
# it must be with 0 to 24 other wise it is out of range
|
||||||
|
# then see if the hour is already in the DB if it is
|
||||||
|
# delete it and add in the new value from the text box
|
||||||
|
# else its a new record and you just need to add it
|
||||||
|
##set the connector
|
||||||
|
db = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
#set the cursor
|
||||||
|
dbcur = db.cursor()
|
||||||
|
##This section will save the hour values entered in the database
|
||||||
|
hrtx = txtopthour.get()
|
||||||
|
if len(hrtx) == 0:
|
||||||
|
#If nothing was entered then print the message and pass the if
|
||||||
|
print ('nothing entered')
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
#if there is a value then delete it first then add the record
|
||||||
|
#other wise just add the record.
|
||||||
|
hra = int(hrtx)
|
||||||
|
if 0 <= hra <=24:
|
||||||
|
hval = """ SELECT COUNT(*) FROM upsched WHERE hr IS NOT NULL; """
|
||||||
|
hdel = """ DELETE FROM upsched WHERE hr IS NOT NULL; """
|
||||||
|
hrinsrt = """ INSERT INTO upsched (hr) VALUES (?); """
|
||||||
|
harg = hra
|
||||||
|
dbcur.execute(hval)
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
dbcur.execute(hdel)
|
||||||
|
db.commit()
|
||||||
|
dbcur.execute(hrinsrt,(harg,))
|
||||||
|
db.commit()
|
||||||
|
print(hra)
|
||||||
|
else:
|
||||||
|
dbcur.execute(hrinsrt, (harg,))
|
||||||
|
db.commit()
|
||||||
|
|
||||||
|
else:
|
||||||
|
print ('out of range')
|
||||||
|
##Same process for the Minute its a repeate as above but for the
|
||||||
|
##Minute text widget
|
||||||
|
mitx = txtoptmin.get()
|
||||||
|
if len(mitx) == 0:
|
||||||
|
print ('nothing entered')
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
mia = int(mitx)
|
||||||
|
if 0 <= mia <=24:
|
||||||
|
mval = """ SELECT COUNT(*) FROM upsched WHERE min IS NOT NULL; """
|
||||||
|
mdel = """ DELETE FROM upsched WHERE min IS NOT NULL; """
|
||||||
|
miinsrt = """ INSERT INTO upsched (min) VALUES (?); """
|
||||||
|
marg = mia
|
||||||
|
dbcur.execute(mval)
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
dbcur.execute(mdel)
|
||||||
|
db.commit()
|
||||||
|
dbcur.execute(miinsrt,(marg,))
|
||||||
|
db.commit()
|
||||||
|
print(mia)
|
||||||
|
else:
|
||||||
|
dbcur.execute(miinsrt, (marg,))
|
||||||
|
db.commit()
|
||||||
|
else:
|
||||||
|
print ('out of range')
|
||||||
|
# these are the days of the week checkbuttons if they are on or
|
||||||
|
# off do something
|
||||||
|
#var the message to print in terminal
|
||||||
|
alrdy = "There is already a value for that day,"
|
||||||
|
#set the variables used for the SQL queries
|
||||||
|
mvar ="Mon"
|
||||||
|
tuvar ="Tue"
|
||||||
|
wvar ="Wed"
|
||||||
|
tvar ="Thu"
|
||||||
|
fvar ="Fri"
|
||||||
|
savar ="Sat"
|
||||||
|
suvar ="Sun"
|
||||||
|
#set the queries
|
||||||
|
cval= """ SELECT COUNT(*) FROM upsched WHERE dname = ?;"""
|
||||||
|
dinsrt = """ INSERT INTO upsched(dname) VALUES (?);"""
|
||||||
|
drmv = """ DELETE FROM upsched WHERE dname = ?;"""
|
||||||
|
if cbm_v.get() == 1:
|
||||||
|
#run the query withthe variable
|
||||||
|
dbcur.execute (cval,(mvar,))
|
||||||
|
#get the result
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
#if the value is in the DB then print
|
||||||
|
print (alrdy, "Mon")
|
||||||
|
else:
|
||||||
|
#if it is not in the DB then add it
|
||||||
|
dbcur.execute(dinsrt,(mvar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Mon Added to Database')
|
||||||
|
#Create the new job
|
||||||
|
jobm = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Monday')
|
||||||
|
#Set the value to what is in the hour textbox
|
||||||
|
jobm.hour.on(hra)
|
||||||
|
#Set the value to what is in the minute textbox
|
||||||
|
jobm.minute.on(mia)
|
||||||
|
#set the day of the week
|
||||||
|
jobm.dow.on('1')
|
||||||
|
#Write the job to the crontab
|
||||||
|
cron.write()
|
||||||
|
#Show the job was witten
|
||||||
|
print('wrote cron')
|
||||||
|
#list the jobs in the terminal
|
||||||
|
for jobm in cron:
|
||||||
|
print (jobm)
|
||||||
|
#this is the finish monday function
|
||||||
|
print ('mon is on')
|
||||||
|
else:
|
||||||
|
##If unchecked Remove the current day value
|
||||||
|
if cbm_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(mvar,))
|
||||||
|
mdelresult = dbcur.fetchone()
|
||||||
|
if int(mdelresult[0]) > 0:
|
||||||
|
#run the delete query
|
||||||
|
dbcur.execute(drmv,(mvar,))
|
||||||
|
#commit the change to the database
|
||||||
|
db.commit()
|
||||||
|
#set what job to find in the crontab
|
||||||
|
jobm = cron.find_comment('Monday')
|
||||||
|
#Clear and write the contab
|
||||||
|
cron.remove(jobm)
|
||||||
|
cron.write()
|
||||||
|
#print that the cron job was deleted
|
||||||
|
print ('Mon Cron Deleted')
|
||||||
|
#print the Record was deleted from the Databaes
|
||||||
|
print ('Mon was deleted from db becuase the cb is off')
|
||||||
|
else:
|
||||||
|
#Print nothing deleted if nothing was found
|
||||||
|
print ('nothing to delete')
|
||||||
|
#pring that that the check box is off.
|
||||||
|
print ('mon is off')
|
||||||
|
if cbtu_v.get() == 1:
|
||||||
|
dbcur.execute (cval,(tuvar,))
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
print (alrdy, "Tue")
|
||||||
|
else:
|
||||||
|
dbcur.execute(dinsrt,(tuvar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Tue Added to Database')
|
||||||
|
jobtu = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Tuesday')
|
||||||
|
jobtu.hour.on(hra)
|
||||||
|
jobtu.minute.on(mia)
|
||||||
|
jobtu.dow.on(2)
|
||||||
|
cron.write()
|
||||||
|
for jobtu in cron:
|
||||||
|
print (jobtu)
|
||||||
|
print('wrote cron')
|
||||||
|
print ('tue is on')
|
||||||
|
else:
|
||||||
|
if cbtu_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(tuvar,))
|
||||||
|
tudelresult = dbcur.fetchone()
|
||||||
|
if int(tudelresult[0]) > 0:
|
||||||
|
dbcur.execute(drmv,(tuvar,))
|
||||||
|
db.commit()
|
||||||
|
jobtu = cron.find_comment('Tuesday')
|
||||||
|
cron.remove(jobtu)
|
||||||
|
cron.write()
|
||||||
|
print ('Tue Cron Deleted')
|
||||||
|
print ('Tue was deleted from db becuase the cb is off')
|
||||||
|
else:
|
||||||
|
print ('nothing to delete')
|
||||||
|
print ('tue is off')
|
||||||
|
if cbw_v.get() == 1:
|
||||||
|
dbcur.execute (cval,(wvar,))
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
print (alrdy, "Wed")
|
||||||
|
else:
|
||||||
|
dbcur.execute(dinsrt,(wvar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Wed Added to Database')
|
||||||
|
jobw = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Wednesday')
|
||||||
|
jobw.hour.on(hra)
|
||||||
|
jobw.minute.on(mia)
|
||||||
|
jobw.dow.on(3)
|
||||||
|
cron.write()
|
||||||
|
print('wrote cron')
|
||||||
|
print ('wed is on')
|
||||||
|
else:
|
||||||
|
if cbw_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(wvar,))
|
||||||
|
wdelresult = dbcur.fetchone()
|
||||||
|
if int(wdelresult[0]) > 0:
|
||||||
|
dbcur.execute(drmv,(wvar,))
|
||||||
|
db.commit()
|
||||||
|
jobw = cron.find_comment('Wednesday')
|
||||||
|
cron.remove(jobw)
|
||||||
|
cron.write()
|
||||||
|
print ('Wed Cron Deleted')
|
||||||
|
print ('Wed was deleted from db becuase the cb is off')
|
||||||
|
else:
|
||||||
|
print ('nothing to delete')
|
||||||
|
print ('wed is off')
|
||||||
|
if cbt_v.get() == 1:
|
||||||
|
dbcur.execute (cval,(tvar,))
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
print (alrdy, "Thu")
|
||||||
|
else:
|
||||||
|
dbcur.execute(dinsrt,(tvar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Thu Added to Database')
|
||||||
|
jobt = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Thursday')
|
||||||
|
jobt.hour.on(hra)
|
||||||
|
jobt.minute.on(mia)
|
||||||
|
jobt.dow.on(4)
|
||||||
|
cron.write()
|
||||||
|
print('wrote cron')
|
||||||
|
print ('thu is on')
|
||||||
|
else:
|
||||||
|
if cbt_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(tvar,))
|
||||||
|
tdelresult = dbcur.fetchone()
|
||||||
|
if int(tdelresult[0]) > 0:
|
||||||
|
dbcur.execute(drmv,(tvar,))
|
||||||
|
db.commit()
|
||||||
|
jobt = cron.find_comment('Thursday')
|
||||||
|
cron.remove(jobt)
|
||||||
|
cron.write()
|
||||||
|
print ('Thu Cron Deleted')
|
||||||
|
print ('Thu was deleted from db becuase the cb is off')
|
||||||
|
else:
|
||||||
|
print ('nothing to delete')
|
||||||
|
print ('thu is off')
|
||||||
|
|
||||||
|
if cbf_v.get() == 1:
|
||||||
|
dbcur.execute (cval,(fvar,))
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
print (alrdy, "Fri")
|
||||||
|
else:
|
||||||
|
dbcur.execute(dinsrt,(fvar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Fri Added to Database')
|
||||||
|
jobf = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Friday')
|
||||||
|
jobf.hour.on(hra)
|
||||||
|
jobf.minute.on(mia)
|
||||||
|
jobf.dow.on(5)
|
||||||
|
cron.write()
|
||||||
|
print('wrote cron')
|
||||||
|
print ('fri is on')
|
||||||
|
else:
|
||||||
|
if cbf_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(fvar,))
|
||||||
|
fdelresult = dbcur.fetchone()
|
||||||
|
if int(fdelresult[0]) > 0:
|
||||||
|
dbcur.execute(drmv,(fvar,))
|
||||||
|
db.commit()
|
||||||
|
jobf = cron.find_comment('Friday')
|
||||||
|
cron.remove(jobf)
|
||||||
|
cron.write()
|
||||||
|
print ('Fri Cron Deleted')
|
||||||
|
print ('Fri was deleted from db becuase the cb is off')
|
||||||
|
else:
|
||||||
|
print ('nothing to delete')
|
||||||
|
print ('fri is off')
|
||||||
|
if cbsa_v.get() == 1:
|
||||||
|
dbcur.execute (cval,(savar,))
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
print (alrdy, "Sat")
|
||||||
|
else:
|
||||||
|
dbcur.execute(dinsrt,(savar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Sat Added to Database')
|
||||||
|
jobsa = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Saturday')
|
||||||
|
jobsa.hour.on(hra)
|
||||||
|
jobsa.minute.on(mia)
|
||||||
|
jobsa.dow.on(6)
|
||||||
|
cron.write()
|
||||||
|
print('wrote cron')
|
||||||
|
print ('sat is on')
|
||||||
|
else:
|
||||||
|
if cbsa_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(savar,))
|
||||||
|
sadelresult = dbcur.fetchone()
|
||||||
|
if int(sadelresult[0]) > 0:
|
||||||
|
dbcur.execute(drmv,(savar,))
|
||||||
|
db.commit()
|
||||||
|
jobsa = cron.find_comment('Saturday')
|
||||||
|
cron.remove(jobsa)
|
||||||
|
cron.write()
|
||||||
|
print ('Sat Cron Deleted')
|
||||||
|
print ('Sat was deleted from db becuase the cb is off')
|
||||||
|
else:
|
||||||
|
print ('nothing to delete')
|
||||||
|
print ('sat is off')
|
||||||
|
if cbsu_v.get() == 1:
|
||||||
|
dbcur.execute (cval,(suvar,))
|
||||||
|
crresult = dbcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
print (alrdy, "Sun")
|
||||||
|
else:
|
||||||
|
dbcur.execute(dinsrt,(suvar,))
|
||||||
|
db.commit()
|
||||||
|
print ('Sun Added to Database')
|
||||||
|
jobsu = cron.new(command='/bin/sh opt/pypep/pepwork.sh', comment='Sunday')
|
||||||
|
jobsu.hour.on(hra)
|
||||||
|
jobsu.minute.on(mia)
|
||||||
|
jobsu.dow.on(0)
|
||||||
|
cron.write()
|
||||||
|
for job in cron:
|
||||||
|
print (job)
|
||||||
|
print('wrote cron')
|
||||||
|
print ('sun is on')
|
||||||
|
else:
|
||||||
|
if cbsu_v.get() == 0:
|
||||||
|
dbcur.execute (cval,(suvar,))
|
||||||
|
sudelresult = dbcur.fetchone()
|
||||||
|
if int(sudelresult[0]) > 0:
|
||||||
|
dbcur.execute(drmv,(suvar,))
|
||||||
|
db.commit()
|
||||||
|
jobsu = cron.find_comment('Sunday')
|
||||||
|
cron.remove(jobsu)
|
||||||
|
cron.write()
|
||||||
|
print ('Sun Cron Deleted')
|
||||||
|
print ('Sun was deleted from db because the cb is off')
|
||||||
|
else:
|
||||||
|
print ('nothing to delete')
|
||||||
|
print ('sun is off')
|
||||||
|
pwin.destroy()
|
||||||
|
#notebook stuff
|
||||||
|
pnb = ttk.Notebook(pwin, bootstyle="danger")
|
||||||
|
pnb.pack(pady=10, expand=True)
|
||||||
|
fnb1 = ttk.Frame (pnb, width=400, height=400)
|
||||||
|
fnb2 = ttk.Frame (pnb, width=400, height=400)
|
||||||
|
fnb1.pack(fill='both', expand=True)
|
||||||
|
fnb2.pack(fill='both', expand=True)
|
||||||
|
pnb.add(fnb1, text='Update Manager')
|
||||||
|
pnb.add(fnb2, text='Options')
|
||||||
|
# frames to use separate parts of the window
|
||||||
|
fbset0 = Frame (fnb1)
|
||||||
|
fbset0.pack(side="top")
|
||||||
|
fbset1 = Frame (fnb1)
|
||||||
|
fbset1.pack(side="top")
|
||||||
|
fbset3 = Frame (fnb1)
|
||||||
|
fbset3.pack(side="top")
|
||||||
|
fbset2 = Frame (fnb1)
|
||||||
|
fbset2.pack(side="top")
|
||||||
|
fbset4 = Frame (fnb1)
|
||||||
|
fbset4.pack(side="top")
|
||||||
|
fterm = Frame (fnb1)
|
||||||
|
fterm.pack(side="top", fill="both", expand = True)
|
||||||
|
#These lables provide space in betweenthe buttons
|
||||||
|
#Using pack on the Update manager tab
|
||||||
|
lbltitle = ttk.Label(fbset0)
|
||||||
|
lbltitle.pack()
|
||||||
|
lbltitle = ttk.Label(fbset3)
|
||||||
|
lbltitle.pack()
|
||||||
|
lbltitle = ttk.Label(fbset4)
|
||||||
|
lbltitle.pack()
|
||||||
|
#Holds the terminal output
|
||||||
|
terminalstuff = ScrolledText(fterm, padding=5, bootstyle="dark")
|
||||||
|
terminalstuff.pack(fill="both", expand = True)
|
||||||
|
## The things that are used on the Update Manager Tab
|
||||||
|
sysupdtbtn = ttk.Button(fbset1, text="System Updates", width=20, cursor="hand2", bootstyle="light-outline", command =peppersys)
|
||||||
|
sysupdtbtn.pack(side = "left")
|
||||||
|
ptupdtbtn = ttk.Button(fbset1, text="Update Pep Tools", width=20, cursor="hand2", bootstyle="light-outline", command=updtpeptools)
|
||||||
|
ptupdtbtn.pack(side = "left")
|
||||||
|
lblumsg = ttk.Label(fbset2, text="Use the buttons to update your tools or system", bootstyle="inverse-light")
|
||||||
|
lblumsg.pack()
|
||||||
|
|
||||||
|
## the things that are used on the Options tab
|
||||||
|
##The title of the Peppermint Tools Section
|
||||||
|
lblopttitle = ttk.Label(fnb2, text="Set a schedule for Peppermint tools", bootstyle="inverse-light")
|
||||||
|
lblopttitle.place(x=10, y=15)
|
||||||
|
##First one below the Peppermint tools title
|
||||||
|
sepoptlt = ttk.Separator(fnb2, bootstyle="danger", orient=HORIZONTAL)
|
||||||
|
sepoptlt.place(x=10, y=40, relwidth=1)
|
||||||
|
##Second one below the System Updates
|
||||||
|
sepopbtm = ttk.Separator(fnb2, bootstyle="danger", orient=HORIZONTAL)
|
||||||
|
sepopbtm.place(x=10, y=140, relwidth=1)
|
||||||
|
##The last one right above the information
|
||||||
|
sepopend = ttk.Separator(fnb2, bootstyle="danger", orient=HORIZONTAL)
|
||||||
|
sepopend.place(x=10, y=240, relwidth=1)
|
||||||
|
|
||||||
|
cbm_v = tkinter.IntVar()
|
||||||
|
cbm = ttk.Checkbutton(fnb2, text = "Mon", variable = cbm_v, bootstyle="success-round-toggle")
|
||||||
|
cbm.place(x=10, y=180)
|
||||||
|
cbtu_v = tkinter.IntVar()
|
||||||
|
cbtu = ttk.Checkbutton(fnb2, text = "Tue", variable = cbtu_v, bootstyle="success-round-toggle")
|
||||||
|
cbtu.place(x=80, y=180)
|
||||||
|
cbw_v = tkinter.IntVar()
|
||||||
|
cbw = ttk.Checkbutton(fnb2, text = "Wed", variable = cbw_v, bootstyle="success-round-toggle")
|
||||||
|
cbw.place(x=160, y=180)
|
||||||
|
cbt_v = tkinter.IntVar()
|
||||||
|
cbt = ttk.Checkbutton(fnb2, text = "Thu", variable = cbt_v, bootstyle="success-round-toggle")
|
||||||
|
cbt.place(x=240, y=180)
|
||||||
|
cbf_v = tkinter.IntVar()
|
||||||
|
cbf = ttk.Checkbutton(fnb2, text = "Fri", variable = cbf_v, bootstyle="success-round-toggle")
|
||||||
|
cbf.place(x=10, y=210)
|
||||||
|
cbsa_v = tkinter.IntVar()
|
||||||
|
cbsa = ttk.Checkbutton(fnb2, text = "Sat", variable = cbsa_v, bootstyle="success-round-toggle")
|
||||||
|
cbsa.place(x=80, y=210)
|
||||||
|
cbsu_v = tkinter.IntVar()
|
||||||
|
cbsu = ttk.Checkbutton(fnb2, text = "Sun", variable = cbsu_v, bootstyle="success-round-toggle")
|
||||||
|
cbsu.place(x=160, y=210)
|
||||||
|
##lets the user know the schedule will start from the selected date
|
||||||
|
lbloptdys = ttk.Label(fnb2, text="Select the days you want")
|
||||||
|
lbloptdys.place(x=10, y=150)
|
||||||
|
lblopttime = ttk.Label(fnb2, text="Select the time you want")
|
||||||
|
lblopttime.place(x=10, y=50)
|
||||||
|
lblopttimehr = ttk.Label(fnb2, text="hr")
|
||||||
|
lblopttimehr.place(x=17, y=80)
|
||||||
|
lblopttimemin = ttk.Label(fnb2, text="min")
|
||||||
|
lblopttimemin.place(x=66, y=80)
|
||||||
|
txtopthour = ttk.Entry(fnb2, bootstyle="danger", width=2)
|
||||||
|
txtopthour.place(x=10, y=100)
|
||||||
|
lblopttimecl = ttk.Label(fnb2, text=":")
|
||||||
|
lblopttimecl.place(x=50, y=105)
|
||||||
|
txtoptmin = ttk.Entry(fnb2, bootstyle="danger", width=2)
|
||||||
|
txtoptmin.place(x=66, y=100)
|
||||||
|
##this is the information section explaining what this application does.
|
||||||
|
##The frame that holds the message
|
||||||
|
instfr = ttk.Labelframe(fnb2, bootstyle="danger", text='Information')
|
||||||
|
instfr.place(x=10, y=270)
|
||||||
|
##The message
|
||||||
|
lblinstpt = ttk.Label(instfr, text="When you set a schedule for the Peppermint tools, the updater will check the git repos for any new updates that may be available and install them. Addtionally System Updates will check the Debian or Devuan repos depending on what spin of Peppermint you are running ", wraplength=600)
|
||||||
|
lblinstpt.pack(side="top", pady=5, padx=5)
|
||||||
|
btnpt = ttk.Button(fnb2, text="Save & Exit", cursor="hand2", bootstyle="light-outline", command=pcron)
|
||||||
|
btnpt.place(x=500, y=500)
|
||||||
|
#close db Connection
|
||||||
|
pcur.close
|
||||||
|
|
||||||
|
# call Center screen
|
||||||
|
center_screen()
|
||||||
|
ldsettings()
|
||||||
|
pwin.mainloop()
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pdir=/opt/tmprpox
|
||||||
|
fdir=/opt/tmprpox/PepProTools
|
||||||
|
desdir=/opt/pypep
|
||||||
|
cbr="https://codeberg.org/Peppermint_OS/PepProTools.git"
|
||||||
|
|
||||||
|
fwt(){
|
||||||
|
###Function to run if the folder was there (fwt)###
|
||||||
|
#remove the tmpropox
|
||||||
|
rm -r "$pdir"
|
||||||
|
#make a new folder tmprox
|
||||||
|
mkdir "$pdir"
|
||||||
|
#go to the tmprpox folder
|
||||||
|
cd "$pdir"
|
||||||
|
#clone the protools repo
|
||||||
|
git clone "$cbr"
|
||||||
|
#use rsynch to copy files over to the opt location
|
||||||
|
#rsync -av /opt/tmprpox/* /opt/pypep
|
||||||
|
rsync -av "$fdir"/* "$desdir"
|
||||||
|
#Clean up and remove the tmpropox
|
||||||
|
rm -r "$pdir"
|
||||||
|
|
||||||
|
}
|
||||||
|
fwnt(){
|
||||||
|
###Function to run if the folder was not there (fwnt)###
|
||||||
|
mkdir "$pdir"
|
||||||
|
#go to the tmprpox folder
|
||||||
|
cd "$pdir"
|
||||||
|
#clone the protools repo
|
||||||
|
git clone "$cbr"
|
||||||
|
#use rsynch to copy files over to the opt location
|
||||||
|
#rsync -av /opt/tmprpox/* /opt/pypep
|
||||||
|
rsync -av "$fdir"/* "$desdir"
|
||||||
|
#Clean up and remove the tmpropox
|
||||||
|
rm -r "$pdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
fupug(){
|
||||||
|
#Run the apt update and upgrade to update from the debian repos
|
||||||
|
apt update && apt upgrade -y
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#use the utils for the needed functions
|
||||||
|
source peputils.sh
|
||||||
|
#start system updates
|
||||||
|
fupug
|
||||||
|
|
||||||
|
#see if the tmprpox folder exists
|
||||||
|
#if it does run the fwt function else
|
||||||
|
#runs the fwnt function - See the peputils for descriptions
|
||||||
|
#of what the functions do
|
||||||
|
if [ -d "$pdir" ];
|
||||||
|
then
|
||||||
|
fwt
|
||||||
|
else
|
||||||
|
fwnt
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pex = ttk.Window(themename="darkly")
|
||||||
|
window_height = 230
|
||||||
|
window_width = 355
|
||||||
|
pex.title('Get Extras')
|
||||||
|
pex.tk.call('wm', 'iconphoto', pex._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
#main title style
|
||||||
|
spmt = ttk.Style()
|
||||||
|
spmt.configure("#F62817.TLabel", foreground ="#b12026", background ="#222222", font = ("Helvetica", '12', 'bold') )
|
||||||
|
|
||||||
|
###Verbiage and titel Placements###
|
||||||
|
|
||||||
|
lblpmwelttl = ttk.Label(pex, style="Whiteb.TLabel", text="Download and Install Wallpaper, Themes and Icons ")
|
||||||
|
lblpmwelttl.place(x=10, y=10)
|
||||||
|
#Functions to open the other pythons files. or close this screen ###
|
||||||
|
#open the sure scripts
|
||||||
|
def pi ():
|
||||||
|
pex.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/icosure.py')
|
||||||
|
|
||||||
|
def thm ():
|
||||||
|
pex.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/thmsure.py')
|
||||||
|
|
||||||
|
def wls ():
|
||||||
|
pex.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/wallsure.py')
|
||||||
|
|
||||||
|
#close Button
|
||||||
|
def qte ():
|
||||||
|
pex.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/welcome_man.py')
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pex.winfo_screenwidth()
|
||||||
|
screen_height = pex.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pex.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
btncore = ttk.Button(text="Peppermint Themes", bootstyle="danger-outline", command=thm, width=20)
|
||||||
|
btncore.place(x=90, y=50)
|
||||||
|
bttut = ttk.Button(text='Peppermint Icons', command=pi, bootstyle="danger-outline", width=20 )
|
||||||
|
bttut.place(x=90, y=90)
|
||||||
|
bttut = ttk.Button(text='Peppermint WallPaper', command=wls, bootstyle="danger-outline", width=20 )
|
||||||
|
bttut.place(x=90, y=130)
|
||||||
|
|
||||||
|
btnrn = ttk.Button(text="Close", bootstyle="light-outline", command=qte, width=10)
|
||||||
|
btnrn.place(x=225, y=190)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
pex.mainloop()
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import apt
|
||||||
|
|
||||||
|
#this script is for performing utility functions
|
||||||
|
|
||||||
|
#gets all installed packages
|
||||||
|
cache = apt.Cache()
|
||||||
|
|
||||||
|
#Checks if a package is installed
|
||||||
|
def installcheck(appname):
|
||||||
|
try:
|
||||||
|
print(appname,cache[appname].is_installed)
|
||||||
|
return cache[appname].is_installed
|
||||||
|
except:
|
||||||
|
#probably not installed or otherwise throws errors on check
|
||||||
|
return False
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Peppermint Release Notes")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://peppermint_os.codeberg.page/releasenotes.html"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Snap Craft")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://snapcraft.io/snap-store"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,189 @@
|
||||||
|
#! /bin/bash
|
||||||
|
# sysupdate.sh
|
||||||
|
# by: Domingo Urena (c) 18/02/2022
|
||||||
|
# irlxu2@gmail.com / pc_protectordr@yahoo.es
|
||||||
|
# Create a full system update for a Debian base OS
|
||||||
|
# Sintax : ./sysupdate.sh or bassh sysupdate
|
||||||
|
|
||||||
|
################################################################ Disclaimer ###
|
||||||
|
# These scripts come without warranty of any kind. Use them at your own risk. I
|
||||||
|
# assume no liability for the accuracy, correctness, completeness, or usefulness
|
||||||
|
# of any information provided by this script nor for any sort of damages using
|
||||||
|
# these scripts may cause.
|
||||||
|
#
|
||||||
|
# sysupdate is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# sysupdate is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
########################################################## Inicital setings ###
|
||||||
|
nombre="System_Update"
|
||||||
|
fecha=`date`
|
||||||
|
Update_log=$nombre".md"
|
||||||
|
|
||||||
|
# If exist a previews update file, delete it
|
||||||
|
if [[ -f ~/$Update_log ]]
|
||||||
|
then rm ~/$Update_log
|
||||||
|
fi
|
||||||
|
# Create a new log file
|
||||||
|
touch ~/$Update_log
|
||||||
|
########################################### Definimos los Colores a utilizar ###
|
||||||
|
# BackGround with setab
|
||||||
|
bred=`tput setab 1` # Rojo
|
||||||
|
bwht=`tput setab 7` # Blanco
|
||||||
|
# ForeGrown with setaf
|
||||||
|
blk=`tput setaf 0` # Negro
|
||||||
|
red=`tput setaf 1` # Rojo
|
||||||
|
yll=`tput setaf 3` # Amarillo
|
||||||
|
wht=`tput setaf 7` # Blanco
|
||||||
|
# TxtFormat with setaf
|
||||||
|
bld=`tput bold` # Select bold mode
|
||||||
|
dim=`tput dim` # Select dim (half-bright) mode
|
||||||
|
# DefautMode with setaf
|
||||||
|
reset=`tput sgr0`
|
||||||
|
# Hide/show cursor
|
||||||
|
nshw() { tput civis # Hide cursor
|
||||||
|
}
|
||||||
|
yshw() { tput cnorm # return cursor to normal
|
||||||
|
}
|
||||||
|
# Peppermint Color
|
||||||
|
Peppermint_Color=${bred}${bld}${wht}
|
||||||
|
Peppermint_msg=${bld}${bred}${wht}
|
||||||
|
Peppermint_good=${bld}${red}
|
||||||
|
Peppermint_note=${bld}${red}
|
||||||
|
Peppermint_err=${bld}${bred}${yll}
|
||||||
|
################################################################## Letreros ###
|
||||||
|
titulo() { # ≡ message
|
||||||
|
printf "${Peppermint_Color} %s${reset}\n" "$@"
|
||||||
|
}
|
||||||
|
msg() { # ⓘ message
|
||||||
|
printf "${Peppermint_msg} ⓘ ${reset}${bld}%s \n${reset}" "$@"
|
||||||
|
}
|
||||||
|
completo() {
|
||||||
|
if [[ "$@" == "" ]];
|
||||||
|
then printf " ${Peppermint_good}[ ✔ COMPLETED ] ${reset}\n";
|
||||||
|
else
|
||||||
|
printf " ${Peppermint_good}[ ✔ %s ] ${reset}\n" "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
notas() { # [ NOTES ] message
|
||||||
|
printf "${Peppermint_note} > ${reset} %s \n" "$@"
|
||||||
|
}
|
||||||
|
advertencia() { # [ ⚠ message ]
|
||||||
|
if [ "$@" == "" ];
|
||||||
|
then printf "${Peppermint_err} [ ⚠ WARNING ] ${reset}\n"
|
||||||
|
fi
|
||||||
|
printf "${Peppermint_err} [ ⚡ %s ] ${reset}\n" "$@"
|
||||||
|
}
|
||||||
|
############################################################ Admin privilige ###
|
||||||
|
eres_root() { # Verificación de privilegio de usuario
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then sudo ls >/dev/null; fi
|
||||||
|
}
|
||||||
|
######################################################### Updating functions ###
|
||||||
|
ACTUALIZA() { # Optiene lista de actualizaciones
|
||||||
|
sudo apt-get -y update >> ~/"$Update_log"
|
||||||
|
}
|
||||||
|
UPDATE() { # Instala las actualizaciones
|
||||||
|
sudo apt-get -y upgrade >> ~/"$Update_log"
|
||||||
|
}
|
||||||
|
LIMPIA() { # Limpia archivos innecesarios
|
||||||
|
sudo apt-get -y autoremove >> ~/"$Update_log"
|
||||||
|
}
|
||||||
|
RBRAND() { # Check PeppermintOS branding
|
||||||
|
[ -e /opt/pepconf/os-release ] && diff -q /opt/pepconf/os-release /usr/lib/os-release >> ~/"$Update_log" ||
|
||||||
|
sudo cp /opt/pepconf/os-release /usr/lib/os-release
|
||||||
|
[ -e /opt/pepconf/os-release ] && diff -q /opt/pepconf/os-release /etc/os-release >> ~/"$Update_log" ||
|
||||||
|
sudo cp /opt/pepconf/os-release /etc/os-release
|
||||||
|
}
|
||||||
|
############################################################ Progress Bar + ###
|
||||||
|
rotar() {
|
||||||
|
## SYNTAX: rotar "COMMANDO" " Mensage de la accion " "Nombre de la tarea"
|
||||||
|
## rotar "accion 3" "accion" "3ra accion"
|
||||||
|
nshw # hide cursor
|
||||||
|
|
||||||
|
# Limpia la linea de acción
|
||||||
|
# LP="\e[2K"
|
||||||
|
LP=$reset # reset all colors to default
|
||||||
|
# Spinner Character
|
||||||
|
SPINNER="⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"
|
||||||
|
|
||||||
|
spinner() { # crear subrutina
|
||||||
|
task=$1
|
||||||
|
mnsg=$2
|
||||||
|
while :; do
|
||||||
|
jobs %1 > /dev/null 2>&1
|
||||||
|
[ $? = 0 ] || {
|
||||||
|
# printf "${LP}✓ ${task} Done"
|
||||||
|
completo "$task Done"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
for (( i=0; i<${#SPINNER}; i++ )); do
|
||||||
|
sleep 0.05
|
||||||
|
printf "${bld}${red}${SPINNER:$i:1}${reset} ${Peppermint_msg} ${task} ${mnsg}${reset}\r"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
mnsg="${2-InProgress}"
|
||||||
|
task="${3-$1}"
|
||||||
|
$1 & spinner "$task" "$msg"
|
||||||
|
|
||||||
|
yshw # resturn cursor
|
||||||
|
}
|
||||||
|
|
||||||
|
############################################################## System Update ###
|
||||||
|
sysupdate() {
|
||||||
|
# mupdate=`sudo apt-get update -y`
|
||||||
|
titulo "▞ ▞ ▞ ▞ ▞ ▞ ▞ ▞ Peppermint CLI Updater ▚ ▚ ▚ ▚ ▚ ▚ ▚ ▚ "
|
||||||
|
echo
|
||||||
|
echo "# System Update" > ~/"$Update_log"
|
||||||
|
echo "**"$Update_log"**" $fecha >> ~/"$Update_log"
|
||||||
|
msg " Creating list of updated programs..."
|
||||||
|
echo "## Creating List of updated programs" >> ~/"$Update_log"
|
||||||
|
advertencia "... these will take some time ..."
|
||||||
|
rotar 'ACTUALIZA' " updated list... " "Dowloading "
|
||||||
|
msg " Installing New System Updates..."
|
||||||
|
echo "## Installing New System Updates..." >> ~/"$Update_log"
|
||||||
|
advertencia "... please be patient ..."
|
||||||
|
rotar "UPDATE" " updates... " "Installing "
|
||||||
|
msg " ... cleaning system ..."
|
||||||
|
echo "## Removing stale packages..." >> ~/"$Update_log"
|
||||||
|
echo "*... Cleaning System ...*" >> ~/"$Update_log"
|
||||||
|
rotar "LIMPIA" " unnesesary packages... " "Cleaning "
|
||||||
|
|
||||||
|
msg " Updating Branding files..."
|
||||||
|
echo "## Checking PeppermintOS branding..." >> ~/"$Update_log"
|
||||||
|
advertencia "... comparing files ..."
|
||||||
|
rotar "RBRAND" " initializing... " "Finalizing "
|
||||||
|
echo "[END OF FILE]" >> ~/"$Update_log"
|
||||||
|
}
|
||||||
|
|
||||||
|
mensage_final() {
|
||||||
|
#clear
|
||||||
|
titulo " ▞ ▞ ▞ ▞ System Applied Updates ▚ ▚ ▚ ▚ "
|
||||||
|
echo
|
||||||
|
echo "For more information see the update log file:"
|
||||||
|
echo "${bld}>${yll} $Update_log${reset} located in your home directory"
|
||||||
|
echo
|
||||||
|
#read -p "Press [Enter] key to exit..."
|
||||||
|
read -n1 -p " Press ${bld}\"Q\"${reset} to ${bld}Q${reset}uit, or $bld\"L\"$reset to view the log file. " pause
|
||||||
|
}
|
||||||
|
|
||||||
|
view_log() {
|
||||||
|
[ "$pause" = "l" ] || [ "$pause" = "L" ] && ( clear
|
||||||
|
echo -e "$(cat ~/${Update_log})\n\n\t Press ${bld}\"Q\"${reset} to ${bld}Q${reset}uit and close this window. " | less -R
|
||||||
|
clear
|
||||||
|
) || clear
|
||||||
|
}
|
||||||
|
|
||||||
|
clear
|
||||||
|
eres_root
|
||||||
|
sysupdate
|
||||||
|
mensage_final
|
||||||
|
view_log
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
_extras=themes
|
||||||
|
_repo="PepThemes"
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Quietly have wget -q0- "pipe" its output directly to tar.
|
||||||
|
# Use tar -xvz to decompress, list and untar the DL file
|
||||||
|
# to the symlink 'pepthemes' in /usr/share, on the fly.
|
||||||
|
# Leaving no files to remove and no permission changes required.
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
echo -en "\n Downloadng new ${_extras} to /usr/share/"
|
||||||
|
wget -qO- https://codeberg.org/Peppermint_OS/${_repo}/archive/main.tar.gz |
|
||||||
|
tar -vxz -C /usr/share 2>/dev/null
|
||||||
|
|
||||||
|
# Go back to the Extras
|
||||||
|
python3 /opt/pypep/pge.py &
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import tkinter as tk
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ttk.Window(themename="darkly")
|
||||||
|
window_height = 120
|
||||||
|
window_width = 420
|
||||||
|
pexs.title('Additional Themes')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def thm ():
|
||||||
|
"""Check if user can connect to codeberg"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.system('python3 /opt/pypep/diagthmchk.py')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def xc ():
|
||||||
|
"""close the form start back at pge"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Title text message
|
||||||
|
lblexp = ttk.Label(pexs, text="Would you like to install addtional wallpaper created by the Peppermint Team and Community?.", wraplength=400)
|
||||||
|
lblexp.pack(side ="top")
|
||||||
|
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
btncore = ttk.Button(text="Install", bootstyle="danger-outline", command=thm, width=8)
|
||||||
|
btncore.pack(side="left", padx=5, pady=5)
|
||||||
|
bttut = ttk.Button(text='Cancel', bootstyle="danger-outline", width=8, command=xc )
|
||||||
|
bttut.pack(side="left", padx=5, pady=5)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Peppermint ICE Tutorial")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://peppermintos.com/guide/ice/"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from PyQt5.QtCore import *
|
||||||
|
from PyQt5.QtWidgets import *
|
||||||
|
from PyQt5.QtGui import *
|
||||||
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
|
import sys
|
||||||
|
|
||||||
|
class MainWindow(QMainWindow):
|
||||||
|
#set up the main window and the url address.
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(MainWindow,self).__init__(*args, **kwargs)
|
||||||
|
self.setWindowTitle("Peppermint Team Twitter")
|
||||||
|
self.setWindowIcon(QIcon('/usr/share/pixmaps/twtter.png'))
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl("https://twitter.com/peppermintos"))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
self.show()
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
window = MainWindow()
|
||||||
|
|
||||||
|
app.exec_()
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
_extras=wallpapers
|
||||||
|
_repo="PepWallPaper"
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# Quietly have wget -q0- "pipe" its output directly to tar.
|
||||||
|
# Use tar -xvz to decompress, list and untar the DL file
|
||||||
|
# to the symlink 'pepwallpaper' in /usr/share, on the fly.
|
||||||
|
# Leaving no files to remove and no permission changes required.
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
echo -en "\n Downloadng new ${_extras} to /usr/share/"
|
||||||
|
wget -qO- https://codeberg.org/Peppermint_OS/${_repo}/archive/master.tar.gz |
|
||||||
|
tar -vxz -C /usr/share 2>/dev/null
|
||||||
|
|
||||||
|
# Go back to the Extras
|
||||||
|
python3 /opt/pypep/pge.py &
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import tkinter as tk
|
||||||
|
from tendo import singleton
|
||||||
|
import ttkbootstrap as ttk
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pexs = ttk.Window(themename="darkly")
|
||||||
|
window_height = 120
|
||||||
|
window_width = 420
|
||||||
|
pexs.title('Additional Wallpaper')
|
||||||
|
pexs.tk.call('wm', 'iconphoto', pexs._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pexs.winfo_screenwidth()
|
||||||
|
screen_height = pexs.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pexs.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
def wls ():
|
||||||
|
"""Check if user can connect to codeberg"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.system('python3 /opt/pypep/diagwlschk.py')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def xc ():
|
||||||
|
"""close the form start back at pge"""
|
||||||
|
pexs.destroy()
|
||||||
|
os.popen ('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
#title message
|
||||||
|
lblexp = ttk.Label(pexs, bootstyle="light", text="Would you like to install addtional wallpaper created by the Peppermint Team and Community?.", wraplength=400)
|
||||||
|
lblexp.pack(side ="top")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###All the buttons and placements##
|
||||||
|
btncore = ttk.Button(text="Install", bootstyle="danger-outline", command=wls, width=8)
|
||||||
|
btncore.pack(side="left", padx=5, pady=5)
|
||||||
|
bttut = ttk.Button(text='Cancel', bootstyle="danger-outline", width=8, command=xc)
|
||||||
|
bttut.pack(side="left", padx=5, pady=5)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
|
||||||
|
pexs.mainloop()
|
|
@ -0,0 +1,217 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
import sqlite3
|
||||||
|
from tkinter import *
|
||||||
|
from tkinter import ttk
|
||||||
|
from tkinter import font
|
||||||
|
from ttkthemes import ThemedTk
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
|
||||||
|
#database connection string
|
||||||
|
conn = sqlite3.connect('/opt/pypep/dbpep/welval.db')
|
||||||
|
pcur = conn.cursor()
|
||||||
|
#Create the table
|
||||||
|
pcur.execute(""" CREATE TABLE IF NOT EXISTS welchk ( id integer PRIMARY KEY AUTOINCREMENT, nosee text); """)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pwel = ThemedTk(theme='clam')
|
||||||
|
window_height = 630
|
||||||
|
window_width = 750
|
||||||
|
pwel.title('Welcome to Peppermint')
|
||||||
|
pwel.tk.call('wm', 'iconphoto', pwel._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
pwel['bg']='#2f2f2f'
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#logo for the splash
|
||||||
|
lpath = PhotoImage(file = '/opt/pypep/peppermint-old.png')
|
||||||
|
lg = tk.Label(pwel, image=lpath, width=128, height=128, borderwidth=0)
|
||||||
|
lg.place(x=10, y=10)
|
||||||
|
|
||||||
|
lpath2 = PhotoImage(file = '/opt/pypep/peppermint-word-white.png')
|
||||||
|
lg2 = tk.Label(pwel, image=lpath2, width=600, height=80, borderwidth=0)
|
||||||
|
lg2.place(x=140, y=35)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#main title style
|
||||||
|
spmt = ttk.Style()
|
||||||
|
spmt.configure("#F62817.TLabel", foreground ="#b12026", background ="#2f2f2f", font = ("Helvetica", '32', 'bold') )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#main information syles
|
||||||
|
subpmt = ttk.Style()
|
||||||
|
subpmt.configure("Whiteb.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '14', 'bold') )
|
||||||
|
|
||||||
|
detpmt = ttk.Style()
|
||||||
|
detpmt.configure("det.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '12') )
|
||||||
|
|
||||||
|
#style the buttons
|
||||||
|
stbnt = ttk.Style()
|
||||||
|
stbnt.configure('pep.TButton', font = ('Helvetica', '14', 'bold'))
|
||||||
|
stbnt.map("pep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', '#2f2f2f'), ('active', 'white')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')],
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
cbtn = ttk.Style()
|
||||||
|
cbtn.map("hpep.TButton",
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', 'white'), ('active', '#F62817')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')]
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###Verbiage and titel Placements###
|
||||||
|
|
||||||
|
lblpmwelttl = ttk.Label(pwel, style="Whiteb.TLabel", text="Welcome to Peppermint OS")
|
||||||
|
lblpmwelttl.place(x=10, y=150)
|
||||||
|
|
||||||
|
lblinfo1 = ttk.Label(pwel, style="det.TLabel", text="Make system changes, and customizations", wraplength=500)
|
||||||
|
lblinfo1.place(x=235, y=450)
|
||||||
|
|
||||||
|
lblinfo4 = ttk.Label(pwel, style="det.TLabel",text="Select from a variety of web browsers to install", wraplength=720)
|
||||||
|
lblinfo4.place(x=235, y=270)
|
||||||
|
|
||||||
|
lblinfo5 = ttk.Label(pwel, style="det.TLabel",text="Learn how to use ICE to create and manage your SSB's", wraplength=720)
|
||||||
|
lblinfo5.place(x=235, y=390)
|
||||||
|
|
||||||
|
lblinfo10 = ttk.Label(pwel, style="det.TLabel",text="Download all the Peppermint Extras", wraplength=720)
|
||||||
|
lblinfo10.place(x=235, y=330)
|
||||||
|
|
||||||
|
lblinfo8 = ttk.Label(pwel, style="det.TLabel",text="We hope you enjoy -Everything you need & nothing you don't-", wraplength=720)
|
||||||
|
lblinfo8.place(x=10, y=180)
|
||||||
|
|
||||||
|
lblinfo9 = ttk.Label(pwel, style="det.TLabel",text="~ @PCNetSpec 1961-2020", wraplength=720)
|
||||||
|
lblinfo9.place(x=10, y=210)
|
||||||
|
|
||||||
|
lblinfo11 = ttk.Label(pwel, style="det.TLabel",text="Read about what has changed", wraplength=720)
|
||||||
|
lblinfo11.place(x=235, y=510)
|
||||||
|
|
||||||
|
lblinfo12 = ttk.Label(pwel, style="Whiteb.TLabel",text="Community Links", wraplength=720)
|
||||||
|
lblinfo12.place(x=10, y=550)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Functions to open the other pythons files. or close this screen ###
|
||||||
|
|
||||||
|
def pks ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('pkexec python3 /opt/pypep/peppackages.py')
|
||||||
|
|
||||||
|
def pge ():
|
||||||
|
pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
#open the pep hub
|
||||||
|
def hub ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/hub.py &')
|
||||||
|
|
||||||
|
|
||||||
|
#make your own path Closed windows
|
||||||
|
def mop ():
|
||||||
|
pwel.destroy()
|
||||||
|
|
||||||
|
#open the ice tutorial script
|
||||||
|
def tut ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/tutorial.py &')
|
||||||
|
|
||||||
|
def rls ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/release.py &')
|
||||||
|
|
||||||
|
def dshow():
|
||||||
|
#first see if the window should show or not.
|
||||||
|
pcur.execute("SELECT COUNT(*) FROM welchk WHERE nosee ='yes'")
|
||||||
|
crresult = pcur.fetchone()
|
||||||
|
if int(crresult[0]) > 0:
|
||||||
|
#close window
|
||||||
|
pwel.destroy()
|
||||||
|
else:
|
||||||
|
#PlaceHolder to do nothing
|
||||||
|
pass
|
||||||
|
|
||||||
|
def setdshow():
|
||||||
|
nosinsert = """ INSERT INTO welchk(nosee) VALUES ('yes');"""
|
||||||
|
pcur.execute(nosinsert)
|
||||||
|
conn.commit()
|
||||||
|
cbhide['text'] = 'No Show Set'
|
||||||
|
|
||||||
|
|
||||||
|
def twr ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/twtr.py &')
|
||||||
|
|
||||||
|
def fb ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/fb.py &')
|
||||||
|
|
||||||
|
def frm ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/frm.py &')
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pwel.winfo_screenwidth()
|
||||||
|
screen_height = pwel.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pwel.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
#Social Icons
|
||||||
|
icotwit = PhotoImage(file = "/usr/share/pixmaps/twtter.png")
|
||||||
|
icotfb = PhotoImage(file = "/usr/share/pixmaps/fb.png")
|
||||||
|
icotfm = PhotoImage(file = "/usr/share/pixmaps/peppermint-fm-20.png")
|
||||||
|
|
||||||
|
###All the buttons and Placements##
|
||||||
|
btncore = ttk.Button(text="Open Pephub", style="pep.TButton", command=hub, width=20, cursor="hand2")
|
||||||
|
btncore.place(x=10, y=440)
|
||||||
|
bttut = ttk.Button(text='ICE Tutorial', command=tut, style="pep.TButton", width=20, cursor="hand2" )
|
||||||
|
bttut.place(x=10, y=380)
|
||||||
|
btpge = ttk.Button(text='Peppermint Extras', command=pge, style="pep.TButton", width=20, cursor="hand2" )
|
||||||
|
btpge.place(x=10, y=320)
|
||||||
|
|
||||||
|
btpks = ttk.Button(text='Install a Web Browser', command=pks, style="pep.TButton", width=20, cursor="hand2" )
|
||||||
|
btpks.place(x=10, y=260)
|
||||||
|
btnrn = ttk.Button(text="Release Notes", style="pep.TButton", command=rls, width=20, cursor="hand2")
|
||||||
|
btnrn.place(x=10, y=500)
|
||||||
|
btntwit = ttk.Button( width = '5', style="pep.TButton", image = icotwit ,cursor="hand2", command=twr)
|
||||||
|
btntwit.place(x=15, y=575)
|
||||||
|
btnfb = ttk.Button( width = '5', style="pep.TButton", image = icotfb ,cursor="hand2", command=fb)
|
||||||
|
btnfb.place(x=70, y=575)
|
||||||
|
btnfm = ttk.Button( width = '5', style="pep.TButton", image = icotfm ,cursor="hand2", command=frm)
|
||||||
|
btnfm.place(x=125, y=575)
|
||||||
|
#button to hide.
|
||||||
|
cbhide = ttk.Button (pwel, text = "Don't Show Again", style="hpep.TButton", command=setdshow)
|
||||||
|
cbhide.place(x=600, y=150)
|
||||||
|
|
||||||
|
#close db connection
|
||||||
|
pcur.close
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
#Run this window#
|
||||||
|
dshow()
|
||||||
|
pwel.mainloop()
|
||||||
|
|
|
@ -0,0 +1,172 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import subprocess as sp
|
||||||
|
import tkinter as tk
|
||||||
|
from tkinter import *
|
||||||
|
from tkinter import ttk
|
||||||
|
from tkinter import font
|
||||||
|
from ttkthemes import ThemedTk
|
||||||
|
from tkinter import PhotoImage
|
||||||
|
from tendo import singleton
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#setting up window
|
||||||
|
pwel = ThemedTk(theme='clam')
|
||||||
|
window_height = 630
|
||||||
|
window_width = 750
|
||||||
|
pwel.title('Welcome to Peppermint')
|
||||||
|
pwel.tk.call('wm', 'iconphoto', pwel._w, tk.PhotoImage(file='/usr/share/pixmaps/peppermint-old.png'))
|
||||||
|
pwel['bg']='#2f2f2f'
|
||||||
|
|
||||||
|
#keep only instance at a time
|
||||||
|
me = singleton.SingleInstance()
|
||||||
|
|
||||||
|
#logo for the splash
|
||||||
|
lpath = PhotoImage(file = '/opt/pypep/peppermint-old.png')
|
||||||
|
lg = tk.Label(pwel, image=lpath, width=128, height=128, borderwidth=0)
|
||||||
|
lg.place(x=10, y=10)
|
||||||
|
|
||||||
|
lpath2 = PhotoImage(file = '/opt/pypep/peppermint-word-white.png')
|
||||||
|
lg2 = tk.Label(pwel, image=lpath2, width=600, height=80, borderwidth=0)
|
||||||
|
lg2.place(x=140, y=35)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#main title style
|
||||||
|
spmt = ttk.Style()
|
||||||
|
spmt.configure("#F62817.TLabel", foreground ="#b12026", background ="#2f2f2f", font = ("Helvetica", '32', 'bold') )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#main information syles
|
||||||
|
subpmt = ttk.Style()
|
||||||
|
subpmt.configure("Whiteb.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '14', 'bold') )
|
||||||
|
|
||||||
|
detpmt = ttk.Style()
|
||||||
|
detpmt.configure("det.TLabel", foreground ="#ffffff", background ="#2f2f2f", font = ('Helvetica', '12'))
|
||||||
|
|
||||||
|
#style the buttons
|
||||||
|
stbnt = ttk.Style()
|
||||||
|
stbnt.configure('pep.TButton', font = ('Helvetica', '14', 'bold'))
|
||||||
|
stbnt.map('pep.TButton',
|
||||||
|
foreground=[('!active', '#F62817'),('pressed', '#2f2f2f'), ('active', 'white')],
|
||||||
|
background=[ ('!active','#2f2f2f'),('pressed', '#2f2f2f'), ('active', '#2f2f2f')]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###Verbiage and titel Placements###
|
||||||
|
|
||||||
|
lblpmwelttl = ttk.Label(pwel, style="Whiteb.TLabel", text="Welcome to Peppermint OS")
|
||||||
|
lblpmwelttl.place(x=10, y=150)
|
||||||
|
|
||||||
|
lblinfo1 = ttk.Label(pwel, style="det.TLabel", text="Make system changes, and customizations", wraplength=500)
|
||||||
|
lblinfo1.place(x=235, y=450)
|
||||||
|
|
||||||
|
lblinfo4 = ttk.Label(pwel, style="det.TLabel",text="Select from a variety of web browsers to install", wraplength=720)
|
||||||
|
lblinfo4.place(x=235, y=270)
|
||||||
|
|
||||||
|
|
||||||
|
lblinfo5 = ttk.Label(pwel, style="det.TLabel",text="Learn how to use ICE to create and manage your SSB's", wraplength=720)
|
||||||
|
lblinfo5.place(x=235, y=390)
|
||||||
|
|
||||||
|
lblinfo10 = ttk.Label(pwel, style="det.TLabel",text="Download all the Peppermint Extras", wraplength=720)
|
||||||
|
lblinfo10.place(x=235, y=330)
|
||||||
|
|
||||||
|
lblinfo8 = ttk.Label(pwel, style="det.TLabel",text="We hope you enjoy -Everything you need & nothing you don't-", wraplength=720)
|
||||||
|
lblinfo8.place(x=10, y=180)
|
||||||
|
|
||||||
|
lblinfo9 = ttk.Label(pwel, style="det.TLabel",text="~ @PCNetSpec 1961-2020", wraplength=720)
|
||||||
|
lblinfo9.place(x=10, y=210)
|
||||||
|
|
||||||
|
lblinfo11 = ttk.Label(pwel, style="det.TLabel",text="Read about what has changed", wraplength=720)
|
||||||
|
lblinfo11.place(x=235, y=510)
|
||||||
|
|
||||||
|
lblinfo12 = ttk.Label(pwel, style="Whiteb.TLabel",text="Community Links", wraplength=720)
|
||||||
|
lblinfo12.place(x=10, y=550)
|
||||||
|
|
||||||
|
|
||||||
|
#Functions to open the other pythons files. or close this screen ###
|
||||||
|
|
||||||
|
def pks ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('pkexec python3 /opt/pypep/peppackages.py')
|
||||||
|
|
||||||
|
def pge ():
|
||||||
|
pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/pge.py')
|
||||||
|
|
||||||
|
def mop ():
|
||||||
|
pwel.destroy()
|
||||||
|
|
||||||
|
def hub ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/hub.py &')
|
||||||
|
|
||||||
|
def wte ():
|
||||||
|
os.system('python3 /opt/pypep/expect.py &')
|
||||||
|
|
||||||
|
def tut ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/tutorial.py &')
|
||||||
|
|
||||||
|
def rls ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/release.py &')
|
||||||
|
|
||||||
|
def twr ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/twtr.py &')
|
||||||
|
|
||||||
|
def fb ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/fb.py &')
|
||||||
|
|
||||||
|
def frm ():
|
||||||
|
# pwel.destroy()
|
||||||
|
os.system('python3 /opt/pypep/frm.py &')
|
||||||
|
|
||||||
|
def center_screen():
|
||||||
|
""" gets the coordinates of the center of the screen """
|
||||||
|
global screen_height, screen_width, x_cordinate, y_cordinate
|
||||||
|
|
||||||
|
screen_width = pwel.winfo_screenwidth()
|
||||||
|
screen_height = pwel.winfo_screenheight()
|
||||||
|
# Coordinates of the upper left corner of the window to make the window appear in the center
|
||||||
|
x_cordinate = int((screen_width/2) - (window_width/2))
|
||||||
|
y_cordinate = int((screen_height/2) - (window_height/2))
|
||||||
|
pwel.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Social Icons
|
||||||
|
icotwit = PhotoImage(file = "/usr/share/pixmaps/twtter.png")
|
||||||
|
icotfb = PhotoImage(file = "/usr/share/pixmaps/fb.png")
|
||||||
|
icotfm = PhotoImage(file = "/usr/share/pixmaps/peppermint-fm-20.png")
|
||||||
|
|
||||||
|
###All the buttons and Placements##
|
||||||
|
btncore = ttk.Button(text="Open Pephub", style="pep.TButton", command=hub, width=20)
|
||||||
|
btncore.place(x=10, y=440)
|
||||||
|
bttut = ttk.Button(text='ICE Tutorial', command=tut, style="pep.TButton", width=20 )
|
||||||
|
bttut.place(x=10, y=380)
|
||||||
|
btpks = ttk.Button(text='Install a Web Browser', command=pks, style="pep.TButton", width=20 )
|
||||||
|
btpks.place(x=10, y=260)
|
||||||
|
btpge = ttk.Button(text='Peppermint Extras', command=pge, style="pep.TButton", width=20 )
|
||||||
|
btpge.place(x=10, y=320)
|
||||||
|
btnrn = ttk.Button(text="Release Notes", style="pep.TButton", command=rls, width=20)
|
||||||
|
btnrn.place(x=10, y=500)
|
||||||
|
btntwit = ttk.Button( width = '5', style="pep.TButton", image = icotwit ,cursor="hand2", command=twr )
|
||||||
|
btntwit.place(x=15, y=575)
|
||||||
|
btnfb = ttk.Button( width = '5', style="pep.TButton", image = icotfb ,cursor="hand2", command=fb)
|
||||||
|
btnfb.place(x=70, y=575)
|
||||||
|
btnfm = ttk.Button( width = '5', style="pep.TButton", image = icotfm ,cursor="hand2", command=frm)
|
||||||
|
btnfm.place(x=125, y=575)
|
||||||
|
|
||||||
|
#call Center screen
|
||||||
|
center_screen()
|
||||||
|
#Run this window#
|
||||||
|
pwel.mainloop()
|
||||||
|
|
|
@ -0,0 +1,218 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PROGNAME="xDaily"
|
||||||
|
[ "$USER" != "root" ] &&
|
||||||
|
echo -e "\t$PROGNAME must be run as root. \n\tOr with \`sudo $PROGNAME\` ." && exit
|
||||||
|
#use the utils for the needed functions
|
||||||
|
source /opt/pypep/peputils.sh
|
||||||
|
|
||||||
|
### Our options are going to be
|
||||||
|
# = "full output to the terminal, no stopping."
|
||||||
|
# -i = "interactive"
|
||||||
|
# -q = "interactive but suppressed output"
|
||||||
|
OPTIND="0"
|
||||||
|
for i in _quiet _interactive ; do unset -v $i ; done
|
||||||
|
|
||||||
|
while getopts 'iq' OPTION; do
|
||||||
|
case "$OPTION" in
|
||||||
|
i)
|
||||||
|
_interactive="yes"
|
||||||
|
echo -e " Entering interactive mode\n"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
|
||||||
|
q)
|
||||||
|
_quiet="yes"
|
||||||
|
echo -e " Entering interactive mode, without verbose output.\n"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
|
||||||
|
?)
|
||||||
|
echo "Usage: $(basename ${PROGNAME}) [-i = interactive] [-q = suppressed ouput]"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
see_it() {
|
||||||
|
[ "$_interactive" = "yes" ] && ( read -n1 -p " $_msg ? \"Y/n\" " answ
|
||||||
|
[ -z $answ ] || [ "$answ" = "y" ] || [ "$answ" = "Y" ] && echo &&
|
||||||
|
do_it &&
|
||||||
|
echo -e " $_msg - Completed.\n" ||
|
||||||
|
echo -e "\r $_msg - Skipped.\n" )
|
||||||
|
}
|
||||||
|
|
||||||
|
no_see() {
|
||||||
|
[ "$_quiet" = "yes" ] && ( read -n1 -p " $_msg ? \"Y/n\" " answ
|
||||||
|
[ -z $answ ] || [ "$answ" = "y" ] || [ "$answ" = "Y" ] && echo &&
|
||||||
|
do_it > /dev/null &&
|
||||||
|
echo -e " $_msg - Completed.\n" ||
|
||||||
|
echo -e "\r $_msg - Skipped.\n" )
|
||||||
|
}
|
||||||
|
|
||||||
|
run_it() {
|
||||||
|
[ "$_interactive" != "yes" ] && [ "$_quiet" != "yes" ] && (
|
||||||
|
echo -e "\n $_msg ." &&
|
||||||
|
do_it &&
|
||||||
|
echo -e " $_msg - Completed." )
|
||||||
|
}
|
||||||
|
|
||||||
|
# Begin xDaily command functions
|
||||||
|
_update() {
|
||||||
|
_msg="Check for Updates"
|
||||||
|
do_it() {
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
apt update ||
|
||||||
|
apt update 2>&1 >/dev/null
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_upgradable() {
|
||||||
|
_msg="See upgradable packages"
|
||||||
|
do_it() {
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
apt list --upgradable ||
|
||||||
|
apt list --upgradable 2>&1 >/dev/null
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
# no_see
|
||||||
|
# run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_upgrade() {
|
||||||
|
_msg="Install available Updates"
|
||||||
|
do_it() {
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
apt upgrade ||
|
||||||
|
apt upgrade 2>&1 >/dev/null
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_apt_clean() {
|
||||||
|
_msg="Remove all unavailable entries from APT"
|
||||||
|
do_it() {
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
apt clean ||
|
||||||
|
apt clean 2>&1 >/dev/null
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoclean () {
|
||||||
|
_msg="Remove unavailable entries from APT"
|
||||||
|
do_it() {
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
apt autoclean ||
|
||||||
|
apt autoclean 2>&1 >/dev/null
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoremove() {
|
||||||
|
_msg="Remove old dependencies not required by the system"
|
||||||
|
do_it() {
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
apt autoremove ||
|
||||||
|
apt autoremove 2>&1 >/dev/null
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_clear_thumbnails() {
|
||||||
|
_msg="Clear thumbnail caches"
|
||||||
|
do_it() {
|
||||||
|
for i in ".thumbnails" ".cache/thumbnails" ; do
|
||||||
|
for j in "*/*.png" "*/*/*.png" ; do
|
||||||
|
[ "$_quiet" != "yes" ] &&
|
||||||
|
rm -v /home/${SUDO_USER}/${i}/${j} 2>/dev/null ||
|
||||||
|
rm /home/${SUDO_USER}/${i}/${j} 2>/dev/null
|
||||||
|
done
|
||||||
|
done ; true
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_clear_recents() {
|
||||||
|
_msg="Clear the Recently Used list in FireFox"
|
||||||
|
do_it() {
|
||||||
|
dd bs=1 count=1 status=none if=/dev/null of=/home/${SUDO_USER}/.local/share/recently-used.xbel
|
||||||
|
chown ${SUDO_USER} /home/${SUDO_USER}/.local/share/recently-used.xbel
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_rbranding() {
|
||||||
|
_msg="Check & Restore Peppermint Branding in os-release"
|
||||||
|
do_it() {
|
||||||
|
diff -q /opt/pepconf/os-release /usr/lib/os-release || cp /opt/pepconf/os-release /usr/lib/os-release
|
||||||
|
diff -q /opt/pepconf/os-release /etc/os-release || cp /opt/pepconf/os-release /etc/os-release
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_ssd_trimfs() {
|
||||||
|
_msg="For SSDs: trim eligible ext2/3/4 filesystems"
|
||||||
|
do_it() {
|
||||||
|
for mnt in $(grep -E "(ext2|ext3|ext4)" /etc/mtab | cut -f2 -d" ")
|
||||||
|
do fstrim ${mnt} &>/dev/null &&
|
||||||
|
echo -e " Completed fstrim for \"${mnt}\"" ||
|
||||||
|
echo -e " No fstrim required for \"${mnt}\""
|
||||||
|
done
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_ptools() {
|
||||||
|
_msg="Synch up the PepTools"
|
||||||
|
do_it() {
|
||||||
|
if [ -d "$pdir" ]
|
||||||
|
then fwt
|
||||||
|
else fwnt
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
_udcache() {
|
||||||
|
_msg="Caching icons at /usr/share/icons/"
|
||||||
|
do_it() { update-icon-caches /usr/share/icons/* ;}
|
||||||
|
see_it
|
||||||
|
no_see
|
||||||
|
run_it
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_update
|
||||||
|
_upgradable
|
||||||
|
_upgrade
|
||||||
|
_apt_clean
|
||||||
|
_autoclean
|
||||||
|
_autoremove
|
||||||
|
_clear_thumbnails
|
||||||
|
_clear_recents
|
||||||
|
_udcache
|
||||||
|
_rbranding
|
||||||
|
_ssd_trimfs
|
||||||
|
_ptools
|
|
@ -0,0 +1,94 @@
|
||||||
|
alias ISO-datestamps='echo -en "\n Searching for files ...\r"; for i in /dev/sd[a-z] $(du -ahx ~/ 2>&1 | grep -v "\.iso". | grep "\.iso"| cut -f2) $(du -ahx / 2>&1 | grep -v "\.iso". | grep "\.iso"| cut -f2); do string=$(sudo hexdump -Cs 33598 -n16 $i | head -1 | cut -f2 -d"|" | cut -c"1-14"); [ "$string" != "" ] && echo " $string $i" ; done | sort -u'
|
||||||
|
alias cgrep='grep --color=always'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias date_of_iso='for i in ./*.iso ./*/*.iso /dev/sd[a-z]; do echo " $(sudo hexdump -C -s33598 -n16 $i 2>/dev/null |head -1 | cut -f2 -d"|" | cut -c-14) $i" ; done | sort'
|
||||||
|
alias less='less -g'
|
||||||
|
alias locate='du -ah / 2>&1 | grep '
|
||||||
|
alias snipe='du -ah ./ 2>&1 | grep '
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias plot-boot='systemd-analyze plot > /tmp/boot_plot.svg ; x-www-browser file:///tmp/boot_plot.svg &'
|
||||||
|
alias timed='clear; neofetch; systemd-analyze'
|
||||||
|
alias update-aliases='echo -en "\n\tUpdating aliases:\t"; for i in $(alias | grep "alias ". | cut -f1 -d= | cut -f2 -d" "); do echo -en "$i\t"; done ;echo; alias | tee ~/.bash_aliases > /dev/null'
|
||||||
|
alias vi='busybox vi'
|
||||||
|
alias vicr='for i in ./* ; do [ -f $i ] && vi -R "$i" ; done'
|
||||||
|
alias view='vi -R'
|
||||||
|
alias write-out-iso='
|
||||||
|
iso=" "
|
||||||
|
dev=" "
|
||||||
|
line1="Type or copy-n-paste a file name from above."
|
||||||
|
line2="Type the full path to your USB device. (/dev/sdX)"
|
||||||
|
line3="The block device ${dev} was found and seems Ok to use."
|
||||||
|
lsblk_cmd="lsblk -o PATH,VENDOR,MODEL,SIZE,HOTPLUG,RM"
|
||||||
|
_abort="To abort this now, press Ctrl+C ."
|
||||||
|
_anykey="Hit any key"
|
||||||
|
_coward="Cowardly refusing to write to"
|
||||||
|
_empty="This field cannot be empty"
|
||||||
|
_cancel="to cancel"
|
||||||
|
_continue="to continue"
|
||||||
|
_knownISO="to enter the full path to the ISO."
|
||||||
|
_laststep="This is the final step."
|
||||||
|
_missing="File not found."
|
||||||
|
_mounted="The location is mounted."
|
||||||
|
_noblock="is not a block device."
|
||||||
|
_nochecks="No checks were done to determine this is an ISO image."
|
||||||
|
_noDEV="The location ${dev} does not exist yet, Plug in a USB ?"
|
||||||
|
_noISO="No ISO found in this directory."
|
||||||
|
_notlisted="Check your file name or the location and retry."
|
||||||
|
_passwd="To write to a USB, your password may be required."
|
||||||
|
_re_enter="to Re-Enter the location"
|
||||||
|
_restart1="To start over, Press Ctrl+C,"
|
||||||
|
_restart2="then move to a folder with the ISO."
|
||||||
|
_retry="to retry"
|
||||||
|
_search="Searching ${PWD} for ISOs ."
|
||||||
|
_write="Hit ANY key to write the file to"
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo -en "\n\t${_passwd}\n\t"
|
||||||
|
sudo clear || echo -e "\tFailed password."
|
||||||
|
|
||||||
|
until [ ! -z "${iso}" ] && [ -e "${iso}" ] && ! (mount | grep -q "${iso}")
|
||||||
|
do clear
|
||||||
|
echo -e "\n ${_search}\n"
|
||||||
|
for i in ./*.iso ./*/*.iso ; do ls $i 2>/dev/null ; done | /bin/grep "\.iso" &&
|
||||||
|
echo -en "\n\t${line1}\n\n" || (
|
||||||
|
echo -en "\n\t${_noISO} \n\n ${_restart1} ${_restart2}\n\n Or ${_anykey} ${_knownISO}"
|
||||||
|
read -n1 -p " " pause && echo )
|
||||||
|
|
||||||
|
read -p " Path to ISO = " iso
|
||||||
|
[ -z "${iso}" ] && (echo -en "\n${_empty}." ; read -n1 -p " ${_anykey} ${_continue}. " back) && continue
|
||||||
|
[ ! -e "${iso}" ] && (echo -en "\n${_missing}." ; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
( mount | grep -q "${iso}" ) && (echo -en "\n${_mounted}" ; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
done
|
||||||
|
|
||||||
|
until [ ! -z $dev ] && [ -b $dev ] && ! (mount | grep -q $dev) && [ $dev != "/dev/sda" ] && [ $dev != "/dev/nvme01" ]
|
||||||
|
do clear
|
||||||
|
echo -e "\n\t Now choose the device to write the ISO to."
|
||||||
|
echo -e "\n ISO -----> $iso\n "
|
||||||
|
# echo -e "\n$($lsblk_cmd)\n" ; read -p "$line2 " dev
|
||||||
|
echo -e "\n$($lsblk_cmd)\n" | grep -Ew "(PATH|/dev/sd[a-z])"; echo " "; read -p "$line2 " dev
|
||||||
|
[ -z $dev ] && (echo -en "${_empty}."; read -n1 -p " ${_anykey} ${_continue}. " back) && continue
|
||||||
|
[ ! -e $dev ] && (echo -en "${_noDEV}\n\n"; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
[ ! -b $dev ] && (echo -en "${dev} ${_noblock}"; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
(mount | grep -q "$dev") && (echo -en "\n${_mounted}"; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
[ $dev = "/dev/sda" ] && (echo -en "${_coward} ${dev} ."; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
[ $dev = "/dev/nvme01" ] && (echo -en "${_coward} ${dev} ."; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||||
|
done
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo -e "\n\t${_laststep} ${_anykey} ${_continue}.\n"
|
||||||
|
echo -e " ISO -----> ${iso} "
|
||||||
|
# echo -e " Device --> ${dev}\n "
|
||||||
|
# echo -e "$($lsblk_cmd ${dev})" | grep -Ew "(PATH|/dev/sd[a-z])"
|
||||||
|
echo -en " Device --> "
|
||||||
|
($lsblk_cmd ${dev}) | /bin/grep -w ${dev}
|
||||||
|
|
||||||
|
|
||||||
|
echo -e "\n\tThe file $iso exists. \n\t(${_nochecks})"
|
||||||
|
echo -e " \tThe block device ${dev} was found and seems Ok to use."
|
||||||
|
echo -en "\n\t${_abort}\n\n\t${_write} $dev. "
|
||||||
|
read -n1 go
|
||||||
|
|
||||||
|
echo -e "\n Writing the file to $dev ..."
|
||||||
|
|
||||||
|
sudo dd bs=4M oflag=direct status=progress if="${iso}" of=${dev}
|
||||||
|
sync ${dev}'
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=Install Peppermint
|
||||||
|
Exec=install-peppermint
|
||||||
|
Icon=/usr/share/pixmaps/install-debian.png
|
||||||
|
Terminal=false
|
||||||
|
Categories=Settings
|
||||||
|
Comment=Calamares — Installer for Peppermint Live
|
||||||
|
Keywords=calamares;system;install;peppermint;installer
|
||||||
|
StartupNotify=True
|
||||||
|
StartupWMClass=calamares
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=Peppermint Hub
|
||||||
|
Exec=python3 hub.py
|
||||||
|
Icon=/usr/share/pixmaps/peppermint-hub.png
|
||||||
|
Terminal=false
|
||||||
|
Categories=Settings
|
||||||
|
StartupNotify=True
|
||||||
|
Comment=Use the Hub to configure your system
|
||||||
|
Path=/opt/pypep
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=Welcome to Peppermint
|
||||||
|
Exec=python3 welcome_man.py
|
||||||
|
Icon=/usr/share/pixmaps/peppermint.png
|
||||||
|
Terminal=false
|
||||||
|
Categories=Settings
|
||||||
|
StartupNotify=True
|
||||||
|
Name[en_US]=Welcome to Peppermint
|
||||||
|
Path=/opt/pypep
|
|
@ -0,0 +1,164 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=GDebi Package Installer
|
||||||
|
Name[ar]=مثبت الحزم GDebi
|
||||||
|
Name[ast]=Instalador de Paquetes GDebi
|
||||||
|
Name[bg]=Инсталатор на пакет
|
||||||
|
Name[bn]=প্যাকেজ ইনস্টলার
|
||||||
|
Name[bs]=GDebi Paketni Instaler
|
||||||
|
Name[ca]=Instal·lador de paquets GDebi
|
||||||
|
Name[ca@valencia]=Instal·lador de paquets GDebi
|
||||||
|
Name[cs]=Instalátor balíků GDebi
|
||||||
|
Name[da]=GDebi pakkeinstalleringsprogram
|
||||||
|
Name[de]=GDebi-Paket-Installationsprogramm
|
||||||
|
Name[el]=Εγκατάσταση πακέτων GDebi
|
||||||
|
Name[en_AU]=GDebi Package Installer
|
||||||
|
Name[en_CA]=GDebi Package Installer
|
||||||
|
Name[en_GB]=GDebi Package Installer
|
||||||
|
Name[eo]=Instalilo de GDebi-pakaĵoj
|
||||||
|
Name[es]=Instalador de paquetes GDebi
|
||||||
|
Name[et]=GDebi Paketipaigaldus
|
||||||
|
Name[eu]=GDebi pakete-instalatzailea
|
||||||
|
Name[fi]=GDebi-paketinasentaja
|
||||||
|
Name[fo]=GDebi Pakka innleggjari
|
||||||
|
Name[fr]=Installateur de paquets GDebi
|
||||||
|
Name[gl]=Instalador de paquetes GDebi
|
||||||
|
Name[he]=מתקין החבילות GDebi
|
||||||
|
Name[hu]=GDebi csomagtelepítő
|
||||||
|
Name[id]=Pemasang Paket GDebi
|
||||||
|
Name[it]=Installatore pacchetto GDebi
|
||||||
|
Name[ja]=GDebi パッケージインストーラー
|
||||||
|
Name[ko]=GDebi 패키지 설치 프로그램
|
||||||
|
Name[lt]=„GDebi“ paketų diegyklė
|
||||||
|
Name[ms]=Pemasang Pakej GDebi
|
||||||
|
Name[nb]=GDebi pakkeinstallerer
|
||||||
|
Name[nl]=GDebi pakketinstalleerder
|
||||||
|
Name[oc]=Installador de paquets GDebi
|
||||||
|
Name[pl]=Instalator pakietów GDebi
|
||||||
|
Name[pt]=Instalador de Pacotes
|
||||||
|
Name[pt_BR]=Instalador de pacotes GDebi
|
||||||
|
Name[ro]=GDebi instalator de pachete
|
||||||
|
Name[ru]=Программа установки пакетов GDebi
|
||||||
|
Name[sk]=Inštalátor balíkov GDebi
|
||||||
|
Name[sl]=Namestilnik paketov GDebi
|
||||||
|
Name[sr]=ГДеби — Инсталер пакета
|
||||||
|
Name[sv]=Paketinstalleraren GDebi
|
||||||
|
Name[te]=GDebi ప్యాకేజీ స్థాపకం
|
||||||
|
Name[tr]=GDebi Paket Kurucu
|
||||||
|
Name[uk]=Встановлювач пакунків GDebi
|
||||||
|
Name[ur]=جی ڈیبی پیکج انسٹالر
|
||||||
|
Name[zh_CN]=GDebi 软件包安装程序
|
||||||
|
Name[zh_HK]=GDebi 套件安裝程式
|
||||||
|
Name[zh_TW]=GDebi 套件安裝程式
|
||||||
|
GenericName=Package Installer
|
||||||
|
GenericName[ar]=مثبت الحزم
|
||||||
|
GenericName[ast]=Instalador de paquetes
|
||||||
|
GenericName[bg]=Инсталатор на пакети
|
||||||
|
GenericName[bn]=প্যাকেজ ইনস্টলার
|
||||||
|
GenericName[bs]=Paketni instaler
|
||||||
|
GenericName[ca]=Instal·lador de paquets
|
||||||
|
GenericName[ca@valencia]=Instal·lador de paquets
|
||||||
|
GenericName[cs]=Instalátor balíků
|
||||||
|
GenericName[da]=Pakkeinstalleringsprogram
|
||||||
|
GenericName[de]=Paket-Installationsprogramm
|
||||||
|
GenericName[el]=Εγκατάσταση πακέτων
|
||||||
|
GenericName[en_AU]=Package Installer
|
||||||
|
GenericName[en_CA]=Package Installer
|
||||||
|
GenericName[en_GB]=Package Installer
|
||||||
|
GenericName[eo]=Instalilo de pakaĵoj
|
||||||
|
GenericName[es]=Instalador de paquetes
|
||||||
|
GenericName[et]=Paketti paigaldus
|
||||||
|
GenericName[eu]=Pakete-instalatzailea
|
||||||
|
GenericName[fi]=Paketinasentaja
|
||||||
|
GenericName[fo]=Pakkainnleggjari
|
||||||
|
GenericName[fr]=Installateur de paquets
|
||||||
|
GenericName[gl]=Instalador de paquetes
|
||||||
|
GenericName[he]=מתקין החבילות
|
||||||
|
GenericName[hr]=Paketni instaler
|
||||||
|
GenericName[hu]=Csomagtelepítő
|
||||||
|
GenericName[id]=Pemasang Paket
|
||||||
|
GenericName[it]=Installatore pacchetto
|
||||||
|
GenericName[ja]=パッケージインストーラー
|
||||||
|
GenericName[ko]=패키지 설치 프로그램
|
||||||
|
GenericName[ku]=Sazgera Paketan
|
||||||
|
GenericName[lt]=Paketų diegyklė
|
||||||
|
GenericName[ms]=Pemasang Pakej
|
||||||
|
GenericName[nb]=Pakkeinstallerer
|
||||||
|
GenericName[nl]=Pakketinstalleerder
|
||||||
|
GenericName[oc]=Installador de paquets
|
||||||
|
GenericName[pl]=Instalator pakietów
|
||||||
|
GenericName[pt]=Instalador de Pacotes
|
||||||
|
GenericName[pt_BR]=Instalador de Pacotes
|
||||||
|
GenericName[ro]=Instalator pachete
|
||||||
|
GenericName[ru]=Программа установки пакетов
|
||||||
|
GenericName[sk]=Inštalátor balíkov
|
||||||
|
GenericName[sl]=Namestilnik paketov
|
||||||
|
GenericName[sr]=Инсталер пакета
|
||||||
|
GenericName[sv]=Paketinstallerare
|
||||||
|
GenericName[te]=ప్యాకేజీ స్థాపకం
|
||||||
|
GenericName[tr]=Paket Kurucu
|
||||||
|
GenericName[uk]=Встановлювач пакунків
|
||||||
|
GenericName[ur]=پیکج تنصیب کار
|
||||||
|
GenericName[zh_CN]=软件包安装程序
|
||||||
|
GenericName[zh_HK]=套件安裝程式
|
||||||
|
GenericName[zh_TW]=套件安裝程式
|
||||||
|
Comment=Install and view software packages
|
||||||
|
Comment[ar]=تثبيت و عرض حزم البرامج
|
||||||
|
Comment[ast]=Instalar y ver paquetes de software
|
||||||
|
Comment[bg]=Инсталиране и преглед на пакети
|
||||||
|
Comment[bn]=সফটওয়্যার প্যাকেজ ইনস্টল করুন এবং দেখুন
|
||||||
|
Comment[bs]=Instaliraj i vidi softverski paket
|
||||||
|
Comment[ca]=Instal·la i visualitza paquets de programari
|
||||||
|
Comment[ca@valencia]=Instal·la i visualitza paquets de programari
|
||||||
|
Comment[cs]=Instalovat a prohlížet balíky
|
||||||
|
Comment[da]=Installer og vis softwarepakker
|
||||||
|
Comment[de]=Software-Pakete installieren und betrachten
|
||||||
|
Comment[el]=Εγκαταστήστε και εμφανίστε πακέτα λογισμικού
|
||||||
|
Comment[en_AU]=Install and view software packages
|
||||||
|
Comment[en_CA]=Install and view software packages
|
||||||
|
Comment[en_GB]=Install and view software packages
|
||||||
|
Comment[eo]=Instali kaj vidi pakaĵojn de programaroj
|
||||||
|
Comment[es]=Instala y muestra paquetes de software
|
||||||
|
Comment[eu]=Instalatu eta ikusi software paketeak
|
||||||
|
Comment[fi]=Asenna ja tarkastele ohjelmapaketteja
|
||||||
|
Comment[fo]=Legg inn og vís ritbúnaðarpakkar
|
||||||
|
Comment[fr]=Installer et lister les paquets logiciels
|
||||||
|
Comment[gl]=Instalar e ver paquetes de software
|
||||||
|
Comment[he]=התקנה וצפייה של חבילות תכנה
|
||||||
|
Comment[hr]=Instaliraj i pregledaj pakete
|
||||||
|
Comment[hu]=Szoftvercsomagok telepítése és megjelenítése
|
||||||
|
Comment[id]=Pasang dan tinjau paket-paket piranti lunak
|
||||||
|
Comment[it]=Installa e visualizza pacchetti software
|
||||||
|
Comment[ja]=ソフトウェアパッケージのインストールと表示を行います
|
||||||
|
Comment[ko]=소프트웨어 패키지를 설치하고 봅니다
|
||||||
|
Comment[ku]=Paketên nivîsbariyê saz bike û lê binêre
|
||||||
|
Comment[lt]=Įdiegti ir peržiūrėti programinės įrangos paketus
|
||||||
|
Comment[ms]=Pasang dan papar pakej perisian
|
||||||
|
Comment[nb]=Installer og vis programvarepakker
|
||||||
|
Comment[nl]=Programmapakketten installeren en bekijken
|
||||||
|
Comment[oc]=Installar e far la lista dels paquets logicials
|
||||||
|
Comment[pl]=Instaluje i wyświetla informacje o pakietach oprogramowania
|
||||||
|
Comment[pt]=Instalar e ver pacotes de software
|
||||||
|
Comment[pt_BR]=Instalar e visualizar pacotes de programa
|
||||||
|
Comment[ro]=Instalare şi vizualizare pachete software
|
||||||
|
Comment[ru]=Программа установки и просмотра пакетов программ
|
||||||
|
Comment[sk]=Inštalácia a zobrazenie balíkov softvéru
|
||||||
|
Comment[sl]=Nameščanje in ogled paketov programske opreme
|
||||||
|
Comment[sr]=Инсталирајте и погледајте софтверске пакете
|
||||||
|
Comment[sv]=Installera och visa programpaket
|
||||||
|
Comment[te]=సాఫ్ట్వేర్ ప్యాకేజీలను స్థాపించు మరియు చూడు
|
||||||
|
Comment[tr]=Yazılım paketlerini kur ve izle
|
||||||
|
Comment[uk]=Встановити та оглянути програмні пакунки
|
||||||
|
Comment[ur]=اردو ترجمہ از محمد علی مکی
|
||||||
|
Comment[zh_CN]=安装和查看软件包
|
||||||
|
Comment[zh_HK]=安裝和檢視軟件套件
|
||||||
|
Comment[zh_TW]=安裝和檢視軟體套件
|
||||||
|
Exec=sh -c "gdebi-gtk %f"
|
||||||
|
Icon=gnome-mime-application-x-deb
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=System;
|
||||||
|
MimeType=application/vnd.debian.binary-package;
|
||||||
|
NotShowIn=KDE;
|
||||||
|
X-Ubuntu-Gettext-Domain=gdebi
|
||||||
|
StartupNotify=true
|
||||||
|
Keywords=package;apt;dpkg;install
|
|
@ -0,0 +1,168 @@
|
||||||
|
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Text Editor
|
||||||
|
Name[ar]=ماوس باد
|
||||||
|
Name[ast]=Mousepad
|
||||||
|
Name[be]=Mousepad
|
||||||
|
Name[bg]=Mousepad
|
||||||
|
Name[ca]=Mousepad
|
||||||
|
Name[cs]=Mousepad
|
||||||
|
Name[da]=Mousepad
|
||||||
|
Name[de]=Mousepad
|
||||||
|
Name[el]=Mousepad
|
||||||
|
Name[en_AU]=Mousepad
|
||||||
|
Name[en_GB]=Mousepad
|
||||||
|
Name[es]=Mousepad
|
||||||
|
Name[et]=Mousepad
|
||||||
|
Name[eu]=Mousepad
|
||||||
|
Name[fi]=Mousepad
|
||||||
|
Name[fr]=Mousepad
|
||||||
|
Name[gl]=Mousepad
|
||||||
|
Name[he]=Mousepad
|
||||||
|
Name[hr]=Mousepad
|
||||||
|
Name[hu]=Mousepad
|
||||||
|
Name[hy_AM]=Mousepad
|
||||||
|
Name[hye]=Mousepad
|
||||||
|
Name[id]=Mousepad
|
||||||
|
Name[ie]=Mousepad
|
||||||
|
Name[is]=Mousepad
|
||||||
|
Name[it]=Mousepad
|
||||||
|
Name[ja]=Mousepad
|
||||||
|
Name[kk]=Mousepad
|
||||||
|
Name[ko]=마우스패드
|
||||||
|
Name[lt]=Mousepad
|
||||||
|
Name[ms]=Mousepad
|
||||||
|
Name[nb]=Mousepad
|
||||||
|
Name[nl]=Mousepad
|
||||||
|
Name[nn]=Mousepad
|
||||||
|
Name[oc]=Mousepad
|
||||||
|
Name[pl]=Mousepad
|
||||||
|
Name[pt]=Mousepad
|
||||||
|
Name[pt_BR]=Mousepad
|
||||||
|
Name[ro]=Mousepad
|
||||||
|
Name[ru]=Mousepad
|
||||||
|
Name[sk]=Mousepad
|
||||||
|
Name[sl]=Mousepad
|
||||||
|
Name[sq]=Mousepad
|
||||||
|
Name[sr]=Мишоловка
|
||||||
|
Name[sv]=Mousepad
|
||||||
|
Name[te]=మౌస్ప్యాడ్
|
||||||
|
Name[th]=Mousepad
|
||||||
|
Name[tr]=Mousepad
|
||||||
|
Name[ug]=Mousepad
|
||||||
|
Name[uk]=Mousepad
|
||||||
|
Name[zh_CN]=Mousepad
|
||||||
|
Name[zh_TW]=Mousepad
|
||||||
|
Comment=Simple Text Editor
|
||||||
|
Comment[ar]=محرر نصوص بسيط
|
||||||
|
Comment[ast]=Editor de testu simple
|
||||||
|
Comment[be]=Просты тэкставы рэдактар
|
||||||
|
Comment[bg]=Опростен текстов редактор
|
||||||
|
Comment[ca]=Editor de text senzill
|
||||||
|
Comment[cs]=Jednoduchý textový editor
|
||||||
|
Comment[da]=Simpel tekstredigering
|
||||||
|
Comment[de]=Einfache Textbearbeitung
|
||||||
|
Comment[el]=Απλός επεξεργαστής κειμένου
|
||||||
|
Comment[en_AU]=Simple Text Editor
|
||||||
|
Comment[en_GB]=Simple Text Editor
|
||||||
|
Comment[es]=Un simple editor de texto
|
||||||
|
Comment[et]=Lihtne tekstiredaktor
|
||||||
|
Comment[eu]=Testu editore sinplea
|
||||||
|
Comment[fi]=Yksinkertainen tekstimuokkain
|
||||||
|
Comment[fr]=Éditeur de texte simple
|
||||||
|
Comment[gl]=Editor de texto sinxelo
|
||||||
|
Comment[he]=עורך תמלילים פשוט
|
||||||
|
Comment[hr]=Jednostavni uređivač teksta
|
||||||
|
Comment[hu]=Egyszerű szövegszerkesztő
|
||||||
|
Comment[hy_AM]=Պարզ գրոյթային խմբագրիչ
|
||||||
|
Comment[hye]=Պարզ գրոյթային խմբագրիչ
|
||||||
|
Comment[id]=Penyunting Teks Sederhana
|
||||||
|
Comment[ie]=Un simplic redactor de textus
|
||||||
|
Comment[is]=Einfaldur textaritill
|
||||||
|
Comment[it]=Semplice editor di testo
|
||||||
|
Comment[ja]=シンプルなテキストエディターです
|
||||||
|
Comment[kk]=Қарапайым мәтін түзетушісі
|
||||||
|
Comment[ko]=간단한 문서 편집기
|
||||||
|
Comment[lt]=Paprastas teksto redaktorius
|
||||||
|
Comment[ms]=Penyunting Teks Ringkas
|
||||||
|
Comment[nb]=Enkel tekstbehandler
|
||||||
|
Comment[nl]=Eenvoudige tekstbewerker
|
||||||
|
Comment[nn]=Enkelt teksthandsamingsprogram
|
||||||
|
Comment[oc]=Editor de tèxte simple
|
||||||
|
Comment[pl]=Zwykły edytor tekstu
|
||||||
|
Comment[pt]=Editor de texto simples
|
||||||
|
Comment[pt_BR]=Editor de Texto Simples
|
||||||
|
Comment[ro]=Un editor simplu de text
|
||||||
|
Comment[ru]=Простой текстовый редактор
|
||||||
|
Comment[sk]=Jednoduchý textový editor
|
||||||
|
Comment[sl]=Preprost urejevalnik besedila
|
||||||
|
Comment[sq]=Përpunues Tekstesh i Thjeshtë
|
||||||
|
Comment[sr]=Једноставан уређивач писања
|
||||||
|
Comment[sv]=Enkel textredigerare
|
||||||
|
Comment[te]=సులభ పాఠ్య కూర్పకం
|
||||||
|
Comment[th]=เครื่องมือแก้ไขข้อความอย่างง่าย
|
||||||
|
Comment[tr]=Basit Metin Düzenleyici
|
||||||
|
Comment[ug]=ئاددىي تېكىست تەھرىرلىگۈ
|
||||||
|
Comment[uk]=Простий текстовий редактор
|
||||||
|
Comment[zh_CN]=简易文本编辑器
|
||||||
|
Comment[zh_TW]=簡易文字編輯器
|
||||||
|
GenericName=Text Editor
|
||||||
|
GenericName[ar]=محرر نصوص
|
||||||
|
GenericName[ast]=Editor de testu
|
||||||
|
GenericName[be]=Тэкставы рэдактар
|
||||||
|
GenericName[bg]=Текстов редактор
|
||||||
|
GenericName[ca]=Editor de text
|
||||||
|
GenericName[cs]=Textový editor
|
||||||
|
GenericName[da]=Tekstredigering
|
||||||
|
GenericName[de]=Textbearbeitung
|
||||||
|
GenericName[el]=Επεξεργαστής Κειμένου
|
||||||
|
GenericName[en_AU]=Text Editor
|
||||||
|
GenericName[en_GB]=Text Editor
|
||||||
|
GenericName[es]=Editor de texto
|
||||||
|
GenericName[et]=Tekstiredaktor
|
||||||
|
GenericName[eu]=Testu Editatzailea
|
||||||
|
GenericName[fi]=Tekstimuokkain
|
||||||
|
GenericName[fr]=Éditeur de texte
|
||||||
|
GenericName[gl]=Editor de texto
|
||||||
|
GenericName[he]=עורך תמלילים
|
||||||
|
GenericName[hr]=Uređivač teksta
|
||||||
|
GenericName[hu]=Szövegszerkesztő
|
||||||
|
GenericName[hy_AM]=Գրոյթային խմբագրիչ
|
||||||
|
GenericName[hye]=Գրոյթային խմբագրիչ
|
||||||
|
GenericName[id]=Penyunting Teks
|
||||||
|
GenericName[ie]=Redactor de textus
|
||||||
|
GenericName[is]=Textaritill
|
||||||
|
GenericName[it]=Editor di Testo
|
||||||
|
GenericName[ja]=テキストエディター
|
||||||
|
GenericName[kk]=Мәтін түзетушісі
|
||||||
|
GenericName[ko]=문서 편집기
|
||||||
|
GenericName[lt]=Teksto redaktorius
|
||||||
|
GenericName[ms]=Penyunting Teks
|
||||||
|
GenericName[nb]=Tekstbehandler
|
||||||
|
GenericName[nl]=Tekstbewerker
|
||||||
|
GenericName[nn]=Teksthandsamingsprogram
|
||||||
|
GenericName[oc]=Editor de tèxte
|
||||||
|
GenericName[pl]=Edytor tekstu
|
||||||
|
GenericName[pt]=Editor de texto
|
||||||
|
GenericName[pt_BR]=Editor de Texto
|
||||||
|
GenericName[ro]=Editor de text
|
||||||
|
GenericName[ru]=Текстовый редактор
|
||||||
|
GenericName[sk]=Textový editor
|
||||||
|
GenericName[sl]=Urejevalnik besedila
|
||||||
|
GenericName[sq]=Përpunues Tekstesh
|
||||||
|
GenericName[sr]=Уређивач писања
|
||||||
|
GenericName[sv]=Textredigerare
|
||||||
|
GenericName[te]=పాఠ్య కూర్పకం
|
||||||
|
GenericName[th]=เครื่องมือแก้ไขข้อความ
|
||||||
|
GenericName[tr]=Metin Düzenleyici
|
||||||
|
GenericName[ug]=تېكىست تەھرىرلىگۈ
|
||||||
|
GenericName[uk]=Текстовий редактор
|
||||||
|
GenericName[zh_CN]=文本编辑器
|
||||||
|
GenericName[zh_TW]=文字編輯器
|
||||||
|
Exec=mousepad %F
|
||||||
|
Icon=org.xfce.mousepad
|
||||||
|
Terminal=false
|
||||||
|
StartupNotify=true
|
||||||
|
Type=Application
|
||||||
|
Categories=Utility;TextEditor;GTK;
|
||||||
|
MimeType=text/plain;
|
|
@ -0,0 +1,35 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
#This .desktop file is never shown in a menu, hence no Exec
|
||||||
|
#it's here mostly so wayland can get an icon on popups
|
||||||
|
### Location=/usr/share/applications/org.kde.kded5.desktop
|
||||||
|
Name=KDED
|
||||||
|
Name[az]=KDED
|
||||||
|
Name[ca]=KDED
|
||||||
|
Name[da]=KDED
|
||||||
|
Name[de]=KDED
|
||||||
|
Name[el]=KDED
|
||||||
|
Name[en_GB]=KDED
|
||||||
|
Name[es]=KDED
|
||||||
|
Name[et]=KDED
|
||||||
|
Name[eu]=KDED
|
||||||
|
Name[fi]=KDED
|
||||||
|
Name[fr]=KDED
|
||||||
|
Name[hu]=KDED
|
||||||
|
Name[ia]=KDED
|
||||||
|
Name[it]=KDED
|
||||||
|
Name[ko]=KDED
|
||||||
|
Name[nl]=KDED
|
||||||
|
Name[nn]=KDED
|
||||||
|
Name[pt]=KDED
|
||||||
|
Name[pt_BR]=KDED
|
||||||
|
Name[ro]=KDED
|
||||||
|
Name[sk]=KDED
|
||||||
|
Name[sl]=KDED
|
||||||
|
Name[sv]=KDED
|
||||||
|
Name[uk]=KDED
|
||||||
|
Name[vi]=KDED
|
||||||
|
Name[x-test]=xxKDEDxx
|
||||||
|
Name[zh_CN]=KDED
|
||||||
|
Type=Application
|
||||||
|
Icon=kde-frameworks
|
||||||
|
NoDisplay=true
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Creates an "Install Peppermint" icon on the live session tested with:
|
||||||
|
# Xfce, LXDE, LXqt, Gnome, KDE, Mate, Cinnamon
|
||||||
|
|
||||||
|
# We query xdg-user-dir because the Desktop directory has different
|
||||||
|
# names for different languages
|
||||||
|
DESKTOP=$(xdg-user-dir DESKTOP)
|
||||||
|
|
||||||
|
# Create ~/Desktop just in case this runs before the xdg folder
|
||||||
|
# creation script.
|
||||||
|
mkdir -p $DESKTOP
|
||||||
|
|
||||||
|
# Among the Peppermint desktop environments, LXDE is the only one
|
||||||
|
# that behaves completely different.
|
||||||
|
if [ -f /usr/bin/lxsession ]; then
|
||||||
|
echo "[Desktop Entry]" > $DESKTOP/Install-peppermint.desktop
|
||||||
|
echo "Type=Link" >> $DESKTOP/Install-peppermint.desktop
|
||||||
|
echo "Name=Install Peppermint" >> $DESKTOP/Install-peppermint.desktop
|
||||||
|
echo "Icon=install-debian" >> $DESKTOP/Install-peppermint.desktop
|
||||||
|
echo "URL=/usr/share/applications/install-peppermint.desktop" \
|
||||||
|
>> $DESKTOP/Install-peppermint.desktop
|
||||||
|
else
|
||||||
|
cp /usr/share/applications/Install-peppermint.desktop $DESKTOP
|
||||||
|
# Xfce needs this executable otherwise it complains, everything
|
||||||
|
# else doesn't seem to care either way.
|
||||||
|
chmod +x $DESKTOP/Install-peppermint.desktop
|
||||||
|
fi
|
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
componentName: peppermint
|
||||||
|
welcomeStyleCalamares: false
|
||||||
|
welcomeExpandingLogo: true
|
||||||
|
windowExpanding: normal
|
||||||
|
windowSize: 700,450
|
||||||
|
windowPlacement: center
|
||||||
|
|
||||||
|
strings:
|
||||||
|
productName: Peppermint
|
||||||
|
shortProductName: Peppermint
|
||||||
|
version: 00
|
||||||
|
shortVersion: 00
|
||||||
|
versionedName: Peppermint
|
||||||
|
shortVersionedName: Peppermint
|
||||||
|
bootloaderEntryName: Peppermint
|
||||||
|
productUrl: https://www.peppermintos.com
|
||||||
|
supportUrl: https://forum.peppermintos.com
|
||||||
|
releaseNotesUrl: https://www.peppermintos.com
|
||||||
|
|
||||||
|
images:
|
||||||
|
productLogo: "pep-logo.png"
|
||||||
|
productIcon: "pep-logo.png"
|
||||||
|
productWelcome: "welcome.png"
|
||||||
|
|
||||||
|
slideshow: "show.qml"
|
||||||
|
|
||||||
|
style:
|
||||||
|
sidebarBackground: "#333333"
|
||||||
|
sidebarText: "#FFFFFF"
|
||||||
|
sidebarTextSelect: "#F62817"
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 24 KiB |
|
@ -0,0 +1,103 @@
|
||||||
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
|
*
|
||||||
|
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
||||||
|
* Copyright 2018-2019, Jonathan Carter <jcc@debian.org>
|
||||||
|
*
|
||||||
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Calamares is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import QtQuick 2.0;
|
||||||
|
import calamares.slideshow 1.0;
|
||||||
|
|
||||||
|
Presentation
|
||||||
|
{
|
||||||
|
id: presentation
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
interval: 20000
|
||||||
|
running: true
|
||||||
|
repeat: true
|
||||||
|
onTriggered: presentation.goToNextSlide()
|
||||||
|
}
|
||||||
|
|
||||||
|
Slide {
|
||||||
|
Image {
|
||||||
|
id: background1
|
||||||
|
source: "s1.png"
|
||||||
|
width: 2000; height: 2000
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Slide {
|
||||||
|
Image {
|
||||||
|
id: background2
|
||||||
|
source: "s2.png"
|
||||||
|
width: 2000; height: 2000
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Slide {
|
||||||
|
Image {
|
||||||
|
id: background3
|
||||||
|
source: "s3.png"
|
||||||
|
width: 2000; height: 2000
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Slide {
|
||||||
|
Image {
|
||||||
|
id: background4
|
||||||
|
source: "s4.png"
|
||||||
|
width: 2000; height: 2000
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
Slide {
|
||||||
|
Image {
|
||||||
|
id: background5
|
||||||
|
source: "s5.png"
|
||||||
|
width: 2000; height: 2000
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
After Width: | Height: | Size: 119 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 142 KiB |