develop #11
plugins
archiver
disk_usage
favorites
file_properties
git_clone
movie_tv_info
searcher
template
translate
trasher
vod_thumbnailer
youtube_download
plugin.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/versions/solarfm-0.0.1/SolarFM/solarfm
__builtins__.py__main__.py
core
controller.pycontroller_data.pyui_mixin.py
fs_actions
mixins
signals
ui
widgets
__init__.pycontext_menu_widget.py
dialogs
__init__.pyabout_widget.pyappchooser_widget.pyfile_exists_widget.pymessage_widget.pynew_file_widget.pyrename_widget.pysave_load_widget.py
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/usr/share/solarfm
@@ -1,4 +1,5 @@
|
||||
# Python imports
|
||||
import time
|
||||
import threading
|
||||
import subprocess
|
||||
import signal
|
||||
@@ -33,11 +34,36 @@ def daemon_threaded(fn):
|
||||
|
||||
class FileSearchMixin:
|
||||
def _run_find_file_query(self, widget=None, eve=None):
|
||||
self._handle_find_file_query(query=widget)
|
||||
self._queue_search = True
|
||||
|
||||
if not self._search_watcher_running:
|
||||
self._search_watcher_running = True
|
||||
|
||||
self._stop_fsearch_query()
|
||||
self.reset_file_list_box()
|
||||
self.run_fsearch_watcher(query=widget)
|
||||
|
||||
# TODO: Merge this logic with nearly the exact same thing in grep_search_mixin
|
||||
@daemon_threaded
|
||||
def _handle_find_file_query(self, widget=None, eve=None, query=None):
|
||||
def run_fsearch_watcher(self, query):
|
||||
while True:
|
||||
if self._queue_search:
|
||||
self._queue_search = False
|
||||
time.sleep(1)
|
||||
|
||||
# NOTE: Hold call to translate if we're still typing/updating...
|
||||
if self._queue_search:
|
||||
continue
|
||||
|
||||
# NOTE: If query create new process and do all new loop.
|
||||
if query:
|
||||
self.pause_fifo_update = False
|
||||
GLib.idle_add(self._exec_find_file_query, query)
|
||||
|
||||
self._search_watcher_running = False
|
||||
|
||||
break
|
||||
|
||||
def _stop_fsearch_query(self, widget=None, eve=None):
|
||||
# NOTE: Freeze IPC consumption
|
||||
self.pause_fifo_update = True
|
||||
self.search_query = ""
|
||||
@@ -53,14 +79,6 @@ class FileSearchMixin:
|
||||
|
||||
self._list_proc = None
|
||||
|
||||
# NOTE: Clear children from ui and make sure ui thread redraws
|
||||
GLib.idle_add(self.reset_file_list_box)
|
||||
|
||||
# NOTE: If query create new process and do all new loop.
|
||||
if query:
|
||||
self.pause_fifo_update = False
|
||||
GLib.idle_add(self._exec_find_file_query, query)
|
||||
|
||||
def _exec_find_file_query(self, widget=None, eve=None):
|
||||
query = widget.get_text()
|
||||
|
||||
@@ -70,6 +88,8 @@ class FileSearchMixin:
|
||||
command = ["python", f"{self.path}/utils/search.py", "-t", "file_search", "-d", f"{target_dir}", "-q", f"{query}"]
|
||||
self._list_proc = subprocess.Popen(command, cwd=self.path, stdin=None, stdout=None, stderr=None)
|
||||
|
||||
|
||||
|
||||
def _load_file_ui(self, data):
|
||||
Gtk.main_iteration()
|
||||
|
||||
|
@@ -35,11 +35,36 @@ def daemon_threaded(fn):
|
||||
|
||||
class GrepSearchMixin:
|
||||
def _run_grep_query(self, widget=None, eve=None):
|
||||
self._handle_grep_query(query=widget)
|
||||
self._queue_grep = True
|
||||
|
||||
if not self._grep_watcher_running:
|
||||
self._grep_watcher_running = True
|
||||
|
||||
self._stop_grep_query()
|
||||
self.reset_grep_box()
|
||||
self.run_grep_watcher(query=widget)
|
||||
|
||||
# TODO: Merge this logic with nearly the exact same thing in file_search_mixin
|
||||
@daemon_threaded
|
||||
def _handle_grep_query(self, widget=None, eve=None, query=None):
|
||||
def run_grep_watcher(self, query):
|
||||
while True:
|
||||
if self._queue_grep:
|
||||
self._queue_grep = False
|
||||
time.sleep(1)
|
||||
|
||||
# NOTE: Hold call to translate if we're still typing/updating...
|
||||
if self._queue_grep:
|
||||
continue
|
||||
|
||||
# NOTE: If query create new process and do all new loop.
|
||||
if query:
|
||||
self.pause_fifo_update = False
|
||||
GLib.idle_add(self._exec_grep_query, query)
|
||||
|
||||
self._grep_watcher_running = False
|
||||
|
||||
break
|
||||
|
||||
def _stop_grep_query(self, widget=None, eve=None):
|
||||
# NOTE: Freeze IPC consumption
|
||||
self.pause_fifo_update = True
|
||||
self.grep_query = ""
|
||||
@@ -55,13 +80,6 @@ class GrepSearchMixin:
|
||||
|
||||
self._grep_proc = None
|
||||
|
||||
# NOTE: Clear children from ui and make sure ui thread redraws
|
||||
GLib.idle_add(self.reset_grep_box)
|
||||
|
||||
# NOTE: If query create new process and do all new loop.
|
||||
if query:
|
||||
self.pause_fifo_update = False
|
||||
GLib.idle_add(self._exec_grep_query, query)
|
||||
|
||||
def _exec_grep_query(self, widget=None, eve=None):
|
||||
query = widget.get_text()
|
||||
|
@@ -36,10 +36,16 @@ class Plugin(IPCServer, FileSearchMixin, GrepSearchMixin, PluginBase):
|
||||
self._grep_proc = None
|
||||
self._list_proc = None
|
||||
self.pause_fifo_update = False
|
||||
self.grep_time_stamp = None
|
||||
self.fsearch_time_stamp = None
|
||||
self.grep_query = ""
|
||||
self.search_query = ""
|
||||
|
||||
self.grep_query = ""
|
||||
self.grep_time_stamp = None
|
||||
self._queue_grep = False
|
||||
self._grep_watcher_running = False
|
||||
|
||||
self.search_query = ""
|
||||
self.fsearch_time_stamp = None
|
||||
self._queue_search = False
|
||||
self._search_watcher_running = False
|
||||
|
||||
|
||||
def run(self):
|
||||
@@ -57,7 +63,6 @@ class Plugin(IPCServer, FileSearchMixin, GrepSearchMixin, PluginBase):
|
||||
self._event_system.subscribe("update-grep-ui", self._load_grep_ui)
|
||||
self._event_system.subscribe("show_search_page", self._show_page)
|
||||
|
||||
|
||||
self.create_ipc_listener()
|
||||
|
||||
def generate_reference_ui_element(self):
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.38.2 -->
|
||||
<!-- Generated with glade 3.40.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkDialog" id="search_dialog">
|
||||
@@ -101,7 +101,7 @@
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<signal name="released" handler="_handle_find_file_query" swapped="no"/>
|
||||
<signal name="released" handler="_stop_fsearch_query" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -193,7 +193,7 @@
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">True</property>
|
||||
<property name="use-stock">True</property>
|
||||
<signal name="released" handler="_handle_grep_query" swapped="no"/>
|
||||
<signal name="released" handler="_stop_grep_query" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@@ -112,7 +112,8 @@ class Plugin(PluginBase):
|
||||
|
||||
GLib.idle_add(self._translate)
|
||||
self._watcher_running = False
|
||||
break
|
||||
|
||||
break
|
||||
|
||||
def _translate(self):
|
||||
start_itr, end_itr = self._translate_from_buffer.get_bounds()
|
||||
|
@@ -76,6 +76,10 @@ class FileSystemActions(HandlerMixin, CRUDMixin):
|
||||
file_name = state.uris[0].split("/")[-1]
|
||||
event_system.emit("set_clipboard_data", (file_name,))
|
||||
|
||||
def copy_path(self):
|
||||
state = event_system.emit_and_await("get_current_state")
|
||||
dir = state.tab.get_current_directory()
|
||||
event_system.emit("set_clipboard_data", (file_name,))
|
||||
|
||||
def open_files(self):
|
||||
state = event_system.emit_and_await("get_current_state")
|
||||
|
@@ -7,6 +7,9 @@ import subprocess
|
||||
# Apoplication imports
|
||||
|
||||
|
||||
class ShellFMLauncherException(Exception):
|
||||
...
|
||||
|
||||
|
||||
|
||||
class Launcher:
|
||||
@@ -15,12 +18,7 @@ class Launcher:
|
||||
command = []
|
||||
|
||||
if lowerName.endswith(self.fvideos):
|
||||
command = [self.media_app]
|
||||
|
||||
if "mplayer" in self.media_app:
|
||||
command += self.mplayer_options
|
||||
|
||||
command += [file]
|
||||
command = [self.media_app, file]
|
||||
elif lowerName.endswith(self.fimages):
|
||||
command = [self.image_app, file]
|
||||
elif lowerName.endswith(self.fmusic):
|
||||
@@ -42,13 +40,22 @@ class Launcher:
|
||||
|
||||
|
||||
def execute(self, command, start_dir=os.getenv("HOME"), use_shell=False):
|
||||
self.logger.debug(command)
|
||||
subprocess.Popen(command, cwd=start_dir, shell=use_shell, start_new_session=True, stdout=None, stderr=None, close_fds=True)
|
||||
try:
|
||||
self.logger.debug(command)
|
||||
subprocess.Popen(command, cwd=start_dir, shell=use_shell, start_new_session=True, stdout=None, stderr=None, close_fds=True)
|
||||
except ShellFMLauncherException as e:
|
||||
self.logger.error(f"Couldn't execute: {command}")
|
||||
self.logger.error(e)
|
||||
|
||||
# TODO: Return stdout and in handlers along with subprocess instead of sinking to null
|
||||
# TODO: Return std(out/in/err) handlers along with subprocess instead of sinking to null
|
||||
def execute_and_return_thread_handler(self, command, start_dir=os.getenv("HOME"), use_shell=False):
|
||||
DEVNULL = open(os.devnull, 'w')
|
||||
return subprocess.Popen(command, cwd=start_dir, shell=use_shell, start_new_session=False, stdout=DEVNULL, stderr=DEVNULL, close_fds=False)
|
||||
try:
|
||||
DEVNULL = open(os.devnull, 'w')
|
||||
return subprocess.Popen(command, cwd=start_dir, shell=use_shell, start_new_session=False, stdout=DEVNULL, stderr=DEVNULL, close_fds=False)
|
||||
except ShellFMLauncherException as e:
|
||||
self.logger.error(f"Couldn't execute and return thread: {command}")
|
||||
self.logger.error(e)
|
||||
return None
|
||||
|
||||
@threaded
|
||||
def app_chooser_exec(self, app_info, uris):
|
||||
@@ -75,9 +82,9 @@ class Launcher:
|
||||
try:
|
||||
proc = subprocess.Popen(command)
|
||||
proc.wait()
|
||||
except Exception as e:
|
||||
self.logger.debug(message)
|
||||
self.logger.debug(e)
|
||||
except ShellFMLauncherException as e:
|
||||
self.logger.error(message)
|
||||
self.logger.error(e)
|
||||
return False
|
||||
|
||||
return True
|
||||
@@ -86,7 +93,7 @@ class Launcher:
|
||||
limit = self.remux_folder_max_disk_usage
|
||||
try:
|
||||
limit = int(limit)
|
||||
except Exception as e:
|
||||
except ShellFMLauncherException as e:
|
||||
self.logger.debug(e)
|
||||
return
|
||||
|
||||
|
@@ -8,34 +8,43 @@ from os import path
|
||||
# Apoplication imports
|
||||
|
||||
|
||||
class ShellFMSettingsException(Exception):
|
||||
...
|
||||
|
||||
|
||||
|
||||
class Settings:
|
||||
logger = None
|
||||
USR_SOLARFM = "/usr/share/solarfm"
|
||||
SHIM_PATH = "/dev/shm/solarfm"
|
||||
|
||||
# NOTE: app_name should be defined using python 'builtins'
|
||||
app_name_exists = False
|
||||
try:
|
||||
app_name
|
||||
app_name_exists = True
|
||||
except Exception as e:
|
||||
...
|
||||
|
||||
APP_CONTEXT = f"{app_name.lower()}" if app_name_exists else "shellfm"
|
||||
USR_APP_CONTEXT = f"/usr/share/{APP_CONTEXT}"
|
||||
USER_HOME = path.expanduser('~')
|
||||
CONFIG_PATH = f"{USER_HOME}/.config/solarfm"
|
||||
CONFIG_PATH = f"{USER_HOME}/.config/{APP_CONTEXT}"
|
||||
CONFIG_FILE = f"{CONFIG_PATH}/settings.json"
|
||||
HIDE_HIDDEN_FILES = True
|
||||
|
||||
GTK_ORIENTATION = 1 # HORIZONTAL (0) VERTICAL (1)
|
||||
DEFAULT_ICONS = f"{CONFIG_PATH}/icons"
|
||||
DEFAULT_ICON = f"{DEFAULT_ICONS}/text.png"
|
||||
FFMPG_THUMBNLR = f"{CONFIG_PATH}/ffmpegthumbnailer" # Thumbnail generator binary
|
||||
BLENDER_THUMBNLR = f"{CONFIG_PATH}/blender-thumbnailer" # Blender thumbnail generator binary
|
||||
# REMUX_FOLDER = f"{USER_HOME}/.remuxs" # Remuxed files folder
|
||||
REMUX_FOLDER = f"{SHIM_PATH}/.remuxs" # Remuxed files folder
|
||||
REMUX_FOLDER = f"{USER_HOME}/.remuxs" # Remuxed files folder
|
||||
|
||||
ICON_DIRS = ["/usr/share/icons", f"{USER_HOME}/.icons" "/usr/share/pixmaps"]
|
||||
# BASE_THUMBS_PTH = f"{USER_HOME}/.thumbnails" # Used for thumbnail generation
|
||||
BASE_THUMBS_PTH = f"{SHIM_PATH}/.thumbnails" # Used for thumbnail generation
|
||||
ABS_THUMBS_PTH = f"{BASE_THUMBS_PTH}/normal" # Used for thumbnail generation
|
||||
BASE_THUMBS_PTH = f"{USER_HOME}/.thumbnails"
|
||||
ABS_THUMBS_PTH = f"{BASE_THUMBS_PTH}/normal"
|
||||
STEAM_ICONS_PTH = f"{BASE_THUMBS_PTH}/steam_icons"
|
||||
|
||||
# Dir structure check
|
||||
if not path.isdir(SHIM_PATH):
|
||||
os.mkdir(SHIM_PATH)
|
||||
if not os.path.exists(CONFIG_PATH) or not os.path.exists(CONFIG_FILE):
|
||||
msg = f"No config file located! Aborting loading ShellFM library...\nExpected: {CONFIG_FILE}"
|
||||
raise ShellFMSettingsException(msg)
|
||||
|
||||
if not path.isdir(REMUX_FOLDER):
|
||||
os.mkdir(REMUX_FOLDER)
|
||||
@@ -50,7 +59,7 @@ class Settings:
|
||||
os.mkdir(STEAM_ICONS_PTH)
|
||||
|
||||
if not os.path.exists(DEFAULT_ICONS):
|
||||
DEFAULT_ICONS = f"{USR_SOLARFM}/icons"
|
||||
DEFAULT_ICONS = f"{USR_APP_CONTEXT}/icons"
|
||||
DEFAULT_ICON = f"{DEFAULT_ICONS}/text.png"
|
||||
|
||||
with open(CONFIG_FILE) as f:
|
||||
|
Reference in New Issue
Block a user