You are currently browsing the category archive for the ‘Linux-tips’ category.

“Nepomuk has three main aspects, according to Bernard. First, there is a standard framework for annotating pieces of information so that connections can be made between them. Second, there are ontologies, the sets of “documented shared understanding” or common concepts that can be defined for particular types of information, such as bio-science or computer desktop use. Finally, there are the tools for making or using the annotations and ontologies, what Bernard calls the “workspaces that connect to other workspaces and help you in your day to day activities of collecting information, structuring it, making sense of it, and creating new information and communicating it.”

Together, these aspects will affect all levels of users. The first time you use a Nepomuk-supported desktop, the data sources you choose will be indexed, and you can add additional annotations later. At least part of Nepomuk’s functionality will be based on Lucene, the Java search engine.”

Linux.com :: Nepomuk and KDE to introduce the semantic desktop.

Fantastic concept! I’m honestly not the fan of KDE – but I will definitely try it again because of semantic desktop it will introduce together with Nepomuk!

Advertisements

…no, I did not begin to stutter 😉

I just tried once again Awesome Window Manager. And I have to admit – it’s brilliant. Awesome is a tiling Window Manager. It was based on dwm at the beginning – but now  it is rewritten and many nice features are added.

Awesome has relatively easy to understand configuration file through which you can tweak it to your liking. You can change keyboard shortcuts, colors, fonts etc. And still you can take an advantage of tiling Window Managers – that is – window manager is taking care of the placement of the desktop windows. I find it very relieving and… hm – “Zen”-like.

I used one of the first versions of Awesome in the past – and I’m glad to notice the quick development of it. Awesome is small and very quick (at least here and for me!) but in the same time it supports basic “eye-candy. With the help of xcompmgr, one can acquire shadows and if you set the background with the help of feh + configure your urxvt and xorg, you can also acquire real transparency in terminal.

Today I will just share some screen shots I made. I would also like to share some links with you, I found helpful while editing my .awesomerc. So, here it goes.

Nice introduction to Awesome especially for Arch Linux users

Interesting tread about Awesome on Ubuntu forum

and last but not least – fantastic Wiki by Awesome WM users and developers!

If you are interested in my .awesomerc – hmmm…it’s still “the work in  progress” – but, here is the link to pdf with it:

My “personal” awesomerc (for version 2.1)

My “personal” awesomerc (for version 2.2)

And here go those promised above screen shots (click on the thumbnails below to see the bigger version!):

Awesome with Minefield, transparent urxvt and conky Clean Awesome
Busy Awesome with Pidgin and transparent URXVT Beauty of tiling!

If, by a chance, you like the wallpaper – here is the link (just “click” on the picture below)

Enjoy – and Joyful, Peaceful Easter!

tami

Related post:

Awesome-git+conky in the panel

Another useful tips – especially when you like to use your Vim in command line to…nearly everything – like f.i. creating/editing text.

So here it goes:

vim-tip-window.png

Enjoy – and have a nice week,

tami 🙂

Hm – with screen shot of my .vimrc fragment:

vim-tip-2-window.png

I hope it’s readable now 😉

Shortcuts of: set paste, set number, set hlsearch, set list.

Enjoy,

tami

Replying to the comment to the post I let myself to post my .conkyrc here (with the new screenshot- LOL).

It seems that people like it. Well – I am the fan of conky, too.

I have to mention here – that the conky is originally based on the work of lyrea submitted to gnome-look.org and you can find it here:

 http://www.gnome-look.org/content/show.php/Fawn?content=58426

So here it goes:

.conkyrc

#avoid flicker
double_buffer yes

#own window to run simultanious 2 or more conkys
own_window  yes
own_window_transparent no
own_window_type normal
own_window_hints undecorate,sticky,skip_taskbar,skip_pager

#borders
draw_borders no
border_margin 1

#shades
draw_shades no

#position
gap_x 6
gap_y 6
alignment top_left

#behaviour
update_interval 1

#colour
default_color  6d6d6d

#default_shade_color 000000
own_window_colour 303030

#font
use_xft yes
xftfont proggyclean:pixelsize=11

#to prevent window from moving
use_spacer no
minimum_size 1262 0

#mpd
mpd_host localhost
mpd_port 6600

TEXT
${alignc}Kernel: ${color A0A0A0}$kernel   |  ${time %a, %d %B} ${color A0A0A0}${time  %H:%M}  |  ${color} Up: ${color A0A0A0}${uptime_short}   |   ${color}Processes: ${color A0A0A0}$processes  ${color}Running: ${color A0A0A0}$running_processes   |  ${color}Cpu: ${color A0A0A0}${cpu}%   ${color}${cpugraph 10,80 AEA08E 9F907D} ${color A0A0A0}    |   ${color }Mem: ${color A0A0A0}$mem/$memmax – $memperc% ${color} ${membar 6,80}${color A0A0A0}    |   ${color }Net: ${color A0A0A0}${font}${downspeed eth0} Kb/s(D) ${color A0A0A0}${font}${upspeed eth0} Kb/s(U)  |  ${color }Hddtemp: ${color A0A0A0}${texeci 300 ~/bin/hddt_conky.sh}°C ${color 303030}
${alignc} ${color }Root: ${color A0A0A0}${font}${fs_free_perc /}%(free)  |  ${color} Home: ${color A0A0A0}${fs_free_perc /home}%(free)   | ${color} Arch-pkg: ${color A0A0A0}${font}${texeci 1800 python ~/bin/conkypac.py}  |   ${color}Email: ${color A0A0A0}${execi 300 ~/bin/check_gmail.sh} ${color A0A0A0}   | ${color} Weather: ${color A0A0A0} ${execi 1800 ~/bin/accuweather.sh “EUR|NO|NO011|OSLO”} | ${color} Moc: ${color A0A0A0} ${execi 30 ~/bin/mocinf.sh} | ${color} Shell-fm: ${color A0A0A0} ${execi 30 cat ~/.shell-fm/now-playing} ${color 303030}

There are few scripts used here, as you can see. And here they go:

hddt_conky.sh

 #!/bin/bash
echo “$(nc localhost 7634 | cut -d’|’ -f4)”

conkypac.py (big thanks to Michal Orlik from Archlinux)

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description: Python script for notifying archlinux updates.
# Usage: Put shell script with command ‘pacman -Sy’ into /etc/cron.hourly/
# Conky: e.g. put in conky ‘${texeci 1800 python path/to/this/file}’
# Author: Michal Orlik <thror.fw@gmail.com>, sabooky <sabooky@yahoo.com>

################################################################################
# SETTINGS – main settings
# set this to True if you just want one summary line (True/False)
brief = True
# number of packages to display (0 = display all)
num_of_pkgs = 5
#show only important packages
onlyImportant = False
########################################

# OPTIONAL SETTINGS
# PACKAGE RATING – prioritize packages by rating
# pkgs will be sorted by rating. pkg rating = ratePkg + rateRepo for that pkg
# pkg (default=0, wildcards accepted)
ratePkg = {
‘kernel*’:10,
‘pacman’:9,
‘nvidia*’:8,
}
# repo (default=0, wildcards accepted)
rateRepo = {
‘core’:5,
‘extra’:4,
‘community’:3,
‘testing’:2,
‘unstable’:1,
}
# at what point is a pkg considered “important”
iThresh = 5
########################################

# OUTPUT SETINGS – configure the output format
# change width of output
width = 52
# pkg template – this is how individual pkg info is displayed (” = disabled)
# valid keywords – %(name)s, %(repo)s, %(size).2f, %(ver)s, %(rate)s
pkgTemplate = ” %(repo)s/%(name)s %(ver)s”
# important pkg tempalte – same as above but for “important” pkgs
ipkgTemplate = ” *!* %(repo)s/%(name)s %(ver)s”
# summary template – this is the summary line at the end
# valid keywords – %(numpkg)d, %(size).2f, %(inumpkg), %(isize).2f, %(pkgstring)s
summaryTemplate = ” %(numpkg)d %(pkgstring)s”
# important summary template – same as above if “important” pkgs are found
isummaryTemplate = summaryTemplate + ” (%(inumpkg)d important %(isize).2f MB)”
# pkg right column template – individual pkg right column
# valid keywords – same as pkgTemplate
pkgrightcolTemplate = “%(size).2f MB”
# important pkg right column template – same as above but for important pkgs
ipkgrightcolTemplate = pkgrightcolTemplate
# summary right column template – summay line right column
# valid keywords – same as summaryTemplate
summaryrightcolTemplate = “%(size).2f MB”
# important summary right column template – same as above if “important” pkgs are found
isummaryrightcolTemplate = summaryrightcolTemplate
# seperator before summary (” = disabled)
block = ‘-‘ * 12
# up to date msg
u2d = ‘ Your system is up-to-date’
################################################################################

import subprocess
import re

from time import sleep
from glob import glob
from fnmatch import fnmatch

program = []
pkgs = []
url = None

