develop #11
README.md
bin
plugins
archiver
disk_usage
favorites
file_properties
git_clone
__init__.py__main__.pymanifest.json
pexpect
ANSI.pyFSM.pyLICENSE__init__.py_async.pybashrc.shexceptions.pyexpect.pyfdpexpect.pypopen_spawn.pypty_spawn.py
plugin.pyptyprocess
pxssh.pyreplwrap.pyrun.pyscreen.pyspawnbase.pyutils.pymovie_tv_info
py_run
searcher
template
translate
trasher
vod_thumbnailer
youtube_download
download.shplugin.py
yt_dlp-2022.2.4.dist-info
yt_dlp
YoutubeDL.py__init__.py__main__.py
__pyinstaller
aes.pycache.pycompat.pycompat
cookies.pydependencies
downloader
__init__.pycommon.pydash.pyexternal.pyf4m.pyfc2.pyfragment.pyhls.pyhttp.pyism.pymhtml.pyniconico.pyrtmp.pyrtsp.pywebsocket.pyyoutube_live_chat.py
extractor
__init__.py_extractors.pyabc.pyabcnews.pyabcotvs.pyabematv.pyacademicearth.pyacast.pyacfun.pyadn.pyadobeconnect.pyadobepass.pyadobetv.pyadultswim.pyaenetworks.pyaeonco.pyafreecatv.pyagora.pyairmozilla.pyairtv.pyaitube.pyaliexpress.pyaljazeera.pyallocine.pyalphaporno.pyalsace20tv.pyalura.pyamara.pyamazon.pyamazonminitv.pyamcnetworks.pyamericastestkitchen.pyamp.pyangel.pyanimelab.pyanimeondemand.pyant1newsgr.pyanvato.py
jsinterp.pyminicurses.pyoptions.pyplugins.pyanvato_token_generator
aol.pyapa.pyaparat.pyappleconnect.pyapplepodcasts.pyappletrailers.pyarchiveorg.pyarcpublishing.pyard.pyarkena.pyarnes.pyarte.pyasiancrush.pyatresplayer.pyatscaleconf.pyatttechchannel.pyatvat.pyaudimedia.pyaudioboom.pyaudiodraft.pyaudiomack.pyaudius.pyawaan.pyaws.pyazmedien.pybaidu.pybanbye.pybandaichannel.pybandcamp.pybannedvideo.pybbc.pybeatbump.pybeatport.pybeeg.pybehindkink.pybellmedia.pyberufetv.pybet.pybfi.pybfmtv.pybibeltv.pybigflix.pybigo.pybild.pybilibili.pybiobiochiletv.pybiqle.pybitchute.pybitwave.pyblackboardcollaborate.pybleacherreport.pyblinkx.pyblogger.pybloomberg.pybokecc.pybongacams.pybooyah.pybostonglobe.pybox.pybpb.pybr.pybravotv.pybreakcom.pybreitbart.pybrightcove.pybundesliga.pybusinessinsider.pybuzzfeed.pybyutv.pyc56.pycableav.pycallin.pycaltrans.pycam4.pycamdemy.pycammodels.pycamsoda.pycamtasia.pycamwithher.pycanalalpha.pycanalc2.pycanalplus.pycanvas.pycarambatv.pycartoonnetwork.pycbc.pycbs.pycbsinteractive.pycbslocal.pycbsnews.pycbssports.pyccc.pyccma.pycctv.pycda.pycellebrite.pyceskatelevize.pycgtn.pychannel9.pycharlierose.pychaturbate.pychilloutzone.pychingari.pychirbit.pycinchcast.pycinemax.pycinetecamilano.pyciscolive.pyciscowebex.pycjsw.pycliphunter.pyclippit.pycliprs.pyclipsyndicate.pyclosertotruth.pycloudflarestream.pycloudy.pyclubic.pyclyp.pycmt.pycnbc.pycnn.pycomedycentral.pycommon.pycommonmistakes.pycommonprotocols.pycondenast.pycontv.pycorus.pycoub.pycozytv.pycpac.pycracked.pycrackle.pycraftsy.pycrooksandliars.pycrowdbunker.pycrunchyroll.pycspan.pyctsnews.pyctv.pyctvnews.pycultureunplugged.pycuriositystream.pycwtv.pycybrary.pydaftsex.pydailymail.pydailymotion.pydailywire.pydamtomo.pydaum.pydaystar.pydbtv.pydctp.pydeezer.pydefense.pydemocracynow.pydetik.pydeuxm.pydfb.pydhm.pydigg.pydigitalconcerthall.pydigiteka.pydiscovery.pydiscoverygo.pydiscoveryvr.pydisney.pydispeak.pydlive.pydoodstream.pydotsub.pydouyutv.pydplay.pydrbonanza.pydreisat.pydrooble.pydropbox.pydropout.pydrtuber.pydrtv.pydtube.pyduboku.pydumpert.pydvtv.pydw.pyeagleplatform.pyebaumsworld.pyechomsk.pyegghead.pyehow.pyeighttracks.pyeinthusan.pyeitb.pyellentube.pyelonet.pyelpais.pyembedly.pyengadget.pyepicon.pyepoch.pyeporner.pyeroprofile.pyertgr.pyescapist.pyespn.pyesri.pyeuropa.pyeuropeantour.pyeurosport.pyeuscreen.pyeveryonesmixtape.pyexpotv.pyexpressen.pyextractors.pyextremetube.pyeyedotv.pyfacebook.pyfancode.pyfaz.pyfc2.pyfczenit.pyfifa.pyfilmmodu.pyfilmon.pyfilmweb.pyfirsttv.pyfivemin.pyfivetv.pyflickr.pyfolketinget.pyfootyroom.pyformula1.pyfourtube.pyfourzerostudio.pyfox.pyfox9.pyfoxgay.pyfoxnews.pyfoxsports.pyfptplay.pyfranceculture.pyfranceinter.pyfrancetv.pyfreesound.pyfreespeech.pyfreetv.pyfreshlive.pyfrontendmasters.pyfujitv.pyfunimation.pyfunk.pyfusion.pyfuyintv.pyfxnetworks.pygab.pygaia.pygameinformer.pygamejolt.pygamespot.pygamestar.pygaskrank.pygazeta.pygdcvault.pygedidigital.pygeneric.pygenericembeds.pygenius.pygettr.pygfycat.pygiantbomb.pygiga.pygigya.pyglide.pyglobo.pyglomex.pygo.pygodtube.pygofile.pygolem.pygoodgame.pygoogledrive.pygooglepodcasts.pygooglesearch.pygoplay.pygopro.pygoshgay.pygotostage.pygputechconf.pygronkh.pygroupon.pyharpodeon.pyhbo.pyhearthisat.pyheise.pyhellporno.pyhelsinki.pyhentaistigma.pyhgtv.pyhidive.pyhistoricfilms.pyhitbox.pyhitrecord.pyhketv.pyholodex.pyhornbunny.pyhotnewhiphop.pyhotstar.pyhowcast.pyhowstuffworks.pyhrfensehen.pyhrti.pyhse.pyhuajiao.pyhuffpost.pyhungama.pyhuya.pyhypem.pyhytale.pyicareus.pyichinanalive.pyign.pyiheart.pyiltalehti.pyimdb.pyimggaming.pyimgur.pyina.pyinc.pyindavideo.pyinfoq.pyinstagram.pyinternazionale.pyinternetvideoarchive.pyiprima.pyiqiyi.pyir90tv.pyislamchannel.pyisraelnationalnews.pyitprotv.pyitv.pyivi.pyivideon.pyiwara.pyixigua.pyizlesene.pyjable.pyjamendo.pyjapandiet.pyjeuxvideo.pyjixie.pyjoj.pyjove.pyjwplatform.pykakao.pykaltura.pykanal2.pykanalplay.pykankan.pykankanews.pykaraoketv.pykarrierevideos.pykeezmovies.pykelbyone.pyketnet.pykhanacademy.pykick.pykicker.pykickstarter.pykinja.pykinopoisk.pykompas.pykonserthusetplay.pykoo.pykrasview.pykth.pyku6.pykusi.pykuwo.pyla7.pylaola1tv.pylastfm.pylazy_extractors.pylbry.pylci.pylcp.pylecture2go.pylecturio.pyleeco.pylego.pylemonde.pylenta.pylibraryofcongress.pylibsyn.pylifenews.pylikee.pylimelight.pyline.pylinkedin.pylinuxacademy.pyliputan6.pylistennotes.pylitv.pylivejournal.pylivestream.pylivestreamfails.pylnkgo.pylocalnews8.pylovehomeporn.pylrt.pylynda.pym6.pymagentamusik360.pymailru.pymainstreaming.pymalltv.pymangomolo.pymanoto.pymanyvids.pymaoritv.pymarkiza.pymassengeschmacktv.pymasters.pymatchtv.pymdr.pymedaltv.pymediaite.pymediaklikk.pymedialaan.pymediaset.pymediasite.pymediastream.pymediaworksnz.pymedici.pymegaphone.pymegatvcom.pymeipai.pymelonvod.pymeta.pymetacafe.pymetacritic.pymgoon.pymgtv.pymiaopai.pymicrosoftembed.pymicrosoftstream.pymicrosoftvirtualacademy.pymildom.pyminds.pyministrygrid.pyminoto.pymiomio.pymirrativ.pymirrorcouk.pymit.pymitele.pymixch.pymixcloud.pymlb.pymlssoccer.pymnet.pymocha.pymoevideo.pymofosex.pymojvideo.pymorningstar.pymotherless.pymotorsport.pymovieclips.pymoviepilot.pymoview.pymoviezine.pymovingimage.pymsn.pymtv.pymuenchentv.pymurrtube.pymusescore.pymusicdex.pymwave.pymxplayer.pymychannels.pymyspace.pymyspass.pymyvi.pymyvideoge.pymyvidster.pyn1.pynate.pynationalgeographic.pynaver.pynba.pynbc.pyndr.pyndtv.pynebula.pynerdcubed.pyneteasemusic.pynetverse.pynetzkino.pynewgrounds.pynewspicks.pynewstube.pynewsy.pynextmedia.pynexx.pynfb.pynfhsnetwork.pynfl.pynhk.pynhl.pynick.pyniconico.pyninecninemedia.pyninegag.pyninenow.pynintendo.pynitter.pynjpwworld.pynobelprize.pynoco.pynoice.pynonktube.pynoodlemagazine.pynoovo.pynormalboots.pynosnl.pynosvideo.pynova.pynovaplay.pynowness.pynoz.pynpo.pynpr.pynrk.pynrl.pyntvcojp.pyntvde.pyntvru.pynuevo.pynuvid.pynytimes.pynzherald.pynzonscreen.pynzz.pyodatv.pyodnoklassniki.pyoftv.pyoktoberfesttv.pyolympics.pyon24.pyonce.pyondemandkorea.pyonefootball.pyonenewsnz.pyoneplace.pyonet.pyonionstudios.pyooyala.pyopencast.pyopenload.pyopenrec.pyora.pyorf.pyoutsidetv.pypacktpub.pypalcomp3.pypandoratv.pypanopto.pyparamountplus.pyparler.pyparliamentliveuk.pyparlview.pypatreon.pypbs.pypearvideo.pypeekvids.pypeertube.pypeertv.pypeloton.pypeople.pyperformgroup.pyperiscope.pyphilharmoniedeparis.pyphoenix.pyphotobucket.pypiapro.pypicarto.pypiksel.pypinkbike.pypinterest.pypixivsketch.pypladform.pyplanetmarathi.pyplatzi.pyplayfm.pyplayplustv.pyplays.pyplaystuff.pyplaysuisse.pyplaytvak.pyplayvid.pyplaywire.pypluralsight.pyplutotv.pypodbayfm.pypodchaser.pypodomatic.pypokemon.pypokergo.pypolsatgo.pypolskieradio.pypopcorntimes.pypopcorntv.pyporn91.pyporncom.pypornez.pypornflip.pypornhd.pypornhub.pypornotube.pypornovoisines.pypornoxo.pyprankcast.pypremiershiprugby.pypresstv.pyprojectveritas.pyprosiebensat1.pyprx.pypuhutv.pypuls4.pypyvideo.pyqingting.pyqqmusic.pyr7.pyradiko.pyradiobremen.pyradiocanada.pyradiode.pyradiofrance.pyradiojavan.pyradiokapital.pyradiozet.pyradlive.pyrai.pyraywenderlich.pyrbmaradio.pyrcs.pyrcti.pyrds.pyredbee.pyredbulltv.pyreddit.pyredgifs.pyredtube.pyregiotv.pyrentv.pyrestudy.pyreuters.pyreverbnation.pyrice.pyrmcdecouverte.pyro220.pyrockstargames.pyrokfin.pyroosterteeth.pyrottentomatoes.pyroxwel.pyrozhlas.pyrtbf.pyrte.pyrtl2.pyrtlnl.pyrtnews.pyrtp.pyrtrfm.pyrts.pyrtve.pyrtvnh.pyrtvs.pyrtvslo.pyruhd.pyrule34video.pyrumble.pyrutube.pyrutv.pyruutu.pyruv.pysafari.pysaitosan.pysamplefocus.pysapo.pysavefrom.pysbs.pyscreen9.pyscreencast.pyscreencastify.pyscreencastomatic.pyscrippsnetworks.pyscrolller.pyscte.pyseeker.pysenategov.pysendtonews.pyservus.pysevenplus.pysexu.pyseznamzpravy.pyshahid.pyshared.pysharevideos.pyshemaroome.pyshowroomlive.pysibnet.pysimplecast.pysina.pysixplay.pyskeb.pysky.pyskyit.pyskylinewebcams.pyskynewsarabia.pyskynewsau.pyslideshare.pyslideslive.pyslutload.pysmotrim.pysnotr.pysohu.pysonyliv.pysoundcloud.pysoundgasm.pysouthpark.pysovietscloset.pyspankbang.pyspankwire.pyspiegel.pyspiegeltv.pyspike.pysport5.pysportbox.pysportdeutschland.pyspotify.pyspreaker.pyspringboardplatform.pysprout.pysrgssr.pysrmediathek.pystanfordoc.pystartrek.pystartv.pysteam.pystitcher.pystoryfire.pystreamable.pystreamanity.pystreamcloud.pystreamcz.pystreamff.pystreetvoice.pystretchinternet.pystripchat.pystv.pysubstack.pysunporno.pysverigesradio.pysvt.pyswearnet.pyswrmediathek.pysyfy.pysyvdk.pysztvhu.pytagesschau.pytass.pytastytrade.pytbs.pytdslifeway.pyteachable.pyteachertube.pyteachingchannel.pyteamcoco.pyteamtreehouse.pytechtalks.pyted.pytele13.pytele5.pytelebruxelles.pytelecinco.pytelegraaf.pytelegram.pytelemb.pytelemundo.pytelequebec.pyteletask.pytelewebion.pytempo.pytencent.pytennistv.pytenplay.pytesturl.pytf1.pytfo.pytheholetv.pytheintercept.pytheplatform.pythescene.pythestar.pythesun.pytheta.pytheweatherchannel.pythisamericanlife.pythisav.pythisoldhouse.pythisvid.pythreeqsdn.pythreespeak.pytiktok.pytinypic.pytmz.pytnaflix.pytoggle.pytoggo.pytokentube.pytonline.pytoongoggles.pytoutv.pytoypics.pytraileraddict.pytriller.pytrilulilu.pytrovo.pytrtcocuk.pytrueid.pytrunews.pytruth.pytrutv.pytube8.pytubetugraz.pytubitv.pytudou.pytumblr.pytunein.pytunepk.pyturbo.pyturner.pytv2.pytv24ua.pytv2dk.pytv2hu.pytv4.pytv5mondeplus.pytv5unis.pytva.pytvanouvelles.pytvc.pytver.pytvigle.pytviplayer.pytvland.pytvn24.pytvnet.pytvnoe.pytvnow.pytvopengr.pytvp.pytvplay.pytvplayer.pytweakers.pytwentyfourvideo.pytwentymin.pytwentythreevideo.pytwitcasting.pytwitch.pytwitter.pytxxx.pyudemy.pyudn.pyufctv.pyukcolumn.pyuktvplay.pyumg.pyunistra.pyunity.pyunscripted.pyunsupported.pyuol.pyuplynk.pyurort.pyurplay.pyusanetwork.pyusatoday.pyustream.pyustudio.pyutreon.pyvarzesh3.pyvbox7.pyveehd.pyveo.pyveoh.pyvesti.pyvevo.pyvgtv.pyvh1.pyvice.pyvidbit.pyviddler.pyvidea.pyvideocampus_sachsen.pyvideodetective.pyvideofyme.pyvideoken.pyvideomore.pyvideopress.pyvidio.pyvidlii.pyvidzi.pyvier.pyviewlift.pyviidea.pyviki.pyvimeo.pyvimm.pyvimple.pyvine.pyviqeo.pyviu.pyvk.pyvlive.pyvodlocker.pyvodpl.pyvodplatform.pyvoicerepublic.pyvoicy.pyvolejtv.pyvoot.pyvoxmedia.pyvrak.pyvrt.pyvrv.pyvshare.pyvtm.pyvube.pyvuclip.pyvupload.pyvvvvid.pyvyborymos.pyvzaar.pywakanim.pywalla.pywasdtv.pywashingtonpost.pywat.pywatchbox.pywatchindianporn.pywdr.pywebcamerapl.pywebcaster.pywebofstories.pyweibo.pyweiqitv.pywhowatch.pywikimedia.pywillow.pywimtv.pywistia.pywordpress.pyworldstarhiphop.pywppilot.pywrestleuniverse.pywsj.pywwe.pyxanimu.pyxbef.pyxboxclips.pyxfileshare.pyxhamster.pyxiami.pyximalaya.pyxinpianchang.pyxminus.pyxnxx.pyxstream.pyxtube.pyxuite.pyxvideos.pyxxxymovies.pyyahoo.pyyandexdisk.pyyandexmusic.pyyandexvideo.pyyapfiles.pyyesjapan.pyyinyuetai.pyyle_areena.pyynet.pyyoujizz.pyyouku.pyyounow.pyyouporn.pyyourporn.pyyourupload.pyyoutube.pyzapiks.pyzaq1.pyzattoo.pyzdf.pyzee5.pyzeenews.pyzhihu.pyzingmp3.pyzoom.pyzype.pypostprocessor
__init__.pycommon.pyembedthumbnail.pyexec.pyffmpeg.pymetadataparser.pymodify_chapters.pymovefilesafterdownload.pysponskrub.pysponsorblock.pyxattrpp.py
socks.pyupdate.pyutils.pyversion.pywebvtt.pysrc
debs
chown_all.sh
solarfm-0-0-1-x64
DEBIAN
bin
opt
SolarFM
__builtins__.py__init__.py__main__.pyapp.py
context
__init__.pycontroller.pycontroller_data.py
ipc_server.pymixins
signals
plugins
shellfm
__init__.py
windows
trasher
utils
usr
share
applications
solarfm
Main_Window.gladecontexct_menu.json
fileicons
3g2.png3gp.pngai.pngair.pngasf.pngavi.pngbib.pngcls.pngcsv.pngdeb.pngdjvu.pngdmg.pngdoc.pngdocx.pngdwf.pngdwg.pngeps.pngepub.pngexe.pngf.pngf77.pngf90.pngflac.pngflv.pnggif.pnggz.pngico.pngindd.pngiso.pngjpeg.pngjpg.pnglog.pngm4a.pngm4v.pngmidi.pngmkv.pngmov.pngmp3.pngmp4.pngmpeg.pngmpg.pngmsi.pngodp.pngods.pngodt.pngoga.pngogg.pngogv.pngpdf.pngpng.pngpps.pngppsx.pngppt.pngpptx.pngpsd.pngpub.pngpy.pngqt.pngra.pngram.pngrar.pngrm.pngrpm.pngrtf.pngrv.pngskp.pngspx.pngsql.pngsty.pngtar.pngtex.pngtgz.pngtiff.pngttf.pngtxt.pngvob.pngwav.pngwmv.pngxls.pngxlsx.pngxml.pngxpi.pngzip.png
icons
key-bindings.jsonsettings.jsonui_widgets
versions
solarfm-0.0.1
SolarFM
SolarFM_exec_bin.cppcompileBin.shcreate-binary.shcreate-standalone.shdebugger.shsetup.pysolarfm.tomlsolarfm
..o__builtins__.py__init__.py__main__.pyapp.py
core
__init__.pycontroller.pycontroller_data.py
fs_actions
mixins
ui_mixin.pywidgets
__init__.pybottom_status_info_widget.pycontext_menu_widget.py
window.pydialogs
__init__.pyabout_widget.pyappchooser_widget.pyfile_exists_widget.pymessage_widget.pynew_file_widget.pyrename_widget.pysave_load_widget.pyuser_pass_widget.py
files_view
icon_grid_widget.pyicon_tree_widget.pyio_widget.pypopups
__init__.pyio_popup_widget.pymessage_popup_widget.pypath_menu_popup_widget.pyplugins_popup_widget.py
tab_header_widget.pyplugins
shellfm
__init__.py
windows
utils
user_config
bin
usr
bin
share
applications
solarfm
3
plugins/py_run/__init__.py
Normal file
3
plugins/py_run/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Module
|
||||
"""
|
3
plugins/py_run/__main__.py
Normal file
3
plugins/py_run/__main__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Package
|
||||
"""
|
13
plugins/py_run/manifest.json
Normal file
13
plugins/py_run/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest": {
|
||||
"name": "PyRun",
|
||||
"author": "ITDominator",
|
||||
"version": "0.0.1",
|
||||
"support": "",
|
||||
"requests": {
|
||||
"ui_target": "plugin_control_list",
|
||||
"pass_fm_events": "true",
|
||||
"bind_keys": ["PyRun||send_message:<Shift><Control>r"]
|
||||
}
|
||||
}
|
||||
}
|
71
plugins/py_run/plugin.py
Normal file
71
plugins/py_run/plugin.py
Normal file
@@ -0,0 +1,71 @@
|
||||
# Python imports
|
||||
import os
|
||||
import threading
|
||||
import subprocess
|
||||
|
||||
# Lib imports
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
|
||||
# Application imports
|
||||
from plugins.plugin_base import PluginBase
|
||||
|
||||
|
||||
# NOTE: Threads WILL NOT die with parent's destruction.
|
||||
def threaded(fn):
|
||||
def wrapper(*args, **kwargs):
|
||||
threading.Thread(target=fn, args=args, kwargs=kwargs, daemon=False).start()
|
||||
return wrapper
|
||||
|
||||
# NOTE: Threads WILL die with parent's destruction.
|
||||
def daemon_threaded(fn):
|
||||
def wrapper(*args, **kwargs):
|
||||
threading.Thread(target=fn, args=args, kwargs=kwargs, daemon=True).start()
|
||||
return wrapper
|
||||
|
||||
|
||||
|
||||
|
||||
class Plugin(PluginBase):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self.name = "PyRun" # NOTE: Need to remove after establishing private bidirectional 1-1 message bus
|
||||
# where self.name should not be needed for message comms
|
||||
|
||||
|
||||
def run(self):
|
||||
...
|
||||
|
||||
def generate_reference_ui_element(self):
|
||||
button = Gtk.Button(label=self.name)
|
||||
button.connect("button-release-event", self.start_run)
|
||||
button.set_image( Gtk.Image(stock=Gtk.STOCK_MEDIA_PLAY ) )
|
||||
button.set_always_show_image(True)
|
||||
return button
|
||||
|
||||
def start_run(self, widget=None, eve=None):
|
||||
self._event_system.emit("get_current_state")
|
||||
state = self._fm_state
|
||||
current_dir = state.tab.get_current_directory()
|
||||
isValid = False
|
||||
command = ["terminator", "-x", f"bash -c 'python . && bash'"]
|
||||
|
||||
if not state.uris:
|
||||
for file in os.listdir(current_dir):
|
||||
path = os.path.join(current_dir, file)
|
||||
if os.path.isfile(path) and file == "__main__.py":
|
||||
isValid = True
|
||||
break
|
||||
elif state.uris and len(state.uris) == 1:
|
||||
file = state.uris[0]
|
||||
if os.path.isfile(file) and file.endswith(".py"):
|
||||
command = ["terminator", "-x", f"bash -c 'python {state.uris[0]} && bash'"]
|
||||
isValid = True
|
||||
|
||||
if isValid:
|
||||
self.launch(current_dir, command)
|
||||
|
||||
def launch(self, current_dir = "/", command = []):
|
||||
subprocess.Popen(command, cwd=current_dir, shell=False, start_new_session=True, stdout=None, stderr=None, close_fds=True)
|
@@ -37,17 +37,17 @@ class Plugin(PluginBase):
|
||||
# self._GLADE_FILE = f"{self.path}/glade_file.glade"
|
||||
|
||||
|
||||
def generate_reference_ui_element(self):
|
||||
button = Gtk.Button(label=self.name)
|
||||
button.connect("button-release-event", self.send_message)
|
||||
return button
|
||||
|
||||
def run(self):
|
||||
# self._builder = Gtk.Builder()
|
||||
# self._builder.add_from_file(self._GLADE_FILE)
|
||||
# self._connect_builder_signals(self, self._builder)
|
||||
...
|
||||
|
||||
def generate_reference_ui_element(self):
|
||||
button = Gtk.Button(label=self.name)
|
||||
button.connect("button-release-event", self.send_message)
|
||||
return button
|
||||
|
||||
def send_message(self, widget=None, eve=None):
|
||||
message = "Hello, World!"
|
||||
event_system.emit("display_message", ("warning", message, None))
|
||||
|
@@ -18,7 +18,6 @@ from app import Application
|
||||
|
||||
|
||||
|
||||
|
||||
def run():
|
||||
try:
|
||||
locale.setlocale(locale.LC_NUMERIC, 'C')
|
||||
|
@@ -1,26 +1,25 @@
|
||||
# Python imports
|
||||
import signal
|
||||
import os
|
||||
import inspect
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
|
||||
from utils.debugging import debug_signal_handler
|
||||
from utils.ipc_server import IPCServer
|
||||
from core.window import Window
|
||||
|
||||
|
||||
|
||||
class AppLaunchException(Exception):
|
||||
...
|
||||
|
||||
|
||||
|
||||
class Application(IPCServer):
|
||||
""" Inherit from IPCServer; create Controller classe; bind any signal(s) to Builder. """
|
||||
""" docstring for Application. """
|
||||
|
||||
def __init__(self, args, unknownargs):
|
||||
super(Application, self).__init__()
|
||||
self.args, self.unknownargs = args, unknownargs
|
||||
|
||||
if not settings.is_trace_debug():
|
||||
try:
|
||||
@@ -36,4 +35,14 @@ class Application(IPCServer):
|
||||
|
||||
raise AppLaunchException(f"{app_name} IPC Server Exists: Will send path(s) to it and close...")
|
||||
|
||||
try:
|
||||
# kill -SIGUSR2 <pid> from Linux/Unix or SIGBREAK signal from Windows
|
||||
signal.signal(
|
||||
vars(signal).get("SIGBREAK") or vars(signal).get("SIGUSR1"),
|
||||
debug_signal_handler
|
||||
)
|
||||
except ValueError:
|
||||
# Typically: ValueError: signal only works in main thread
|
||||
...
|
||||
|
||||
Window(args, unknownargs)
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import os
|
||||
import json
|
||||
from os.path import join
|
||||
from dataclasses import dataclass
|
||||
|
||||
# Lib imports
|
||||
|
||||
@@ -14,6 +15,7 @@ class ManifestProcessorException(Exception):
|
||||
...
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class PluginInfo:
|
||||
path: str = None
|
||||
name: str = None
|
||||
|
@@ -34,14 +34,14 @@ class FileHandler:
|
||||
|
||||
return True
|
||||
|
||||
def delete_file(self, toDeleteFile):
|
||||
def delete_file(self, to_delete_file):
|
||||
try:
|
||||
print(f"Deleting: {toDeleteFile}")
|
||||
if os.path.exists(toDeleteFile):
|
||||
if os.path.isfile(toDeleteFile):
|
||||
os.remove(toDeleteFile)
|
||||
elif os.path.isdir(toDeleteFile):
|
||||
shutil.rmtree(toDeleteFile)
|
||||
print(f"Deleting: {to_delete_file}")
|
||||
if os.path.exists(to_delete_file):
|
||||
if os.path.isfile(to_delete_file):
|
||||
os.remove(to_delete_file)
|
||||
elif os.path.isdir(to_delete_file):
|
||||
shutil.rmtree(to_delete_file)
|
||||
else:
|
||||
print("An error occured deleting the file:")
|
||||
return False
|
||||
|
35
src/versions/solarfm-0.0.1/solarfm/utils/debugging.py
Normal file
35
src/versions/solarfm-0.0.1/solarfm/utils/debugging.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# Python imports
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
|
||||
|
||||
|
||||
# Break into a Python console upon SIGUSR1 (Linux) or SIGBREAK (Windows:
|
||||
# CTRL+Pause/Break). To be included in all production code, just in case.
|
||||
def debug_signal_handler(signal, frame):
|
||||
del signal
|
||||
del frame
|
||||
|
||||
try:
|
||||
import rpdb2
|
||||
logger.debug("\n\nStarting embedded RPDB2 debugger. Password is 'foobar'\n\n")
|
||||
rpdb2.start_embedded_debugger("foobar", True, True)
|
||||
rpdb2.setbreak(depth=1)
|
||||
return
|
||||
except StandardError:
|
||||
pass
|
||||
|
||||
try:
|
||||
from rfoo.utils import rconsole
|
||||
logger.debug("\n\nStarting embedded rconsole debugger...\n\n")
|
||||
rconsole.spawn_server()
|
||||
except StandardError as ex:
|
||||
...
|
||||
|
||||
try:
|
||||
import code
|
||||
code.interact()
|
||||
except StandardError as ex:
|
||||
logger.debug(f"{ex}, returning to normal program flow...")
|
@@ -577,6 +577,46 @@
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="action-start">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="layout-style">start</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-back</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-forward</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="action-end">
|
||||
<object class="GtkSearchEntry" id="win1_search_field">
|
||||
<property name="name">window_1</property>
|
||||
@@ -632,6 +672,46 @@
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="action-start">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="layout-style">start</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-back</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-forward</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="action-end">
|
||||
<object class="GtkSearchEntry" id="win2_search_field">
|
||||
<property name="name">window_2</property>
|
||||
@@ -701,6 +781,46 @@
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="action-start">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="layout-style">start</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-back</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-forward</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="action-end">
|
||||
<object class="GtkSearchEntry" id="win3_search_field">
|
||||
<property name="name">window_3</property>
|
||||
@@ -755,6 +875,46 @@
|
||||
<child type="tab">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child type="action-start">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="layout-style">start</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-back</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-go-forward</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<property name="always-show-image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab-fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="action-end">
|
||||
<object class="GtkSearchEntry" id="win4_search_field">
|
||||
<property name="name">window_4</property>
|
||||
|
Reference in New Issue
Block a user