1 Comment

systemd transfer… Done!



Well, after being throughly put off, I dived into systemd and have done a complete (pure) systemd installation; and I can tell you, I think its pretty nice.

I had no plans to change Arch’s initialization system, but I needed to switch to systemd because parts of GNOME 3 require it. Its been a long time a coming but systemd is a good thing for Linux, a real good thing. Arch’s init system was legendary. It’s what I believed what attracted a lot of people about Arch. Being so pulled to for me was it’s basic, straight-forward setup, so I wasn’t exactly excited about having to switch to systemd. systemd setup isn’t quite as easy as Arch’s rc system but I like it and found it has good logic. The best thing about systemd though will be its unification between other distros. This means that setting up a good number of programs will be similar no matter what distribution documentation is read. Also systemd will save a good amount of developers time as many of the distribution-based init scripts will no longer have to be specifically written (and will rather be included in the application). Plus it inclusion of D-BUS makes it a good deal more powerful.

Here’s what it looks like. It’s not quite as nice looking as Arch’s, but oh well:

systemd is the future… yeeeaaahh! A more unified Linux front.

A basic detail of my systemd install can be found on my GNOME 3 Setup page. Even better to read the whole page on the wiki which is really well done.

5 Comments

Disk and Memory Usage Scripts

At times I like to check my levels of disk and memory usage and it’s more convenient for me to do it from the command line. So, I created a couple scripts for them:

devtop 
 Filesystem      Size  Used Avail Use% Mounted on
 /dev/sda5       9.8G  6.4G  2.9G  69% /
 /dev/sda6       166G   38G  121G  24% /home
memtop 
 PROGRAM                   %MEM    #MEM
 firefox                   10.2    352.98 MB
 gnome-shell               4.1     141.76 MB
 Xorg                      1.5     53.60 MB
 nautilus                  1.2     41.52 MB
 gedit                     1.1     40.59 MB
 gnome-settings-           0.7     26.23 MB
 gnome-terminal            0.6     22.31 MB
 nm-applet                 0.6     21.30 MB
 python2                   0.6     20.89 MB

Saves me a lot of time over having to open a program :).

Leave a comment

Convert Videos to PSP



I’m a TED video junkie. I always have videos on my PSP ready to watch. I also like to put YouTube videos on there. I did this enough that I created a script for it that makes putting videos on my PSP real easy:

 pspvidconv <d*> <video(s)> - Convert videos to PSP (d to use directory)

The PSP allows use of a single-depth directory. The directory option (when using d flag) will ask if the user wants to create a new directory, if the answer is no, it will present the existing ones.

Warning: Currently h264 encoding isn’t working. The PSP will report that it is an unknown codec, so mp3g4-xvid is the only option with ffmpeg.

h264enc

Because I’ve found that options and settings change frequently with encoding tools, it is better to have an expert be able to handle them (otherwise, I will spend more time looking options up again). A good program to use is h264enc. It’s a shell script (perl, I believe) and well done; not good for many files as all settings will have to be re-entered but does a good job.

Handbrake

For Handbrake GUI I found this post. I have yet to find any handbrake-cli lines that work.

5 Comments

GNOME 3 Setup



I’d been fortunate lately to have time to work on my GNOME 3 setup and I got it working and looking pretty good; so… I thought I’d share it from beginning to end. GNOME 3 is shaping up real nice and with the extension support provides great customibility. There’s still a little work that needs to be done, but I am nearly 100% happy with it. Any thoughts, additions, comments, would be appreciated.

A couple notes to explain some of my design reasoning: I have a laptop so a few things apply just to that; I use my pacman/aurhelper script to install so here it will be viewed as ‘pm i‘ instead of say ‘pacman -S‘ (for example); finally to install all programs at once and then configure them, the all-as-one command is at the bottom.

Clean

Dirty

Table of Contents

Security General
General
Bootloader (GRUB2)
Initialization System
Hardware
Desktop Environment
Security Firefox
Preferences
Under the hood
Program Setups
Other Programs
Install all as one
ToDo

Security General

Install firewall, edit config, add to startup daemons:

pm i arno-iptables
sudo rc.d start arno-iptables-firewall

Create dummies for insecure webkit (libwebkit and libwebkit3).

Block problem packages:

sudo sed -i "/^IgnorePkg/ a libwebkit3 libwebkit qtwebkit flashplugin" /etc/pacman.conf

General

Update pacman mirrors to best available with script.

Update System (initilize pacman first):

pm y && pm i pacman
sudo pacman-key --init; pacman-key --populate archlinux
pm u

Bootloader (GRUB2)

mv /boot/grub /boot/grub-legacy
dd if=/dev/sda of=/boot/grub-legacy/grub-mbr bs=512 count=63
pm i grub2-bios
sudo grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --no-floppy --recheck --debug /dev/sda
sudo grub-mkconfig -o /boot/grub/grub.cfg

Add Windows menu entry:

pm i ntfs-3g  # Then mount partition
sudo grub-probe --target=fs_uuid /run/media/todd/Windows/bootmgr
echo '
menuentry "Windows" --class windows {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --no-floppy --set=root C8BC2300BC22E8A0
ntldr /bootmgr
}' | sudo tee -a /etc/grub.d/40_custom

Hibernation define partition, add resume hook to /etc/mkinitcpio.conf:

sudo sed -i 's|^GRUB_CMDLINE_LINUX=""|GRUB_CMDLINE_LINUX="resume=/dev/sda7"|' /etc/default/grub
sudo sed -i '/^HOOKS/ s/ filesystems / resume filesystems /' /etc/mkinitcpio.conf

GRUB2 Arch Linux Theme:

pm i grub2-theme-archxion
sudo cp -r /usr/share/grub/themes/Archxion /boot/grub/themes/
GRUB_THEME="/boot/grub/themes/Archxion/theme.txt" to /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo mkinitcpio -p linux

Initialization System

Replace Arch’s init system with systemd (required by GNOME).

Pure systemd install:

pm i systemd systemd-arch-units systemd-ui-git
sudo gpasswd -a todd adm #For admin work with systemd

Define to bootloader (in /etc/default/grub):

GRUB_CMDLINE_LINUX_DEFAULT=" and remove quiet. GRUB_CMDLINE_LINUX="resume=/dev/sda7"

sudo grub-mkconfig -o /boot/grub/grub.cfg

Necessary settings:

echo "aspire" | sudo tee /etc/hostname
echo 'America/New_York' | sudo tee /etc/timezone
echo 'KEYMAP=us
FONT=lat9w-16
FONT_MAP=8859-1_to_uni' | sudo tee /etc/vconsole.conf
echo 'LANG=en_US.UTF-8
LC_COLLATE=C' | sudo tee /etc/locale.conf
echo '# Load card reader module
sdhci' | sudo tee /etc/modules-load.d/sdhci.conf
echo '# Set Radeon graphic card to dynamic power method
w /sys/class/drm/card0/device/power_method - - - - dynpm
w /sys/class/drm/card1/device/power_method - - - - dynpm' | sudo tee /etc/tmpfiles.d/radeon_power-method.conf

Enable units (i.e. daemons, services…; Arno’s iptables firewall service):

sudo systemctl enable arno-iptables-firewall.service avahi-daemon.service cups.service dbus.service dcron.service dnsmasq.service gdm.service gpm.service NetworkManager.service syslog-ng.service

Remove Arch init system:

pm r systemd-arch-units initscripts sysvinit
pm i systemd systemd-sysvcompat
sudo reboot

Hardware

Hardware-specific settings.

CPU

AMD processor firmware update:

pm i amd-ucode

Graphic Card

Set Radeon video card to dynamic power save method on resume:

echo '#!/bin/sh
# Set Radeon graphic card to dynamic power method

case "$1" in
  resume | thaw )
echo dynpm > /sys/class/drm/card0/device/power_method
echo dynpm > /sys/class/drm/card1/device/power_method
;;
esac' | sudo tee /etc/pm/sleep.d/97_radeon_dyn_power_method
sudo chmod +x /etc/pm/sleep.d/97_radeon_dyn_power_method

Printer

Canon Linux Info (Select Product > Linux)

pm i cnijfilter-mg5200 scangearmp-mg5200 cups-bjnp

Had to add manually to CUPS:

Address: bjnp://192.168.1.80
Name: Canon_Pixma_MG5220
Network: Home Network

Add static IP to router and direct to printer MAC address.

Sound

Install ALSA tools, set sound level:

pm i alsa-utils
alsamixer
alsactl store

Set default sound card.

Wireless

Only proprietay driver available at this time for Broadcom chip BCM43227. Reported that open source brcmsmac/brcmfmac will supported in the future.

pm i broadcom-wl
sudo modprobe wl
sudo depmod -a
sudo sed -i '/^MODULES/ s/)/ wl)/' /etc/rc.conf

Desktop Environment

Install desktop (Xorg server, ATI/AMD Radeon driver, and GNOME):

pm i xorg-server xorg-xinit xorg-server-utils
pm i xf86-video-ati
pm i gnome          # Choose apps
pm i gnome-extra

Ubuntu fonts:

pm i cairo-ubuntu

Security Firefox

Put Firefox in a sandbox:

pm i sandfox firefox gksu
sudo chmod ugo-wx ~/.adobe ~/.macromedia
sudo sed -i 's_^hide=/home/\\$user/.adobe.*$_bindro=/home/\\$user/.adobe      # bind folder read-only_g' /usr/bin/sandfox
sudo sed -i 's_^hide=/home/\\$user/.macromedia.*$_bindro=/home/\\$user/.macromedia # bind folder read-only_g' /usr/bin/sandfox
IgnnorePkg sandfox in pacman.conf
cp /usr/share/applications/firefox.desktop ~/.local/share/applications/firefox-sandfox.desktop ~/.local/share/applications/firefox-sandfox.desktop
chmod +x ~/.local/share/applications/firefox-sandfox.desktop

Change Exec line in firefox-sandfox.desktop to:

gksudo –disable-grab “sandfox –profile firefox firefox”

Remove previous sandboxes on boot:

echo '[Unit]
Description=Remove Sandfox previous sandboxes

[Service]
Type=oneshot
ExecStart=/bin/sh -c "sandfox --user todd --closeall && /bin/rm -rf /mnt/sandfox/*"

[Install]
WantedBy=multi-user.target' | sudo tee /etc/systemd/system/sandfox-rm.service
sudo systemctl enable sandfox-rm.service

Preferences

Display

Add ICC profile to ~/.local/share/icc so recognized by GNOME’s System Settings > Color (done through QuickGamma through Windows 7, Windows 7 calibrated ICC proviles are not recognized. Windows 7 profiles are stored in 32).

Fix for improper display size detection and to set brightness.

Laptop Specific

Touchpad (System Settings > Mouse and Touchpad):

  • Uncheck: Enable mouse clicks with touchpad (uncheck)
  • Check: Two-finger scrolling
  • Change scroll speed

Desktop Settings

Install advanced settings editor ():

pm i gnome-tweak-tool
  • In Advanced Settings in menu: Enable desktop icons and right-click menu, hide Home folder, Computer, and Trash icons; or, from command line:
    gsettings set org.gnome.desktop.background show-desktop-icons true
    gsettings set org.gnome.nautilus.desktop   home-icon-visible false
    gsettings set org.gnome.nautilus.desktop   computer-icon-visible false
    gsettings set org.gnome.nautilus.desktop   trash-icon-visible false
  • Add maximize and minimize buttons
    gsettings set org.gnome.shell.overrides button-layout close,minimize,maximize:

Date and Time (GNOME to handle NTP), enable in System Settings > Date and Time > Network Time > On; set clock to AM/PM.

Nautilus single click: Nautilus > Edit > Preferences > Behavior >

Save Desktop Session: (Options tab > Automatically remember…)

gnome-session-properties

Suspend preferences (via command line):

  • Power button press suspend type
  • Battery suspend type
  • Battery lid-close suspend type
  • Battery duration until suspend
  • AC lid-close suspend type
  • AC duration until suspend
  • Dim Screen for AC
  • Dim Screen time
  • Disable lock when resuming from sleep
gsettings set org.gnome.settings-daemon.plugins.power button-power hibernate
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type hibernate
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action hibernate
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1740
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action suspend
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 10800
gsettings set org.gnome.settings-daemon.plugins.power idle-dim-ac true
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 1200
gsettings set org.gnome.desktop.lockdown disable-lock-screen true

Shortcuts: (System settings > Keyboard > Shortcuts)

  • Suspend (Add in Custom Shortcuts > + then assign key Ctrl+Alt+S), uses pwr script):
    /home/todd/.scripts/pwr s
  • Blank Screen (Add in Custom Shortcuts > + then assign key Ctrl+Alt+B), uses pwr script):
    /home/todd/.scripts/pwr b
  • Show Desktop (Navigation > Hide all… > Ctrl+Alt+D)

Defualt Screenshot directory as Desktop:

gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/todd/Desktop

Numlock on when GDM starts:

pm i numlockx
sudo sed -i 's|^exit 0.*$|# Enable numlock\nif [ -x /usr/bin/numlockx ]; then /usr/bin/numlockx on; fi\n\nexit 0|' /etc/gdm/Init/Default

Graceful Shutdown of non-session supported Gnome window applications (doesn’t work for all applications):

sudo sed -i 's|^exit 0.*$|# Exit these GNOME non-session-supported windows gracefully on logout\necho " Closing selected windows programs gracefully"\nexport DISPLAY=:0\nsu todd -c "wmctrl -c "Mozilla Firefox""\nsu todd -c "wmctrl -c "Geany""\n\nexit 0|' /etc/gdm/PostSession/Default

Login Noise:

~/.local/share/sounds/desktop-login.wav

Gnome Shell Extensions:

Extensions in the AUR:

pm i \
gnome-shell-extension-alternate-tab-git
gnome-shell-extension-alternative-status-menu-git \
gnome-shell-extension-axe-menu \
gnome-shell-extension-common-git \
gnome-shell-extension-drive-menu-git \
gnome-shell-extension-extended-volume-indicator-git \
gnome-shell-extension-inhibit-suspend-git \
gnome-shell-extension-move-clock \
gnome-shell-extension-noa11y \
gnome-shell-extension-user-theme-git \
gnome-shell-extension-weather-git \
gnome-shell-extension-windowoverlay-icons-git \
gnome-shell-google-calendar-xat59-git

From website:

Extension Settings

weather:

gsettings set org.gnome.shell.extensions.weather woeid USTN0454
gsettings set org.gnome.shell.extensions.weather unit fahrenheit
gsettings set org.gnome.shell.extensions.weather wind-speed-unit mph
gsettings set org.gnome.shell.extensions.weather show-sunrise-sunset true
gsettings set org.gnome.shell.extensions.weather use-symbolic-icons true

GNOME shell google calendar:

su -c "/usr/share/gnome-shell-google-calendar/gnome-shell-google-calendar.py toddrpartridge@gmail.com $(cat /home/todd/.sitepass-com.txt)" todd
cp /usr/share/gnome-shell-google-calendar/gnome-shell-google-calendar.desktop ~/.config/autostart/
gsettings set org.gnome.desktop.default-applications.office.calendar exec "firefox 'https://www.google.com/calendar'"

Axe Menu Custom Applications Menu icon:

sudo cp ~/Designs/arch-legacy-blue1-toon-symbolic-01.svg /usr/share/icons/Faience/places/scalable/start-here-archlinux-toon-symbolic.svg

CPUFreq Control (none exist, gnome-shell-cpufreq is per processor) using jupiter instead:

pm i jupiter rfkill
sudo gpasswd -a todd jupiter

Under the hood

Cron (dcron because I know it).

Root settings:

sudo mv /root/.bashrc{,.bck}
sudo ln -s ~/.{bashrc,bash_profile,vimrc,vim} /root
sudo mkdir /root/.config/
sudo cp -r ~/.config/geany/ /root/.config/
sudo rm -rf /root/.config/geany/geany_socket*

Match filesystem check times multiple partitions:

sudo tune2fs -c 33 -C 0 -i 6m -T now /dev/sda5
sudo tune2fs -c 33 -C 0 -i 6m -T now /dev/sda6

SMART

pm i gsmartcontrol
sudo sed -i 's/^DEVICESCAN.*$/DEVICESCAN -a -n standby,q -m toddrpartridge@gmail.com -M test/' /etc/smartd.conf
pm i msmtp-mta msmtp
sudo ln -s ~/.msmtprc /root/
sed -i "s|^password.*$|password $(cat ~/.sitepass-com.txt)|" ~/.msmtprc
sudo systemctl enable smartd.service
sudo systemctl start  smartd.service

Escalate privileges for certain programs (link).

Filter Advertisements (Ad-blocker script).

Discover the package a command belongs to on the command line (bash-completion broke):

pm i pkgfile-git
  • Add to .bashrc:
    source /usr/share/doc/pkgfile/command-not-found.bash

Program Setups

Gedit

Open (Edit > Preferences > Tab):

View: Display right margin at column 80: Check
Highlight current line
Editor: Tab width: 2
Insert space instead of tabs Check
Create a backup copy of files before saving Uncheck
Autosave file every 10 minutes Check
Font&C: Theme Oblivion
Plugin: Save Session

Gnome Terminal:

General: Terminal Bell > uncheck
Use custom default terminal size: 80 x 24
Colors: Use colors from system theme > uncheck
Text color: #D4CFD3
Background color: #2E3436
Built-in schemes: Tango
Scrolling: Scrollback > 1024

Other Programs

General:

pm i abiword acpi ario aspell-en bc cd-discid curl dnsmasq dos2unix dosfstools gcolor2 geany-git geany-plugins-git gedit-plugins gimp gnumeric gpart gparted grilo-plugins gstreamer0.10-bad-plugins gstreamer0.10-ffmpeg gstreamer0.10-ugly-plugins hardinfo hwinfo id3v2 imagemagick inkscape iotop irssi lame libdvdcss libdvdnav libdvdread librsvg links lsof meld mesa-demos minidlna mlocate mp3gain mpd mplayer2 msmtp mtools nautilus-open-terminal networkmanager-dispatcher-ntpd ntp ntfsprogs openjdk6 openssh oneshot p7zip pacman-color perl-html-parser perl-rename pwgen python-libxml rsync ruby sdcv shotwell tidyhtml transmission-gtk ttf-google-webfonts ttf-microsoft-consolas tree unrar vlc xclip xorg-xdpyinfo

CVS systems keep around:

pm e bzr cmake git intltool mercurial subversion

General, AUR programs:

pm i arachnophilia aurup g9led geany-themes-git gist-git gnome-gmail mailnot-git mp3diags pacaur pastebinit perl-mp3-tag ripit

Themes:

pm i atolm-gtk3 cheser-icon-theme elementary-gtk-theme elementary-icons-bzr elements-theme faenza-icon-theme faience-icon-theme gnome-shell-theme-atolm gnome-shell-theme-default-mod gnome-shell-theme-london-smoke gtk-theme-grayday gtk-theme-hope mediterraneannight-theme orion-gtk-theme sammy-themes youtube-viewer zukitwo-themes

dnsmasq

dnsmasq for faster DNS queries:

sudo sed -i 's:^#listen-address=:listen-address=127.0.0.1:' /etc/dnsmasq.conf
sudo sed -i 's:^#bind-interfaces:#bind-interfaces:' /etc/dnsmasq.conf
echo '#!/bin/bash
# Prepend localhost to resolv.conf for dnsmasq
if [[ ! $(grep 127.0.0.1 /etc/resolv.conf) ]]; then
  sed -i "0,/^nameserver/inameserver 127.0.0.1" /etc/resolv.conf
fi' | sudo tee /etc/NetworkManager/dispatcher.d/localhost-prepend
sudo chmod +x /etc/NetworkManager/dispatcher.d/localhost-prepend

Mouse (G9)

Setup

Geany (use nightly repository)

  echo -e '\n[geany]
Server = http://geany.nightlybuilds.org/archlinux/x86_64' | sudo tee -a /etc/pacman.conf
  pm y
  pm i geany-git geany-plugins-git geany-themes

Configure

Gnome Gmail (Gmail as default mail app)

Enable: Applications > Internet > Gnome Gmail System Settings > Details > Default Applications, Mail

MiniDLNA

Setup

MPD

Setup

Vim

cp /etc/vimrc /etc/vimrc.bak
cp /usr/share/vim/vim73/vimrc_example.vim /etc/vimrc

VLC

Set as default:

System Settings > Details > Removable Media > DVD Video : VLC media player

System Settings > Details > Default Applications > Video: VLC media player

Use /dev/sr0 instead of /dev/dvd in ~/.config/vlc/vlcrc.

Set mimetypes:

cp /usr/share/applications/vlc.desktop ~/.local/share/applications/
sed -i 's|^Mimetype.*$|MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;application/ogg;application/x-ogg;application/x-matroska;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-scpls;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/vnd.rn-realmedia;audio/x-real-audio;audio/x-pn-realaudio;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;video/vnd.rn-realvideo;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;video/mp4;video/mp4v-es;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;|' ~/.local/share/applications/vlc.desktop
chmod +x ~/.local/share/applications/vlc.desktop

Install all as one:

Install Java independently as not recognized as a dependency:

pm i jre7-openjdk # Needed as not recognized as dependency

Keep Version Control Systems (VCS) around:

pm e bzr cmake git intltool mercurial subversion
pm i alsa-utils gksu grub2-bios grub2-theme-archxion ntfs-3g systemd systemd-sysvcompat sandfox firefox cnijfilter-mg5200 scangearmp-mg5200 cups-bjnp gnome-tweak-tool numlockx pkgtools wmctrl \
arachnophilia aurup g9led gist-git gnome-gmail mailnot-git mp3diags pastebinit perl-mp3-tag ripit  \
abiword acpi ario aspell-en bc cd-discid curl dnsmasq dos2unix dosfstools gcolor2 geany-git geany-plugins-git geany-themes-git gedit-plugins gimp gnumeric gpart gparted grilo-plugins gstreamer0.10-bad-plugins gstreamer0.10-ffmpeg gstreamer0.10-ugly-plugins hardinfo hwinfo id3v2 imagemagick inkscape iotop irssi lame libdvdcss libdvdnav libdvdread librsvg links lsof meld mesa-demos minidlna mlocate mp3gain mpd msmtp mtools nautilus-open-terminal networkmanager-dispatcher-ntpd ntp ntfsprogs openssh oneshot p7zip pacaur pacman-color perl-html-parser perl-rename pwgen python-libxml rsync ruby sdcv shotwell tidyhtml transmission-gtk ttf-microsoft-consolas tree unrar vlc xclip xorg-xdpyinfo \
atolm-gtk3 cheser-icon-theme elementary-gtk-theme elementary-icons-bzr elements-theme faenza-icon-theme faience-icon-theme gnome-shell-theme-atolm gnome-shell-theme-default-mod gnome-shell-theme-london-smoke gtk-theme-grayday gtk-theme-hope mediterraneannight-theme orion-gtk-theme sammy-themes youtube-viewer zukitwo-themes \
gnome-shell-extension-alternate-tab-git gnome-shell-extension-alternative-status-menu-git gnome-shell-extension-axe-menu gnome-shell-extension-common-git gnome-shell-extension-drive-menu-git gnome-shell-extension-extended-volume-indicator-git gnome-shell-extension-inhibit-suspend-git gnome-shell-extension-move-clock gnome-shell-extension-noa11y gnome-shell-extension-user-theme-git gnome-shell-extension-weather-git gnome-shell-extension-windowoverlay-icons-git gnome-shell-google-calendar-xat59-git