def runpacman():
“””runs pacman returning the popen object”””
p = subprocess.Popen([‘pacman’,’-Qu’],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
return p

def cmpPkgs(x, y):
“””Compares packages for sorting”””
if x[‘rate’]==y[‘rate’]:
return cmp(x[‘size’], y[‘size’])
else:
return x[‘rate’]-y[‘rate’]

if onlyImportant:
pkgTemplate, pkgrightcolTemplate = ”,”

p = runpacman()
#parse pacmans output
for line in p.stdout:
if re.match(‘(Cíle|Pakete|Targets|Se procesará|Cibles|Pacchetti|’
‘Celuje|Pacotes|Цели):’, line):
program = line.split()[1:]
for line in p.stdout:
if not line.strip():
break
program += line.split()

for item in program:
pkg = {}
desc_path = False
desc_paths =  glob(‘/var/lib/pacman/sync/*/%s’%item)

if not desc_path:
desc_path = desc_paths[0] + ‘/desc’

pkg[‘repo’] = desc_path.split(‘/’)[-3]
desc = open(desc_path).readlines()
checkName = 0
checkSize = 0
checkVersion = 0
for index, line in enumerate(desc):
if line==’%NAME%\n’ and checkName == 0:
pkgName = desc[index+1].strip()
pkg[‘name’] = pkgName
checkName = 1
if line==’%CSIZE%\n’ and checkSize == 0:
pkgSize = int(desc[index+1].strip())
pkg[‘size’] = pkgSize / 1024.0 / 1024
checkSize = 1
if line==’%VERSION%\n’ and checkVersion == 0:
pkgVersion = desc[index+1].strip()
pkg[‘ver’] = pkgVersion
checkVersion = 1

pkgRate = [v for x, v  in ratePkg.iteritems()
if fnmatch(pkg[‘name’], x)]
repoRate = [v for x, v in rateRepo.iteritems()
if fnmatch(pkg[‘repo’], x)]
pkg[‘rate’] = sum(pkgRate + repoRate)

pkgs.append(pkg)

# echo list of pkgs
if pkgs:
summary = {}
summary[‘numpkg’] = len(pkgs)
summary[‘size’] = sum([x[‘size’] for x in pkgs])
if summary[‘numpkg’] == 1:
summary[‘pkgstring’] = ‘package’
else:
summary[‘pkgstring’] = ‘packages’
summary[‘inumpkg’] = 0
summary[‘isize’] = 0
lines = []
pkgs.sort(cmpPkgs, reverse=True)
for pkg in pkgs:
important = False

if pkg[‘rate’] >= iThresh:
summary[‘isize’] += pkg[‘size’]
summary[‘inumpkg’] += 1
pkgString = ipkgTemplate % pkg
sizeValueString = ipkgrightcolTemplate % pkg
else:
pkgString = pkgTemplate % pkg
sizeValueString = pkgrightcolTemplate % pkg

if len(pkgString)+len(sizeValueString)>width-1:
pkgString = pkgString[:width-len(sizeValueString)-4]+’…’

line = pkgString.ljust(width – len(sizeValueString)) + sizeValueString
if line.strip():
lines.append(line)

if not brief:
if num_of_pkgs:
print ‘\n’.join(lines[:num_of_pkgs])
else:
print ‘\n’.join(lines)
if block:
print block.rjust(width)

if summary[‘inumpkg’]:
overallString = isummaryTemplate % summary
overallMBString = summaryrightcolTemplate % summary
else:
overallString = summaryTemplate % summary
overallMBString = isummaryrightcolTemplate % summary

summaryline =  overallString.ljust(width – len(overallMBString)) \
+ overallMBString
if summaryline:
print summaryline
else:
print u2d

check_gmail.sh (this one I found on Polish Debian Forum – I am sorry – I forgot the athor…)

#!/bin/bash

gmail_login=”********” #your login
gmail_password=”*********” #your password

dane=”$(wget –secure-protocol=TLSv1 –timeout=3 -t 1 -q -O – \
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \
–no-check-certificate | grep ‘fullcount’ \
| sed -e ‘s/.*<fullcount>//;s/<\/fullcount>.*//’ 2>/dev/null)”

if [ -z “$dane” ]; then
echo “Connection Error !”
else
echo “$dane new”
fi

 accuweather.sh (thanks to Archlinux forum member – Michael Seiler)

#!/bin/sh
#AccuWeather (r) RSS weather tool for conky
#
#USAGE: weather.sh <locationcode>
#
#(c) Michael Seiler 2007

METRIC=1 #Should be 0 or 1; 0 for F, 1 for C

if [ -z $1 ]; then
echo
echo “USAGE: weather.sh <locationcode>” #find the code of your city on accuweather.com – my code for Oslo is: “EUR|NO|NO011|OSLO” – and put the right one in your .conkyrc
echo
exit 0;
fi

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne ‘if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print “$1”; }’

 mocinf.sh (this one is found probably on Archlinux forum, too – but AFAIR I modified it a bit to make it working)

#!/bin/sh

TITLE=”`mocp -i | grep ‘Title:’ | sed -e ‘s/^.*: //’`”;
if [ “$TITLE” != “” ]; then
ARTIST=”`mocp -i | grep ‘Artist:’ | sed -e ‘s/^.*: //’`”;
SONGTITLE=”`mocp -i | grep ‘SongTitle:’ | sed -e ‘s/^.*: //’`”;
if [ “$ARTIST” != “” ]; then ARTIST=”$ARTIST – “; fi
echo $ARTIST $SONGTITLE
else echo „paused”
fi

…and that’s it. Feel free to use it or modify it to your heart content – and enjoy “tweaking” your Linux desktop 🙂

Screenshot1 – my desktop today(with the conky) – featuring the wallpaper of IAmFreeman from deviantart (you can find it here: http://iamfreeman.deviantart.com/):

screenshot-2008-02-16-183633.png

and Screenshot2 – the conky in itself 😉 :

conky_screen.png

Enjoy!

tami 🙂

Hello, Time :)

November 2017
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
27282930  

Archives

cc -Some rights

by Tami

Blog Stats

  • 117,363 hits