SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 Re: Artwork & Screenshots » Post your gtk-2.0 themes » 2012-05-09 05:02:48

You are a terrible person and I hate you. I didn't want to sleep tonight anyway.

#2 Re: Artwork & Screenshots » my #! tattoo » 2012-05-09 05:01:18

Bonus feature, you can say hi to people who are far away without having to wave.

#3 Re: Tips, Tricks & Scripts » F.lux: Make long nights easier on your eyes! » 2012-05-09 04:59:52

Well, it turns out redshift was inspired by F.lux, so I'm not a totally bad person. neutral

#4 Re: Artwork & Screenshots » Post your gtk-2.0 themes » 2012-05-09 04:55:18

See, it's threads like this that keep me up until 3 AM every day.

#5 Re: Tips, Tricks & Scripts » F.lux: Make long nights easier on your eyes! » 2012-05-09 04:45:52

It seems to be just like it, yeah. I had never heard of redshift. I'm so used to using F.lux on Windows and OS X that I didn't even think to look for an alternative.

#6 Re: CrunchBang Talk » Interesing day at work... » 2012-05-09 04:41:24

I don't know if telling somebody that barely trusts him about this post is too great of an idea. And if he gives him a live USB stick, he may gravitate towards the community, discover this post, and get mad. Not saying it's a bad idea, OP, but I suppose you should be careful.

#7 Re: CrunchBang Talk » Why do you use #!Crunchbang » 2012-05-09 04:36:35

I have always been interested in Linux, but never found a reason to stick with it. I used Ubuntu a few times back at 8.04 I believe, and liked it a whole lot.. I was using it on my laptop for several months, but being only 17 now (13 then?), I didn't know and wasn't interested in knowing anything outside of how to get it booted. I thought it was cool, new, and different, but those were my only reasons. It was basically a Windows replacement that, when I found one or two things I had problems with, or got bored of it, became more of a space-waste than a useful thing to keep around.

I stayed with Windows for a while, learned a whole lot more about computers, got a job at a tech place, built my own rig. This is when Linux began to intrigue me more, but the interest was quickly lost. I tried some of the more mainstream distros, like Ubuntu, Fedora, some Debian. Debian was cool because I didn't hate the interface, but at the same time it was the boring Gnome 2 shell I was too used to and bored with. I looked at some other desktop environments, but my research led me nowhere past Unity, KDE, GNOME 2, and GNOME 3. Lets just say I didn't know where to look to get info I wasn't too interested in anyway.

