Moved rest of resources to user dir

This commit is contained in:
itdominator 2021-11-28 22:41:23 -06:00
parent cd1e5003fb
commit aa74b30c12
6 changed files with 51 additions and 18 deletions

View File

@ -1,7 +1,7 @@
# SolarFM
# SolarFM
SolarFM is a Gtk + Python file manager.
SolarFM is a Gtk+ Python file manager.
# Notes
```sudo apt-get install python3 wget steamcmd```
@ -11,7 +11,8 @@ SolarFM is a Gtk + Python file manager.
<li>Add prompt guards for actions.</li>
<li>Add path bar search dropdown.</li>
<li>Add "execute" and "execute in terminal" context options.</li>
<li>Add "go to trash" and "delete all trash" options.</li>
<li>Add "go to trash", "clear trash", "restore from trash" options.</li>
<li>Add drive size free and consumed info to bottom bar.</li>
<li>Add simpleish plugin system to run bash/python scripts.</li>
<li>Add DnD context awareness for over folder drop.</li>
</ul>

View File

@ -1,5 +1,6 @@
# Python imports
import os
from os import path
# Gtk imports
import gi, cairo
@ -17,29 +18,37 @@ from . import Logger
class Settings:
def __init__(self):
self.SCRIPT_PTH = os.path.dirname(os.path.realpath(__file__))
self.gladefile = self.SCRIPT_PTH + "/../resources/Main_Window.glade"
self.cssFile = self.SCRIPT_PTH + '/../resources/stylesheet.css'
self.USER_HOME = path.expanduser('~')
self.CONFIG_PATH = self.USER_HOME + "/.config/solarfm"
self.gladefile = self.CONFIG_PATH + "/Main_Window.glade"
self.cssFile = self.CONFIG_PATH + '/stylesheet.css'
self.logger = Logger().get_logger()
self.builder = gtk.Builder()
self.builder.add_from_file(self.gladefile)
self.mainWindow = None
self.DEFAULT_ICONS = self.CONFIG_PATH + "/icons"
self.window_icon = self.DEFAULT_ICONS + "/solarfm.png"
self.main_window = None
def createWindow(self):
# Get window and connect signals
self.mainWindow = self.builder.get_object("Main_Window")
self.main_window = self.builder.get_object("Main_Window")
self.setWindowData()
def setWindowData(self):
screen = self.mainWindow.get_screen()
self.main_window.set_icon_from_file(self.window_icon)
screen = self.main_window.get_screen()
visual = screen.get_rgba_visual()
if visual != None and screen.is_composited():
self.mainWindow.set_visual(visual)
self.mainWindow.set_app_paintable(True)
self.mainWindow.connect("draw", self.area_draw)
self.main_window.set_visual(visual)
self.main_window.set_app_paintable(True)
self.main_window.connect("draw", self.area_draw)
# bind css file
cssProvider = gtk.CssProvider()
@ -54,7 +63,7 @@ class Settings:
cr.paint()
cr.set_operator(cairo.OPERATOR_OVER)
def getMainWindow(self): return self.mainWindow
def getMainWindow(self): return self.main_window
def getMonitorData(self):

View File

@ -797,7 +797,6 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<property name="window-position">center</property>
<property name="default-width">1670</property>
<property name="default-height">830</property>
<property name="icon">solarfm.png</property>
<property name="gravity">center</property>
<signal name="key-press-event" handler="global_key_press_controller" swapped="no"/>
<signal name="key-release-event" handler="global_key_release_controller" swapped="no"/>
@ -1137,7 +1136,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="placeholder-text" translatable="yes">Path...</property>
<signal name="key-release-event" handler="do_action_from_bar_controls" swapped="no"/>
<signal name="changed" handler="do_action_from_bar_controls" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@ -1474,6 +1473,11 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<property name="can-focus">False</property>
<property name="icon-name">user-trash</property>
</object>
<object class="GtkImage" id="trash_img2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">user-trash</property>
</object>
<object class="GtkDialog" id="context_menu">
<property name="can-focus">False</property>
<property name="resizable">False</property>
@ -1532,7 +1536,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">3</property>
</packing>
</child>
<child>
@ -1620,7 +1624,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">3</property>
</packing>
</child>
<child>
@ -1638,6 +1642,25 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Go To Trash</property>
<property name="name">go_to_trash</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Go To Trash...</property>
<property name="image">trash_img2</property>
<property name="always-show-image">True</property>
<signal name="button-release-event" handler="do_action_from_menu_controls" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">5</property>
</packing>
</child>

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB