1

(1,418 replies, posted in Tips, Tricks & Scripts)

@pvsage, yep that worked! I'd tried escaping before, and didn't work, but back then I think I was using execi not execpi, that must have been why.

Thanks :-) Now I can setup my scripts with all their glory.

About asian fonts, not sure...
override utf8 locale yes http://i.imgur.com/cSIEV.png
override utf8 locale no  http://i.imgur.com/vydtj.png

My conky is that black bar at the top of VLC.
Note that the font used in the conky and the VLC statusbar is the same.


edit:
oh, sector11, thing is my script could need different colors in each place, like
BLUE nickname /BLUE message
RED battery low /RED      YELLOW 50% /YELLOW      GREEN 100% /GREEN
BLUE Playing: /BLUE vlc_song_title

Etc, etc, so I needed to be able to pass from bash script itself.

2

(1,418 replies, posted in Tips, Tricks & Scripts)

Still having no luck with passing conky variables from bash to conky.
In bash:
echo "$color4 Irssi Notification $color"
In conky:
${execpi 10 conkyStatus irssi}
Result:
Irssi Notiffication (in the default color, NOT color4)

Even worse is if I want a font, then no words show up at all.
In bash:
echo "${font Droid Serif:size=10}$color4  Irssi Notification $color$font"
In conky:
${execpi 10 conkyStatus irssi}
Result:
(nothing, the Irssi Notification doesn't show at all)


One other question, how come conky doesn't display asian characters, but my font supports them?
I've tried Segoe UI, Droid Sans, Droid Fallback among others. They support asian characters because I see them on my programs.

I have:
xftfont Segoe UI:size=9 (but I've tried other fonts, like I said)
I've tried with and without override_utf8_locale yes (setting to no is worse, instead of just squares I get weird stuff)

3

(1,418 replies, posted in Tips, Tricks & Scripts)

Trying out execpi right now, will see how it goes smile

echo `date +"%A   %B %Y •  %H:%M"`

Yeah, like I said, for some reason it doesn't print the extra spaces, like it would in a terminal.

edit:
So, for spacing, I'm using an em-space for now. (The blank one here: http://www.reddit.com/r/Favors/comments … e/c0zrw1u)

4

(1,418 replies, posted in Tips, Tricks & Scripts)

@ mr peachy
I need my conky to update every 1s, but I don't want my whole conky to update every 1s.
I could use $execi but you can't nest the variables inside of it AFAIK.

If I were to use just conky, I'd do something like..

(global update interval = 1s)

Update every 5 seconds, and ... if mpd playing echo title
else cpu%
endif

Update every 10 seconds, and ... if irssi running echo number of highlights + last notification
else do something else (not sure what yet, will come up with something)
endif

Update every 60 seconds, and ... if power unplugged show battery %
endif

Doesn't seem possible to do in conky, that is, nesting those things inside an $execi
Hence why I made a script, so I can control what gets updated and how often.

5

(1,418 replies, posted in Tips, Tricks & Scripts)

Image example, see the conky panel at the top of the screen
http://dl.dropbox.com/u/302729/2012%20M … op2%29.png
http://dl.dropbox.com/u/302729/2012%20M … op1%29.png



Could someone help me with my conky script?

1::
In my bash script, how can I pass this:
${font DejaVu Sans:bold:size=10}$color1♫$color$font
in the same line as echo sonata info ?
So the end result in conky would be: ♫ Song Title

2::
If you run my conky, you'll see everything I call with conkyStatus is next to each other with no spaces, for example:
♫Song Titlecpu•10.4%
How can I make it so there is a space between the music note and the song title, and the song title and the cpu?
Like so: ♫ Song Title   cpu• 10.4%
I don't want this hard coded in conky, it should be in the script.

3::
Similarly, in my date command, I'd like 2 extra spaces between Wednesday and March. Currently there is only one space.
So it should be: Wednesday (3 spaces) March 2012 • 13:56

When I run the date command in my terminal, with extra spaces where I want them, it comes out right, but in conky it comes out with just one space.

Thank you for your help. I'm just learning :-)

#!/bin/bash
# Usage:
# conkyStatus cpu/mpd/irssi/etc/etc

if [ "$1" == "cpu" ] ; then
    echo `ps aux|awk 'NR > 0 { s +=$3 }; END {print "cpu•", s,"%"}'`
elif [ "$1" ==  "mpd" ]; then
    echo `sonata info | grep Title | sed 's/^.......//'`
elif [ "$1" == "irssi" ] ; then
    echo "Irssi highlight not available."
elif [ "$1" == "battery" ] ; then
    acpi=$(LC_ALL=C acpi -b 2>/dev/null)
    [ -z "$acpi" ] && echo "[|]" && exit
    batt=${acpi#* * * }
    batt=${batt%%, *}
    batt=${batt%%%}
    case $acpi in
      *Discharging*)
        if [ $batt -lt 10 ]; then
            battwarning="LOW BATTERY"
        fi
        batt="($batt%)"
        ;;
      *)
        batt="$batt%"
        ;;
    esac
    echo "$battwarning$batt"
elif [ "$1" == "date" ] ; then
    echo `date +"%A"  `date +"%B %Y •  %H:%M"`
else
    echo " "
fi

And here's my conky:

color1 0085FF    # Dark blue
color2 A7C9F1    # Pastel blue
color3 BDE654   # Pastel green

##################################################
background yes
use_xft yes
xftfont Droid Sans:size=8.5
override_utf8_locale yes
default_color EBEBF4
xftalpha 1
total_run_times 0
update_interval 1
text_buffer_size 2048
own_window yes
own_window_transparent no
own_window_color 1C1C1C
own_window_argb_visual yes
own_window_argb_value 165
own_window_type desktop
own_window_hints undecorate,below,sticky,skip_taskbar,skip_pager
minimum_size 1400 15
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
alignment top_left
gap_x 0
gap_y 0 
mpd_port elebenty one


TEXT
${execi 5 conkyStatus mpd}${execi 5 conkyStatus cpu}
$alignc${font Corbel:bold:size=10}$color1${voffset -12}λ  $color$font}\
${exec xprop -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5) _NET_WM_NAME | sed 's/.*"\(.*\)"[^"]*$/\1/' }\
$alignr${offset -20}${execi 10 conkyStatus date }

Hello all, when I installed, I  set up:
/
/boot
/home
/ntfs-partition

As you can see there's no swap.
Now I changed my mind and I'd like to make /boot part of / , AND use that partition for Swap.  but how do I go about that? Can I just:

Login from liveCD
Mount both  / and /boot
Copy stuff from /boot to / 
unmount /boot
format /boot as swap
Fix /boot and swap-partition in fstab
Give / the boot flag
Update grub.

Also, the partition that will become Swap is a 16 GB partition. Is this OK, or will the fact that it is so large cause problems?


Will that work? I'm afraid of messing it up tongue Thank you and happy new year to you smile

7

(1,839 replies, posted in Tips, Tricks & Scripts)

Is it possible to make conky "break" flow, then move to the right?

conky starts here |  jobs      |   to-do      |  agenda
calendar          |            |   this       |  1cvghjb
1 2 3 4 5         |  firefox   |   and that   |  2yjhbkjnj
6 7 8 9 10        |  gedit     |   this       |  3uygbhjkhk
                  |  sonata    |   and that   |  4vbhjbnjknmlk
weather           |  rsync     |              |  5hgtfvb
rainy             |            |              |  
stormy            |            |              | conky ends here

So I don't have to run 4 (or 5) separate conkys

Also....
How may I center this calendar? -_-

${execi 600 cal | awk 'NR>1' | sed -e 's/   /    /g' -e 's/[^ ] /& /g' -e 's/..*/  & /' -e 's/ \('`date | awk '{print $3}'`'\) /\['`date | awk '{print $3}'`'\]/'}

if I put alignc at the beginning, only the 1st line gets centered

After your Geany idea, I came up with:
gnome-search-tool, and searched all files that have '/home/eris//' on it. 
Then I selected all, right click,  opened in Gedit, then used the plugin 'advanced find' to replace in all documets.
Tedius, but atleast it was easy, and no need for regex.

Thanks for the idea :-)

I want to search all my plain-text files (configs)  for /home/eris/ and replace it with /home/wish/
I've tried sed/awk , Regexxer, SearchMonkey. These are WAY too complicated for me, and yes, I have read the man and tutorial pages many, many times, in fact, for atleast 2-3 years.

Somehow, I ended up with /home/eris// (yes, double slash!) So
1) I need to revert this to /home/eris/
2) I need to change it to /home/wish/

Thanks in advance for your help.

10

(2,564 replies, posted in Tips, Tricks & Scripts)

http://ompldr.org/tN29nMA http://ompldr.org/tN29neg

color1  ADD8E6  # powder blue
# http://en.wikipedia.org/wiki/Web_colors#X11_color_names
##################################################3
background yes
color white
use_xft yes
xftfont Corbel:size=10
xftalpha 1
total_run_times 0
update_interval 5
text_buffer_size 1024
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorate,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 275 900
maximum_width 275
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
alignment top_right
gap_x 5
gap_y 30

TEXT
    ${font Corbel:bold:size=16}${time %I:%M}${font}${font Corbel:bold:size=14}/${font}${utime %I:%M}${font consolas:size=8.5} utc${font}
    ${font Corbel:bold:size=12.5}${time %a  %d %b  %Y}${font}
${font Consolas:size=8.5}${execi 600 cal | awk 'NR>1' | sed -e 's/   /    /g' -e 's/[^ ] /& /g' -e 's/..*/  & /' -e 's/ \('`date | awk '{print $3}'`'\) /\['`date | awk '{print $3}'`'\]/'}${font}${color}
${font conkyweather:size=28}${color1}${execi 2024  sed -n '5p' /home/eris/.conky/conky_weather/weather1}${font} ${offset 17}${voffset -30}${color1}Today:${color}
${offset 60}${execi 2024 sed -n '2p' ~/.conky/conky_weather/weather1 | cut -c 1-21}
${offset 60}${execi 2024 sed -n '2p' ~/.conky/conky_weather/weather1| sed 's/^.\{20\}//g'}
${font conkyweather:size=28}${color1}${execi 2024  sed -n '6p' /home/eris/.conky/conky_weather/weather1}${font} ${offset 17}${voffset -30}${color1}Tomorrow:${color}
${offset 60}${execi 2024 sed -n '3p' ~/.conky/conky_weather/weather1 | cut -c 1-20}
${offset 60}${execi 2024 sed -n '3p' ~/.conky/conky_weather/weather1| sed 's/^.\{20\}//g'}

${color1}${hr}${color}
CPU              ${cpu cpu1}%  |  ${cpu cpu2}% 
TEMP          ${execi 300 /usr/bin/sensors | grep [+] | cut -d"+" -f2 | cut -d"(" -f1 }
RAM            $mem

${color1}NAME $alignr           CPU    MEM          PID${color}${font Consolas:size=9}
${top name 1} $alignr${top cpu 1}${top mem 1}  ${top pid 1}
${top name 2} $alignr${top cpu 2}${top mem 2}  ${top pid 2}
${top name 3} $alignr${top cpu 3}${top mem 3}  ${top pid 3}
${top name 4} $alignr${top cpu 4}${top mem 4}  ${top pid 4}${font}

11

(254 replies, posted in Tips, Tricks & Scripts)

http://ompldr.org/tN29nMA http://ompldr.org/tN29neg

#---------------------------------------------
# TINT2 CONFIG FILE
#---------------------------------------------
# For more information about tint2, see:
# http://code.google.com/p/tint2/wiki/Welcome
#
# For more config file examples, see:
# http://crunchbanglinux.org/forums/topic/3232/my-tint2-config/

# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #282828 0
border_color = #333333 0

# ID 2 - task active
rounded = 1
border_width = 0
background_color = #F4F4F4 35

# ID 3 - task
rounded = 1
border_width = 0
background_color = #282828 0
border_color = #282828 0

# ID 4
rounded = 1
border_width = 1
background_color = #888888 0
border_color = #ED2323 60

# ID 5 - taskbar
rounded = 2
border_width = 0
background_color = #282828 0
border_color = #282828 0

# ID 6 - active taskbar
rounded = 2
border_width = 0
background_color = #222222 0
border_color = #222222 80

# ID 7 - tooltip
rounded = 3
border_width = 0
background_color = #222222 0
border_color = #222222 90

# ID 8
rounded = 1
border_width = 1
background_color = #888888 0
border_color = #888888 20

# Panel
panel_monitor = all
panel_position = top center horizontal
panel_items = TSC
panel_size = 100% 16
panel_margin = 0 0
panel_padding = 0 0
panel_dock = 0
wm_menu = 1
panel_layer = top
panel_background_id = 1

# Panel Autohide
autohide = 0
autohide_show_timeout = 0.3
autohide_hide_timeout = 1.5
autohide_height = 6
strut_policy = follow_size

# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 0 0 0 
taskbar_background_id = 5
taskbar_active_background_id = 6
taskbar_name = 0
taskbar_name_background_id = 0
taskbar_name_active_background_id = 0
taskbar_name_font = Corbel 1
taskbar_name_font_color = #ffffff 100
taskbar_name_active_font_color = #d8d8d8 100

# Tasks
urgent_nb_of_blink = 20
task_icon = 1
task_text = 1
task_centered = 0
task_padding = 2 2
task_background_id = 3
task_active_background_id = 2
task_urgent_background_id = 4
task_iconified_background_id = 3

# Task Icons
task_icon_asb = 90 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 90 0 0

# Fonts
task_font = Corbel 10
task_font_color = #f4f4f4 75
task_active_font_color = #000000 100
task_urgent_font_color = #FFFFFF 100
task_iconified_font_color = #f4f4f4 75
font_shadow = 0

# Launcher
launcher_padding = 8 4 4
launcher_background_id = 0
launcher_icon_size = 14
# Specify icon theme names with launcher_icon_theme. 
# if you have an XSETTINGS manager running (like xfsettingsd), tint2 will follow your current theme.
launcher_icon_theme = gnome-colors-statler
# Each launcher_item_app must be a full path to a .desktop file
launcher_item_app = /usr/share/applications/terminator.desktop
launcher_item_app = /usr/share/applications/xfce4-file-manager.desktop
launcher_item_app = /usr/share/applications/gedit.desktop
launcher_item_app = /usr/share/applications/iceweasel.desktop

# System Tray
systray = 1
systray_padding = 2 2 2
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 14
systray_icon_asb = 100 0 0

# Clock
time1_format = %H:%M
time1_font = Corbel 10
clock_font_color = #d8d8d8 100
clock_padding = 4 4
clock_background_id = 0
clock_lclick_command = xdotool key super+d
clock_rclick_command = xdotool key super+space

# Tooltips
tooltip = 1
tooltip_padding = 2 2
tooltip_show_timeout = 0.0
tooltip_hide_timeout = 0.0
tooltip_background_id = 7
tooltip_font_color = #d8d8d8 100
tooltip_font = Corbel 10

# Mouse
mouse_middle = close
mouse_right = toggle
mouse_scroll_up = toggle
mouse_scroll_down = iconify

# Battery
battery = 1
battery_low_status = 20
battery_low_cmd = notify-send "battery low"
battery_hide = 96
bat1_font = Sans 10
bat2_font = Sans 8
battery_font_color = #FFFFFF 100
battery_padding = 2 0
battery_background_id = 0

# End of config

Woohoo! *squee!*  that's perfect!  Found how to exclude a subfolder, next, find out how to delete files that don't exist at the source anymore.
Thanks!

Yes, I've read that before, but I don't know how to script (and yes, I've tried to learn how to)

Ok, I'm sick of researching and researching and reading and reading and installing programs and then uninstalling programs.
I can't seem to find the backup tool that  I'm looking for!

I want:
* Just copy files as folders/files, so I can just browse the backup with Thunar
* I'm just backing up /home and /etc  into /backup
* Backup only new and changed files, so my computer isn't unusable for 2 hours everyday as files are copied :P
* Automatically clean up deleted files (that is, if the file doesn't exist anymore, then I don't want a backup of it either. So I don't end up with a huge mess of files I don't need)
* Backup at a set time every day

I definately don't want:
* Compression 
* Encription 

Doesn't matter if it's GUI or console, though I'm no command line pro  :)
Thanks in advance!

What does this do?

16

(527 replies, posted in Artwork & Screenshots)

First colorful one!
http://ompldr.org/tN29nMA http://ompldr.org/tN29neg
Fluffy cotton candy *gag*  Not sure HOW this happened...

tint
conky

17

(1,839 replies, posted in Tips, Tricks & Scripts)

Eugh!
I've had so much trouble with conky calendars lately, all brooooked, this one with the [ ] is the only one that's worked.
(though the same conkys work fine in another machine!)

I'm going to put up with the  [ ] and call it good smile

18

(1,839 replies, posted in Tips, Tricks & Scripts)

Does this qualify as conky help? tongue

I found this calendar script (BJK@archlinux)

${execi 300 cal | awk 'NR>1' | sed -e 's/   /    /g' -e 's/[^ ] /& /g' -e 's/..*/  & /' -e 's/ \('`date | awk '{print $3}'`'\) /\['`date | awk '{print $3}'`'\]/'}

it shows the current day as [ day ]
but instead, I want it as ${color2}day{$color}
that is: I want the day as a different colors, with NO brackets! tried replacing the \[ and \] with  \$\{color2\}  and \$\{color\} but that didn't work.

19

(1,839 replies, posted in Tips, Tricks & Scripts)

mrpeachy wrote:

something like this

${if_match ${time %w}==0}${color white}${else}${color red}${endif}Sunday:${color red}what to do
${if_match ${time %w}==1}${color white}${else}${color red}${endif}Monday:${color red}what to do
${if_match ${time %w}==2}${color white}${else}${color red}${endif}Tuesday:${color red}what to do
${if_match ${time %w}==3}${color white}${else}${color red}${endif}Wednesday:${color red}what to do
${if_match ${time %w}==4}${color white}${else}${color red}${endif}Thursday:${color red}what to do
${if_match ${time %w}==5}${color white}${else}${color red}${endif}Friday:${color red}what to do
${if_match ${time %w}==6}${color white}${else}${color red}${endif}Saturday:${color red}what to do

time %w retuns numbers 0 to 6, 0=sunday, 6 = saturday

Indeed, that worked quite well! Thanks a lot, I get crossed eyes whenever I try to read manual/help pages. 
(You'd think after 10+ years of linux, I'd be able to figure this out)

20

(1,839 replies, posted in Tips, Tricks & Scripts)

I have a conky agenda like this:
Sunday:  eat cookie leftovers
Monday: make cookies
Monday: eat cookies
Tuesday: eat more cookies


Is there a way to make conky highlight the current day?
I know I can do ${color2}day of week${color} but I don't want to change it everyday :-)

The "Mic" bar doesn't toggle when you hit space, only the "Capture" does

I got a new headset Tuesday, and I plugged it in my computer.
I can hear music, but the microphone doesn't work.

Out of frustration, I took this headset, and plugged into my old laptop, which also runs Statler (though I haven't done any updates/upgrades on it, lately).
I was surprised that it worked on skype right away, really nice and clear sound.

It's just a simple green + pink analog jack headset (green is output, pink is input). Just like my old headset! So I'm not sure what the problem is.
I copied the mixer settings from the old computer, but it didn't do anything. Ah, I think there's a difference, the old computer has a option, something like:
Mic: [_] Front Mic 
        [x] Mic
This laptop doesn't have this option in the mixer.



What can I do to make this microphone work?
Alsamixer:
http://ompldr.org/vN2thaQ
Skype:
http://ompldr.org/vN2thag
Not quite sure what to do anymore, it seems I've tried every single option! I put the bars up and down, turned things on and off, picked different options...

xsendcode seems to work real nice, strangely enough, when I alt-tab from my game to firefox, then back to my game, the key isn't held down anymore. So then I have to xsendkey again. It's no big problem though, I'm just happy it works :-)

thanks for the help :-D

What key do you need locked?
Doesn't really matter, any key not used during writing, so how about... Num-lock?
I already use Caps-lock for something else.

And for my own curiosity, Why ?
A game I use let's me a key to "show other players", but I must hold the key every time I want to do that. 
I want it showing all the time, without having to push a key all the time.

You can always crazy glue it down,lol
Ha.
I was told how to to it with Auto Hot Key but I don't use Windows.

There's a key that I want held down non-stop, but I don't want to physically hold it down.
Is that possible with a bash script or some such?

How can I do that in Linux?  I'm thinking:
1) Script holds down a key   2) I start that script in a terminal   3) when I want it to stop, I kill the script.

Does this sound right? What would I put for the script?  It's all waaaaaaaay over my head :-p
Thanks in advance for your help  :)