A couple months later I saw that a guy was running Arch with XFCE on his nix box at work. It looked very technical/text driven, which was interesting to me. No boring GNOME, just a clean desktop with a lot to learn about the system to know how to use. This was what I wanted: a reason to learn. 30 minutes of research and followed links (Arch -> Archbang -> openbox -> #!) leads me to a #! VM on my machine at work, and eventually a full install or two. It was awesome for all the reasons you already know.

So I installed it at home (with Windows dual booted for games), and a few weeks later loaded it onto a spare machine at work. Loving it so far.

#8 Re: Artwork & Screenshots » May 2012 Screenshot Thread » 2012-05-09 04:19:25

That's a great theme you have there. Title shade-text could use some work, and the teal is a bit harsh, unless that's what you are going for. Otherwise loving it.

#9 Tips, Tricks & Scripts » F.lux: Make long nights easier on your eyes! » 2012-05-09 04:16:38

ConnorCG
Replies: 14

F.lux is a program that changes the color temperature of your monitor based on the time of day. At night you will get a more orange, warm temperature. This makes using Crunchbang, or any OS for that matter easier on your eyes at night.

To install:

wget http://secure.herf.org/flux/xflux.tgz
tar -xvzf xflux.tgz
sudo cp xflux /usr/local/bin
sudo chmod 755 /usr/local/bin/xflux

to run:

xflux -z zipcode
xflux -l lat -g long

I've added "xflux -z 03079", for example, to Openbox' autostart. I've been using F.lux for over a year now, and it really does make a huge difference for me.

#10 Re: Tips, Tricks & Scripts » My tint2 config » 2012-05-09 04:03:11

Currently tweaking a setup from a user on here. I don't remember who, but your setup is very nice. I made it blue, and made it my own.

tint itself:
D6R1WSJq_thumb.png


I set Compton to draw shadows on the tint panel, and I think it worked out quite well. Might as well show the entire desktop to give you a look.
kTS7tucY_thumb.png


#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------

#---------------------------------------------
# BACKGROUND AND BORDER
#---------------------------------------------   

# active app border
rounded = 2
border_width = 1
background_color = #055078 90
border_color = #011e2e 50

# active panel stuff
rounded = 2
border_width = 1
background_color = #012538 90
border_color = #014265 50

# panel border
rounded = 0
border_width = 1
background_color = #003f60 100
border_color = #08243a 70

# non active panel stuff
rounded = 2
border_width = 1
background_color = #005583 90
border_color = #003552 50

# tray + clock
rounded = 0
border_width = 0
background_color = #003f60 90
border_color = #003552 50

#---------------------------------------------
# PANEL
#---------------------------------------------
panel_monitor = all
panel_position = top center horizontal
panel_size = 100% 38
panel_margin = 0 0
panel_padding = 5 3 5
font_shadow = 0
panel_background_id = 3
wm_menu = 1
panel_dock = 0

#---------------------------------------------
# TASKBAR
#---------------------------------------------
taskbar_mode = multi_desktop
taskbar_padding = 2 1 2
taskbar_background_id = 4
taskbar_active_background_id = 2

#---------------------------------------------
# TASKS
#---------------------------------------------
urgent_nb_of_blink = 10
task_icon = 1
task_text = 0
task_width = 47
task_centered = 1
task_padding = 2 1
task_font = sans 7
task_font_color = #FFE1E3 70
task_active_font_color = #FFE1E3 85
task_background_id = 0
task_active_background_id = 1
#task_icon_asb = 20 20 50
#task_active_icon_asb = 50 50 100

#---------------------------------------------
# TOOLTIPS
#---------------------------------------------
tooltip = 1
tooltip_padding = 0 0
tooltip_show_timeout = 0
tooltip_hide_timeout = 0
tooltip_background_id = 2
tooltip_font = Sans 10
tooltip_font_color = #D3D3D3 60

#---------------------------------------------
# SYSTRAYBAR
#---------------------------------------------
systray = 1
systray_padding = 2 2 2
systray_background_id = 5
systray_sort = ascending

#---------------------------------------------
# CLOCK
#---------------------------------------------
time1_format = %H:%M
time1_font = sans 8
time2_format = %d %b
time2_font = sans 8
clock_font_color = #D3D3D3 60
clock_padding = 2 2
clock_background_id = 5
clock_tooltip = %A %d %B %Y (s%V)
clock_lclick_command = calcoo
clock_rclick_command = orage

#---------------------------------------------
# BATTERY
#---------------------------------------------
battery = 0
battery_low_status = 7
battery_low_cmd = notify-send "battery low"
bat1_font = sans 8
bat2_font = sans 8
battery_font_color = #D3D3D3 60
battery_padding = 2 2
battery_background_id = 4

#---------------------------------------------
# MOUSE ACTION ON TASK
#---------------------------------------------
mouse_middle = none
mouse_right = close
mouse_scroll_up = toggle
mouse_scroll_down = iconify

#11 Re: Artwork & Screenshots » May 2012 Screenshot Thread » 2012-05-09 00:06:26

@tartan You, sir, have a very odd monitor resolution.

#12 Re: Off Topic / General Chat » How old are you? Where are you from? » 2012-05-08 23:06:23

17, north east US.

I hope to bring the mean age down a small bit.

#13 Re: Tips, Tricks & Scripts » Image upload script with thumbnails, BBCode, other features » 2012-05-08 10:20:47

xaos52 wrote:

Thanks for posting this, ConnorCG.

I have just one gripe with it for the moment:
storing a username and password in the clear in a script is a nogo security-wise.

I assume storing the user name alone isn't a big deal, right? I updated it to use getpass() to prompt for a password each run. If you want the same for user name, let me know (though I'm sure you can handle it yourself).

#14 Tips, Tricks & Scripts » Image upload script with thumbnails, BBCode, other features » 2012-05-07 06:35:13

ConnorCG
Replies: 3

I was putting this little simple script together for myself to teach myself some Python, and because I knew it'd be useful to me, and thought it might be helpful for some of you guys too. At the moment it is really messy, a bit clunky, and maybe a bit unusable, but hey! it works.

If you're like me, you have a VPS, web hosting server, whatever it may be, that you have an FTP account on, and can link files to. I realize this may apply to a small number of you, but you all have computers possible of all this, and routers, dyndns make it easy to set up. Anyway. Image upload sites are good, but few offer a feature many on this forum like, which is thumbnail generation for linking images on here. They can also be a bit of a pain if you just want to quickly IM a friend a link to a picture or screenshot that is on your computer. Basically this script should take care of that for you.

