Moved rest of resources to user dir
This commit is contained in:
parent
cd1e5003fb
commit
aa74b30c12
@ -1,7 +1,7 @@
|
|||||||
# SolarFM
|
# SolarFM
|
||||||
|
|
||||||
# SolarFM
|
# SolarFM
|
||||||
SolarFM is a Gtk + Python file manager.
|
SolarFM is a Gtk+ Python file manager.
|
||||||
|
|
||||||
# Notes
|
# Notes
|
||||||
```sudo apt-get install python3 wget steamcmd```
|
```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 prompt guards for actions.</li>
|
||||||
<li>Add path bar search dropdown.</li>
|
<li>Add path bar search dropdown.</li>
|
||||||
<li>Add "execute" and "execute in terminal" context options.</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 simpleish plugin system to run bash/python scripts.</li>
|
||||||
<li>Add DnD context awareness for over folder drop.</li>
|
<li>Add DnD context awareness for over folder drop.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Python imports
|
# Python imports
|
||||||
import os
|
import os
|
||||||
|
from os import path
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
import gi, cairo
|
import gi, cairo
|
||||||
@ -17,29 +18,37 @@ from . import Logger
|
|||||||
class Settings:
|
class Settings:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.SCRIPT_PTH = os.path.dirname(os.path.realpath(__file__))
|
self.SCRIPT_PTH = os.path.dirname(os.path.realpath(__file__))
|
||||||
self.gladefile = self.SCRIPT_PTH + "/../resources/Main_Window.glade"
|
self.USER_HOME = path.expanduser('~')
|
||||||
self.cssFile = self.SCRIPT_PTH + '/../resources/stylesheet.css'
|
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.logger = Logger().get_logger()
|
||||||
|
|
||||||
self.builder = gtk.Builder()
|
self.builder = gtk.Builder()
|
||||||
self.builder.add_from_file(self.gladefile)
|
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):
|
def createWindow(self):
|
||||||
# Get window and connect signals
|
# Get window and connect signals
|
||||||
self.mainWindow = self.builder.get_object("Main_Window")
|
self.main_window = self.builder.get_object("Main_Window")
|
||||||
self.setWindowData()
|
self.setWindowData()
|
||||||
|
|
||||||
def setWindowData(self):
|
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()
|
visual = screen.get_rgba_visual()
|
||||||
|
|
||||||
if visual != None and screen.is_composited():
|
if visual != None and screen.is_composited():
|
||||||
self.mainWindow.set_visual(visual)
|
self.main_window.set_visual(visual)
|
||||||
self.mainWindow.set_app_paintable(True)
|
self.main_window.set_app_paintable(True)
|
||||||
self.mainWindow.connect("draw", self.area_draw)
|
self.main_window.connect("draw", self.area_draw)
|
||||||
|
|
||||||
# bind css file
|
# bind css file
|
||||||
cssProvider = gtk.CssProvider()
|
cssProvider = gtk.CssProvider()
|
||||||
@ -54,7 +63,7 @@ class Settings:
|
|||||||
cr.paint()
|
cr.paint()
|
||||||
cr.set_operator(cairo.OPERATOR_OVER)
|
cr.set_operator(cairo.OPERATOR_OVER)
|
||||||
|
|
||||||
def getMainWindow(self): return self.mainWindow
|
def getMainWindow(self): return self.main_window
|
||||||
|
|
||||||
|
|
||||||
def getMonitorData(self):
|
def getMonitorData(self):
|
||||||
|
@ -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="window-position">center</property>
|
||||||
<property name="default-width">1670</property>
|
<property name="default-width">1670</property>
|
||||||
<property name="default-height">830</property>
|
<property name="default-height">830</property>
|
||||||
<property name="icon">solarfm.png</property>
|
|
||||||
<property name="gravity">center</property>
|
<property name="gravity">center</property>
|
||||||
<signal name="key-press-event" handler="global_key_press_controller" swapped="no"/>
|
<signal name="key-press-event" handler="global_key_press_controller" swapped="no"/>
|
||||||
<signal name="key-release-event" handler="global_key_release_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="can-focus">True</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="placeholder-text" translatable="yes">Path...</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>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<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="can-focus">False</property>
|
||||||
<property name="icon-name">user-trash</property>
|
<property name="icon-name">user-trash</property>
|
||||||
</object>
|
</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">
|
<object class="GtkDialog" id="context_menu">
|
||||||
<property name="can-focus">False</property>
|
<property name="can-focus">False</property>
|
||||||
<property name="resizable">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>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">4</property>
|
<property name="position">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -1620,7 +1624,7 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">4</property>
|
<property name="position">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -1638,6 +1642,25 @@ SolarFM is developed on Atom, git, and using Python 3+ with Gtk GObject introspe
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</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>
|
<property name="position">5</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Loading…
Reference in New Issue
Block a user