ToDo

  • No GNOME extension for: gmail; printer; cpufreq control, color picker
  • Try Extensions: Shell OSD, Remove bottom panel, Notification button top bar
  • cronie
  • CPUFreq Control, laptop mode tools
  • Expand sda5?
  • Does ripit work?, abcde
  • XDGDIRS
  • for i in *.svg; do ln -s pwd / i $pwd/{16,22,24,32,48,64}/; done
  • Resize svg
  • gtkpod
  • gnome-globalmenu-git globalmenu-extension
  • gnash lightspark
  • libreoffice
  • mplayer 1.1?
  • Spyder3pro and dispcalgui
  • How to add dynamic address for printer? Printer does have listed: Printer Name and Bonjour service.
Leave a comment

Markdown to WordPress Format

When I discovered MarkDown I was in love, it was very nice to discover an easy, clean, well-thought-out markup language. I wanted a way to be able take my detailed notes, have them easy to read, and then to be able post them here on the blog that would be in a nice WordPress format. Yesterday, I wrote about discovering pandoc which enables a person to write in markdown and have it converted to HTML. To be able to use the HTML code created by pandoc in WordPress it needed to be slightly edited and cleaned up. Therefore,… I created a bash script for it.

Example conversion from MarkDown format to WordPress format

It works pretty good. Basically it removes tags for paragraphs (<p>), cleans up code blocks, improves formating, as well as doing a few other things. I haven’t gone through all permutations that pandoc conversion can do so a few thing swill be left out, but otherwise it should work for most things. If anything needs to be added please let me know.

1 Comment

Pandoc-flavored markdown: Perfect!

I’d been looking for a way to convert my notes to webpages. Typically I wrote my notes in .txt form and then went through them and added links, formatting… when I was ready to blog them. Recently, I had asked StackOverflow if I could convert MediaWiki format to HTML. I’m an Administrator for the Arch Wiki so I’m very familiar writing this format. This is when I learned about pandoc. Pandoc’s author describes pandoc as, “If you need to convert files from one markup format into another, pandoc is your swiss-army knife…“.

Plain Text Example

I planned to write my notes in mediawiki format and then convert to HTML, however I’d been using StackOverflow lately and started to learn Markdown Prose and really like it. Markdown’s is designed to be easy to write and read: “Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)“. Markdown is so easy to write that it makes sense that sites like StackOverflow and GitHub are using it.

Markdown, Markup Languange

Pandoc has extended markdown to use code blocks ```, tables, and a few other things and converting is very basic:

pandoc file.md -o file.htm

I’m in love, I’m in love, I’m in love :), as it will save me a good bit of time in editing/creating Documentation. Tomorrow, I’ll post a bash script to clean up the HTML to be able to put it in a WordPress Blog.

Leave a comment

Gmail Icons

Warning: I got the base design from a Google+ website. I’m not sure if these are tradmarked logos and if Google in that case if they will have a problem with them. If they do, they will be removed.

I was hoping to use this for a Gmail notification icon but it didn’t turn out that way. I saw the Gmail icon but I couldn’t find it in scalable form, so I rebuilt it. Turned out pretty good. It’s under the CC license so be free to use it, however if you like to use it in a program please ask me and give attribution. Download.

Gmail (Red)

Gmail (Blue)

Gmail (Grayscale)

Gmail – Unread (Symbolic)

Gmail – Read (Symbolic)

Follow

Get every new post delivered to your Inbox.

Join 52 other followers