This tool is run from the command line, and has the following switches. Not all can be run at the same time, use common sense here. I have yet to include any sort of option conflict errors or error resolution, so if you notice something didn't work right, check your options. For example, -a and -i can't be run at the same time. -t (thumbnail generation) requires imagemagick.

Options:

  -h, --help            show this help message and exit
  -s SOURCE, --source=SOURCE
                        File to upload
  -d DEST, --dest=DEST  Destination folder on remote host
  -i, --image           Type is image
  -a, --allothers       Type is anything other than image
  -o, --orig            Keep original filename on upload
  -n NAME, --name=NAME  File name to set on server
  -t, --thum            Generate thumbnail for images
  -b, --board           Generate forum (board) code

-s: Required, specifies the file to upload

-i, -a: Files can go to different places depending on the type you specify with these, defaults to -a

-d: Override both -i and -a to upload to custom location, may be broken.

-o, -n: Random 8 character names will be generated for files by default, these override this.

-b: This tool will output the link to whatever you have uploaded for easy copying. This formats the output in BB code for forum sharing.

-t: Generates a thumbnail image and uploads this as well, works well with -b, probably horribly broken if used with non-images, requires imagemagick.


Some examples:
BBCode, regular file, original name: ./cgupload.py -baos file.txt
QGLYhmbs_thumb.png

BBCode, image, thumbnail: ./cgupload.py -bits images/image.png
sVnrM8E6_thumb.png


Settings:

server = ""        # server = "server.com"
user =    ""        # user = "someuser"
port = 21        # port = 21 - leave default usually
baseURL = ""    # baseURL = "http://server.com/"
imgDir = ""        # imgDir = "web/files/images/"
othersDir = ""    # othersDir = "web/files/allfiles/"
imgURL = ""        # imgURL = "files/images/"
othersURL = ""    # othersURL = "files/allfiles/"

server, user, port: FTP server info. You will be prompted for password when running the script.
baseURL: Base server URL for web access, usually the same as the server address
imgDir, othersDir: Directories, relative to FTP login location, that files will be uploaded to. Make sure these exist currently.
ImgURL, othersURL: Where images will be linked to, relative to baseURL

My Setup:
baseURL = "http://connorcg.com/"
imgDir = "web/f/i/"
othersDir = "web/f/a"
imgURL = "f/i/"
othersURL = "f/a/"

Download Link

#!/usr/bin/python
import os
import optparse
import string
import random
import shutil
import ftplib
import getpass
import warnings
with warnings.catch_warnings():
    warnings.filterwarnings(action='ignore', category=DeprecationWarning)

# ---YOUR OPTIONS---
server = ""        # server = "server.com"
user =    ""        # user = "someuser"
port = 21        # port = 21 - leave default usually
baseURL = ""    # baseURL = "http://server.com/"
imgDir = ""        # imgDir = "web/files/images/"
othersDir = ""    # othersDir = "web/files/allfiles/"
imgURL = ""        # imgURL = "files/images/"
othersURL = ""    # othersURL = "files/allfiles/"
# ---End---

# ---Options Parser Help/Config---
from optparse import OptionParser
parser = OptionParser(usage="%prog <-s source> <-i | -a> [options]")
parser.add_option("-s", "--source",
    action="store", type="string", default="null",
    help="File to upload")
parser.add_option("-d", "--dest",
    action="store", type="string", dest="dest", default="null",
    help="Destination folder on remote host")
parser.add_option("-i", "--image", 
    action="store_true", default=False,
    help="Type is image")
parser.add_option("-a", "--allothers", 
    action="store_true", default=False,
    help="Type is anything other than image")
parser.add_option("-o", "--orig",
    action="store_true", default=False,
    help="Keep original filename on upload")
parser.add_option("-n", "--name",
    action="store", type="string", dest="name", default=False,
    help="File name to set on server")    
parser.add_option("-t", "--thum", 
    action="store_true", default=False,
    help="Generate thumbnail for images")
parser.add_option("-b", "--board", 
    action="store_true", default=False,
    help="Generate forum (board) code")
parser.add_option("-q", "--quiet",
    action="store_false", dest="verbose", default=True,
    help="Don't print status messages to stdout")
(options, args) = parser.parse_args()
# ---End---

