LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux Lite 3.0 Suggestion Thread
#41
to torreydale

Well they could put the ubuntu software center in Lite Software
#42
The development team didn't want it.  And if you look at the link to the thread provided, it gives some insight as to why.
Want to thank me?  Click my [Thank] link.
#43
If possible I would like to have a "Send to" right click menu item for the desktop that allows me to send items from the desktop to my home, documents, music, pictures, and other relevant folders.
“I have not failed. I’ve just found 10,000 ways that won’t work.” - Thomas Edison
#44
(02-17-2016, 04:47 PM)avj link Wrote:If possible I would like to have a "Send to" right click menu item for the desktop that allows me to send items from the desktop to my home, documents, music, pictures, and other relevant folders.
Yep.
This is a quick hack of shaggytwodopes's control center code. Will copy just one file but the general idea is that Thunar calls a py script Smile
Code:
# Thunar custom actions launcher for Send to operations
#  Milos Pavlovic 2016 <[email protected]>
#
#  Save this file to /usr/local/bin/menu.py
#  Setting thunar custom action:
#  Name: Send to
#  Description : Copy file to...
#  Command: python3 /usr/local/bin/menu.py "%F"

#  File Pattern: *
#  Appearance: *
#
#  This program 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 2 of the License, or
#  (at your option) any later version.

#  This program 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 this program; if not, write to the Free Software
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#  MA 02110-1301, USA.


# $@ - file input

icons=[
["name","icon","command"],
["Send to Home","folder-home",'cp $@ $HOME/'],
["Send to Desktop","desktop",'cp $@ $HOME/Desktop/'],
["Send to Documents","folder-documents",'cp $@ $HOME/Documents/'],
["Send to Downloads","folder-downloads",'cp $@ $HOME/Downloads'],
["Send to Music","folder-music",'cp $@ $HOME/Music'],
["Send to Pictures","folder-pictures",'cp $@ $HOME/Pictures'],
["Send to Videos","folder-videos",'cp $@ $HOME/Videos'],
]


import os
import sys
import string
import subprocess
import shlex
from gi.repository import Gtk as Gtk
from gi.repository.GdkPixbuf import Pixbuf


class Menu:

    def destroy(self, widget, data=None):
        Gtk.main_quit()

    def action(self, widget, event, x, data=None):
        if len(sys.argv) > 1 and  x != '':
           files = "{0}".format(sys.argv[1])
           home = os.path.expanduser("~/")
           command = x.replace("$@", files)
           command = command.replace("$HOME", home)
           subprocess.Popen(shlex.split(command), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
        else:
           print("No file(s) passed. Exiting.")
        Gtk.main_quit()

    def __init__(self):
        self.menu = Gtk.Menu()
        self.menu.connect("hide", self.destroy)
        it=Gtk.IconTheme.get_default()
        j=0
        first=True
        for line in icons:
            if first:
               first=False
               continue 
            try:
               if '/' in line[1]:
                  pixbuf = pixbuf_new_from_file(line[1])
               else:
                  pixbuf = it.load_icon(line[1],24,0)
            except:
               pixbuf = it.load_icon('gtk-stop',24,0)
            name = (line[0])
            execc = line[2]


            x=execc

            box = Gtk.Box()
            box.set_spacing(10)
            img = Gtk.Image()
            img.set_from_pixbuf(pixbuf)
            label = Gtk.Label(name)
            box.add(img)
            box.add(label)
            menuitem = Gtk.MenuItem()
            menuitem.add(box)
            menuitem.connect("button-press-event", self.action, x)
            self.menu.append(menuitem)
            j +=1
        height = j*30
        self.menu.set_size_request(150, height) # Workaround for height
        self.menu.popup(None, None, None, None, 0, Gtk.get_current_event_time())
        self.menu.show_all()
    def main(self):
        # Cliche init
        Gtk.main()

if __name__ == "__main__":

     app = Menu()
     app.main()
Just throwing in some ideas for now.
Would need to be reworked to use shutil to copy files and folders. And passing file and folder names from Thunar like this is not a very good idea. I guess writing to temp file would be preferable so file and folder names are read line by line in a script. Then Thunar custom action would be something like: "for file in %F; do echo $file >> tmp.txt; done; python3 /souce/ destination tmp.txt;rm -r tmp.txt".
There is also a case when filename exists. In that case script could offer to overwrite / change destination filename / skip coping that file or folder. To display error when it cant copy and finally a progress bar. Smile
#45
Great work to the developers for Linux lite and to jerry

Awesome NEW logon jerry

is xfce 4.12 going to be in this release. Would really like to see it if possible
I love my chicken and my popcorn and movies like i like Linux
#46
Whatever XFCE is in the Ubuntu repos at the time will be included. We don't use PPA's for XFCE, only the standard Ubuntu repo.
#47
(02-18-2016, 03:09 AM)Jerry link Wrote:Whatever XFCE is in the Ubuntu repos at the time will be included. We don't use PPA's for XFCE, only the standard Ubuntu repo.

That didn't really answer my question LOL

This says its in 14.04 not sure if thats what you go by

https://launchpad.net/~xubuntu-dev/+arch.../xfce-4.12
I love my chicken and my popcorn and movies like i like Linux
#48
That page shows that there is a PPA for 14.04, as I said, we don't use PPA's for XFCE so I did actually answer your question, you just needed to look at the information more carefully. Hope that's clear enough for you Smile
#49
(02-18-2016, 04:32 AM)Jerry link Wrote:That page shows that there is a PPA for 14.04, as I said, we don't use PPA's for XFCE so I did actually answer your question, you just needed to look at the information more carefully. Hope that's clear enough for you Smile

You said. Whatever XFCE is in the Ubuntu repos at the time will be included

So thats what i showed you here

https://launchpad.net/~xubuntu-dev/+arch.../xfce-4.12

And you really didn't tell me if it was going to be in the next release. But OK whatever  8)

What PPA is is under then?

http//jerry/Linuxliteos/ubuntu/ppa

Big Grin
I love my chicken and my popcorn and movies like i like Linux
#50
That is an Xubuntu PPA, not an Ubuntu repo. If you're going to continue posting inaccurate comments, you'll leave us no choice but to delete them to ensure the information in this thread stays accurate.

A PPA looks like this: ppa:xubuntu-dev/xfce-4.12

A repo looks like this: deb http://nz.archive.ubuntu.com/ubuntu/ trusty-updates main restricted


Forum Jump:


Users browsing this thread: 4 Guest(s)