# ---Error Handling---
# I need to expand this later. Use common sense for now, please.
if options.image and options.allothers:
    parser.error("options -i and -a are mutually exclusive")
if options.source == "null":
    parser.error("'-s source' option is needed")
# ---End---

# ---Set File Name---
if options.name:
    sourceName = options.name
elif options.orig: 
    sourceName = options.source.split('/')
    sourceName = sourceName[len(sourceName) - 1]
else:
    sourceExt = options.source.split('.')
    sourceExt = sourceExt[len(sourceExt) - 1]
    sourceName = ''.join(random.sample('abcdefghijklqmnopqrstuvwxyzABCDEFGHIJKLQMNOPQRSTUVWXYZ0123456789',8)) + '.' + sourceExt
sourceNameBase = sourceName.split('.')
sourceNameBase = sourceNameBase[len(sourceNameBase) - 2]
if options.thum:
    sourceNameThumb = sourceNameBase + "_thumb" + '.' + sourceExt
# ---End---

# ---Set Remote Destination---
if options.dest:
    remoteDest = options.dest
if options.dest == 'null':
    remoteDest = othersDir
if options.image:
    remoteDest = imgDir
if options.allothers:
    remoteDest = othersDir
# ---End---

# ---Copy File To tmp For Handling---
print "Copying file(s) to /tmp/upload/ \r"

if not os.path.exists("/tmp/upload/"):
    os.makedirs("/tmp/upload/")
tmpSourceBase = '/tmp/upload/'
tmpSource = '/tmp/upload/' + sourceName
shutil.copy2(options.source, tmpSource)
if options.thum:
    print "Generating thumbnail image..."
    tmpSourceThumb = tmpSourceBase + sourceNameThumb
    os.system("convert " + tmpSource + " -resize @30000 " + tmpSourceThumb)
# ---End---

password = getpass.getpass(prompt="FTP Password: ")
ftp = ftplib.FTP()
ftp.connect(server, port)
ftp.login(user, password)
ftp.cwd(remoteDest)
f = open(tmpSource, 'rb')
ftp.storbinary('STOR ' + sourceName, f)
if options.thum:
    f = open(tmpSourceThumb, 'rb')
    ftp.storbinary('STOR ' + sourceNameThumb, f)        
f.close()
ftp.quit()
# ---End---

    
# ---Cleanup---
print "Cleaning up"
if os.path.exists("/tmp/upload/"):
    shutil.rmtree("/tmp/upload")
print "Done \n"
# ---End-
    
# ---Clipboard and URL Handling---
if options.allothers:
    fullURL = baseURL + othersURL + sourceName
    if options.board:
        clipboard = "[url='" + fullURL + "']link text[/url]"
    else:
        clipboard = fullURL

if options.image:
    fullURL = baseURL + imgURL + sourceName
    thumbURL = baseURL + imgURL + sourceNameBase + '_thumb' + '.' + sourceExt
    if options.board:
        if options.thum:
            clipboard = "[url='" + fullURL + "'][img]" + thumbURL + "[/img][/url]"
        else:
            clipboard = "[url='" + fullURL + "'][img]" + fullURL + "[/img][/url]"
    else:
        clipboard = fullURL

print clipboard
#fileName = '/tmp/upload/' + sourceNameBase + '.clip'
#file = open(fileName, "w")
#file.writelines(clipboard)
#file.close()
#os.system("geany -i " + fileName)
# ---End---

#15 Re: Artwork & Screenshots » May 2012 Screenshot Thread » 2012-05-07 03:40:04

Everything is still a work in progress, as I am very new to #! and the community. Hope you guys like my current setup.

JJiAT0Zi_thumb.png

#16 Re: Artwork & Screenshots » May 2012 Screenshot Thread » 2012-05-04 06:57:37

Waldorf with a bit of custom tint2 and Conky. I am currently working on a python script that uploads images (and other files) to my web server. I wrote in a bunch of command line switches, so I can make this do a bunch of different things for myself.

One of those things is to take image.png, create image_thumb.png, then upload both to the server, and output BB code for me to just paste in.

I am very new to python (and programming in general), plus it's 3AM right now, but I think it's pretty damn nice.

0kaVd7Qd_thumb.png

#17 Re: Artwork & Screenshots » May 2012 Screenshot Thread » 2012-05-03 04:42:24

Currently messing with the new #! testing release. I need to play more with tint2 and Conky. I also need to make myself a nice background.

Edit: Removed for now.

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo