Category Archives: Configuration

Firefox: Defining font type and size

roystonlodge_Alternate_Mozilla_Browser_Icon

What a professional typesetter knows is the importance of a good font. For centuries typesetters have evolved fonts to provide ease of reading that we know today. Having the text look good in the web browser is a nice bonus; choosing the right type and size can make a big difference to how well we read, especially if used quite a bit.

Font installation

To make a web page feel right — as the designer had in mind — the fonts should be on your system that a page requires. On some Linux systems, only the basic fonts are installed. Installing missing fonts usually adds nice touches that may have not been realized before. To help discover missing fonts, the Context Font add-on will display font type and size of a selected font. Many sites define their fonts as Arial, or sometimes, Verdana, or Georgia; these fonts can be added by installing Microsoft’s core fonts; a few define theirs with Apple fonts, and a few less with others. These font packages contain the most popular fonts (for Arch Linux):

arpa -i otf-bitter otf-exo ttf-bitstream-vera ttf-dejavu ttf-inconsolata ttf-lato ttf-liberation ttf-mac-fonts ttf-opensans ttf-win7-fonts

Font size

To get a good idea on good font size to use, look at a book. The size there that feels comfortable will likely feel comfortable on the monitor too. When choosing font size also think about making the various typefaces the same size (i.e. serif, sans-serif, and monospace).

Font type

Being able to define one’s own font can help readability quite a bit; however,keep in mind, tastes differ. In Firefox, the settings that can be defined are generic typefaces of: serif, sans-serif, and monospace (additionaly, the minimum font size can be set). It should be known though, that many sites still force a specific font type and size; however, gradually, a greater number of sites are using generic typeface definitions. In the future this means that personalizing fonts will be of greater availability. When choosing a font type, keep in mind to pick one that helps improve readability rather than one that grabs ones attention.

Font tests

Here is a basic test of what Firefox’s base-defined font types and sizes look like (click to view):

Font test: Type and size (based defined). (click to view)

Font test: Type and size (based defined).

Here are what a few of the common font groups look like (click to view):

Font test: Common webfonts group 1. (click to view)

Font test: Common webfonts group 1.

Font test: Common webfonts group 2. (click to view)

Font test: Common webfonts group 2.

What did I choose?

After adding all the new fonts and testing them, I found out I like a varied group; they read beautifully and scale good. Ultimately I came up with these:

Typeface Font Size
Serif Bitter 13
Sans-serif Open Sans 13
Monospace DejaVu Sans Mono 12
Minimum 10

DejaVu Sans Mono and Open Sans are good fonts and, for me, hard to beat. Rather than just define them in Firefox, I prefer to define my serif, sans-serif, and monospace fonts system-wide. This allows me to have a consistent overall look to me desktop. Here is my Fontconfig configuration (note: fonts are listed preferential/available first): fonts.conf.

For GNOME the fonts sizes are:

Setting Font
Window Titles Cantarell Bold 11
Interface Cantarell 11
Documents Cantarell 11
Monospace Monospace 10

What they look like:

Font type and size.

Font type and size.

Common webfont groups 1

Common webfont groups 1

Desktop

Desktop

Related

External monitor as Discrete

I use my laptop primarly at home with an external monitor as discrete, meaning that I have the laptop monitor turned off and I only use it. At times this is also called a dedicated monitor. GNOME can be set to disable the laptop monitor and enable the external but it wasn’t able to hotplug the monitor after I returned the laptop, and at times wouldn’t do so after resuming from sleep. Also in the proccess I discovered that the X.org server DPI setting wasn’t being done correctly and that GNOME’s text scaling needed to be adjusted. So I decided to do it in a script and it turned out to be pretty easy.

I wrote the basic script that toggles monitors depending if the external monitor is present, then it detects correct physical size dimension of the screen so the the correct DPI can be set. After this, I added a startup script (.desktop file), a pm-utils script to runafter resuming, and a udev script to detect andset the monitor when plugged in. The udev rule is generic but appears to be working for a lot of people, it relys on Kernel Mode setting (KMS) so doesn’t work for me wiht the catalyst driver, but every thing else works great. I put it on github for any who like to look at it.

The bash script cannot be used right away instead a couple bit will need to be directed:

 The package cannot be installed directly and be expected to work, some edits
 will need to be made.  First, in the resume script '80_discretemon' a username 
 will need to be defined; next, the monitor names will need to be defined as
 created by the driver in 'discretemon'.

Also, the monitors can be defined in xorg.conf but the fix for after resume from sleep, remains.

Section "Monitor"
  Identifier  "0-LVDS"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName"  "Acer Aspire Laptop Screen"
  Option      "DPMS" "true"
  Option      "TargetRefresh" "60"
  Option      "Position" "0 0"
  Option      "Rotate" "normal"
  Option      "Disable" "true"
  DisplaySize  344 194 # only works with xrandr disabled.

EndSection

Section "Monitor"
  Identifier  "0-DFP1"
  Option      "VendorName" "ATI Proprietary Driver"
  Option      "ModelName"  "Samsung SyncMaster SA350"
  Option      "DPMS" "true"
  Option      "PreferredMode" "1920x1080"
  Option      "TargetRefresh" "60"
  Option      "Position" "0 0"
  Option      "Rotate" "normal"
  Option      "Disable" "false"
  DisplaySize  476 268 # only works with xrandr disabled.
  Option      "DPI" "102 x 102"
EndSection

Catalyst Driver, a Journey Taken… Better than I’d Known

I previously read about (a good number of times) people not having the best experiences with AMD’s proprietary driver. However, with my new laptop I decided that no matter how much I love the open-source driver (bought it because AMD opened the specs to it), that realistically it would take a few years before I’d be able to play games with it. The AMD/ATI website says 7xxxM series is supported so I decided to try it.

Prepare for Installing Catalyst

Removed open-source Radeon driver options, commented /etc/X11/xorg.conf.d/20-radeon.conf.

Installing Catalyst Driver

Using Vi0l0’s excellent catalyst repository, I added it to /etc/pacman.conf:

[catalyst] Server = http://catalyst.apocalypsus.net/repo/catalyst/$arch

Add Vi0l0 key:

sudo pacman-key -r          NUM
sudo pacman-key --lsign-key NUM

Installed (using pacman shortcuts script (pm):

pm y
pm i linux-headers catalyst-hook catalyst-utils lib32-catalyst-utils

Using catalyst-hook here to have the module put into initramfs when kernel versions areupgraded (provides catalyst driver).

X.org Server-Configuration

sudo aticonfig --initial 

Added module to load at boot:

echo '# Load AMD Catalyst driver
fglrx' | sudo tee /etc/modules-load.d/fglrx.conf

Disabled Mode Setting: Added GRUB_CMDLINE_LINUX="nomodeset" (for GRUB2) to /etc/default/grub), then:

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

Testing

Reboot, and driver loaded properly (lsmod | grep fglrx), and direct rendering is enabled (glxinfo | grep direct).

Configuring Display

Created root .desktop for ATI Catylyst Control Center:

cp /usr/share/applications/amdcccle.desktop ~/.local/share/applications/
sed -i 's/Exec=amdcccle/Exec=gksudo amdcccle/' ~/.local/share/applications/amdcccle.desktop
chmod +x ~/.local/share/applications/amdcccle.desktop

Color

  • Color Temperature: Use display’s settings

Display Manager

  • Selected down arrow for both monitors to change to correct settings.

Logout/Login: Gnome 3 crash, extensions disabled
Login: Monitor settings lost, both on lower resolution (open-source radeon driver and catalyst define monitors differently so Gnome using xrandr flubs the first time after.

DTV

  • Pixel Format: RGB 4:4:4 (Full RGB)
  • Adjustments: Overscan 0%

Switchable Graphics

Catalyst driver does not recognize discrete GPU properly, thinks integrated GPU is discrete GPU:

Show GPUs:

aticonfig --list-adapters
* 0. 00:01.0 AMD Radeon HD 6520G          # * Default
  1. 01:00.0 AMD Radeon HD 7600M Series

But…:

aticonfig --px-list
PowerXpress: Discrete GPU is active (High-Performance mode).

I tried using sudo aticonfig --px-igpu to switch to integrated to see if it would switch but got an X.org server hang. Also tried sudo aticonfig --px-dgpu to see if aticonfig --px-list was in error but no luck. Tried using discrete GPU BusID (BusID "PCI:1:0:0") in xorg.conf but that didn’t work either. The catalyst driver doesn’t properly recognize the 7670M GPU as discrete GPU. Entered bug.

GNOME bug

When I first started with GNOME mouse clicks would miss at times and sometimes keypresses did too, I added export CLUTTER_VBLANK=none to ~/.bash_profile and it fixed this. Oddly, I commented it later because I thought it might be related to another bug (it was not) and forgot to enable it again, but I haven’t seen the problem since.

Conclusion

Hard to believe there is not official AMD Catalyst bugzilla (odd how their website points to the unofficial one) so I’m a bit worried about the near future but think all will be fine.

The driver works good. I’m getting a consistent 50fps on Urban Terror and tried Doom and it looks pretty good. Disappointed about not being able to use the discrete GPU, would have been nice. Gonna keep using catalyst, its working good.

Here’s a script i built called gpuswitch I plan to use when gaming later. Night.

Resources

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.

crontab

bashrc

The ~/.bashrc is a the bash shells’ setting file. The ~/.bashrc can also be used to specify other bash shell related items like abbreviating commands and creating shortcuts. Here is my ~/.bashrc, all bells, no whistles.

DisplaySize in xorg.conf… uhgg!

Update: This turns out to be done by xrandr which the X.org server hands off to now for dynamic use of monitors. man xrandr even reports that it is trying to keepaconstant DPI. Not sure just why it is doing it, but found a good way to get it done.

I just got a new monitor to be able to use as an external monitor for my laptop. While I was setting it up I noticed that the monitors display size wasn’t correctly detected. The Xorg server does a good job auto-configuring however this caught my eye:

xdpyinfo | grep -B2 resolution
dimensions:    1920x1080 pixels (508x286 millimeters)
resolution:    96x96 dots per inch

The monitor I got is a 21.5″ monitor so I figured the DPI was off. I decided to calculate it myself (this is a square pixel monitor):

res_horz=1920
res_vert=1080
res_diag=$(echo "scale=5;sqrt($res_horz^2+$res_vert^2)" | bc)
siz_diag=21.5
siz_horz=$(echo "scale=5;($siz_diag/$res_diag)*$res_horz*25.4" | bc)
siz_vert=$(echo "scale=5;($siz_diag/$res_diag)*$res_vert*25.4" | bc)
echo "$siz_horz"x"$siz_vert"
475.48800x267.46200

Also there are online DPI Calculators conferred by doubt (1, 2,) and xrandr:

em_ds_h=$(xrandr | grep VGA-0 | rev | cut -d " " -f 3 | rev | sed 's/mm//')
em_ds_v=$(xrandr | grep VGA-0 | rev | cut -d " " -f 1 | rev | sed 's/mm//')
em_ds="$em_ds_h"x"$em_ds_v"
echo $em_ds
477x268

My discovered value and theirs are a couple millimeters off overall so I just used theirs. I created a configuration to define the display size to the the Xorg server. A basic configuration to define display size can be done like this:

cat /usr/share/X11/xorg.conf.d/90-monitor-disp-size.conf
Section "Monitor"
  Identifier "<default monitor>"
  DisplaySize 477 268
EndSection

Ubuntu uses /usr/share/X11/xorg.conf.d/ Arch Linux and some other use /etc/X11/xorg.conf.d/ (better choice I think). However this won’t work on the external monitor. So I expanded on it (more than it probably needed to be) by defining both monitors and related sections:

Section "Monitor"
  Identifier    "Internal - Pavilion Laptop"
  DisplaySize    304.5 228.6
EndSection

Section "Monitor"
  Identifier    "External - Samsung Syncmaster SA350"
  VendorName    "Samsung"
  ModelName     "SA300/SA350"
  DisplaySize    476 267.7
EndSection

Section "Device"
  Identifier    "ATI Radeon Mobility IGP 330M"
  Option        "Monitor-VGA-0"  "External - Samsung Syncmaster SA350"
  Option        "Monitor-LVDS"   "Internal - Pavilion Laptop"
EndSection

Section "Screen"
  Identifier    "Default Screen"
  Monitor       "Internal - Pavilion Laptop"
EndSection

Section "ServerLayout"
  Identifier    "Default Layout"
  Screen        "Default Screen"
EndSection

I added VendorName and ModelName but I’m not sure they uniquely define the monitor so that the Xorg server acknowledges them. The VendorName I believe is just for reference, ModelName can usually be discovered by doing:

grep "Monitor name" /var/log/Xorg.0.log

Monitor-VGA-0 and Monitor-LVDS define the ports and hence by reference should uniquely define the monitor (xrandr -q shows them and both are found in the Xorg log).

After a bit of research I discovered that there is a good amount of history concerning the Xorg server having a bit of trouble in not being able to correctly discover the display size. I believe this may be related to some drivers. I’ve been told the open-source ATI driver have had problems and read in some other places of other people who have had similar issues. Defining the display size in the configuration and telling the Xorg server not to use the auto-detected value can be done by adding this to the Devices section (for Nvidia drivers use: Option "UseEDID" "FALSE"):

 Option        "NoDDC"

Unfortunately, this didn’t work either and left me completely at a loss. Unsure how to go further to define display size in the the Xorg server configuration I decided to define it through xrandr.

xrandr has an option to define the display size with the --fbmm option:

xrandr --output VGA-0 --auto -fbmm 476x267.7

--auto uses the default/preferred mode of the monitor.

A Beautiful fstab

I know what partitions I have and like to know what is mounted and where. To do this, I keep a tidy static filesystem file (/etc/fstab).

I use labels instead of UUID’s just because they look nicer, but also because this allows me to resize them if need be. It’s hard to go wrong with UUID’s but since I know I likely won’t be putting a USB drive named ‘Windows’ or ‘Ubuntu’ in the USB port, I’m likely pretty safe. You may have noticed too that I choose not let HAL/DBUS (is it dbus that does mounting now?) handle my Windows and Storage partitions. I choose to do this for several reasons. One is because when I copy files I almost always find it much quicker from the command line (i.e. cp file1 file2 ... /mnt/Storage/backups/) rather than navigate through multiple directories in the file browser. The second reason is for security because sensitive data I don’t always want available. The third is to protect the Windows partition. If a crash were to happen, I find it a good inconvenience to have to boot Windows to be able to fix the NTFS volume.

Here it is:

# /etc/fstab: static file system information
#
# <file system>          <dir>        <type>  <options>           <dump/pass>
# Temporary file systems:
tmpfs                    /tmp         tmpfs   nodev,nosuid                0 0

# Internal hard disk (sda[2,3,5,6,7]): 
LABEL=SYSTEM\040RESERVED /mnt/SR      ntfs-3g noatime,noauto,user         0 0
LABEL=ACER               /mnt/Windows ntfs-3g noatime,noauto,user         0 0
LABEL=Arch               /            ext4    errors=remount-ro,noatime   0 1
LABEL=Home               /home        ext4    noatime                     0 2
LABEL=Swap               swap         none    defaults                    0 0

# External hard disk (sdb1)
LABEL=Backup             /mnt/Backup  ext4    noatime,noauto,user         0 3

noatime has been applied to save disk writes and unnecessary timestamps everytime the file is accessed, and the user option allows me to mount without superuser privileges. For the Windows partition to be able mounted as a regular user, the NTFS-3G driver will need to be compiled with internal FUSE support.

Firefox Tuneup

Mozilla browser.

These are moderate touchs that help Firefox functionality towards more advanced usage.

Preferences

These edits are done in the configuration page, type about:config on a new tab/window to get to it.

Save session

browser.startup.page
3

Load all tabs on program start

browser.sessionstore.restore_on_demand
false

Open new pages in tabs

middlemouse.openNewWindow
false

Load new tabs in background

browser.tabs.loadDivertedInBackground
true

Prevent accidental middle-click from opening a new tab

middlemouse.contentLoadURL
false

Enable spell-checking of all entry fields

layout.spellcheckDefault
2

Set DPI

Firefox assumes a DPI of 96 so if your monitor is different it is good to set this to get correct font sizes (the value is the ratio compared to 96 DPI: e.g. 102/96).

layout.css.devPixelsPerPx
X.X

Disable roll-over help text

browser.chrome.toolbar_tips
false

Disable preview on tab re-order

nglayout.enable_drag_images
false

Set mouse scroll speed

mousewheel.default.delta_multiplier_y
250

Define source code viewer

view_source.editor.external
true
view_source.editor.path
/usr/bin/gedit

Font type and size

Many sites define font size depended on CSS values. Using these values can be helpful in define font size: Firefox: Defining font type and size.

Add-ons

Avoid add-ons that are unnecessary; add-ons contribute to the potentiality of creating an un-stable browser experience. These add-ons give nice bonuses and have a good reputation:

  • Adblock Plus – blocks annoying buy keep unobtrusive ads.
  • Clear Fields – adds a clear text button for URL and search text entries.
  • Wired Marker – highlight text on a webpage and remember it.

References and tips

A Beginners Setup to Quake Wars

If you are just getting into Quake Wars, has a Strogg just thrown a grenade in your area and then quickly pulled out his Lacerator jumping around the corner to finish you off, all before you could say, “What the…”? Welcome to Quake Wars. Quake Wars has been around for a couple years and has some very devote followers. I almost threw out Quake Wars, discarding it as too tough and moved on. I’ve played a good bit of Urban Terror and thought I could mesh skills pretty well in QW but I couldn’t. For one, QW is a completely different game that UT. It is highly team-based and class-independent game. Second, experts there have a highly configured setups that can make your twist-left-hand stretch-forefinger setup into minchmeat. This is a guide that will get your setup somewhat on par with the experts and put you on evener ground.

ETQW is highly configurable. It literally has thousands of settings that can be changed. Thankfully we will only have to change a number of them the get on par with other players. Be of warning though that changing some settings are considered cheats and the built-in cheat system (Punkbuster) may disallow some settings. I have built a configuration that will work on just about all servers. If there are values that are not allowed by Punkbuster, Punkbuster will let you know in the chat window.

Keyboard Layout

The most important thing you can do is to build a keyboard layout where most commonly used keys are close to the fingertips. Here’s the layout I use. Green keys are at the fingertips, blue require a bit of reach, yellow are just out of reach, and red are need be.

A couple notes. Sprint toggle is the always running toggle. Sprinting is useful most of the time but makes scoping opponents and moving impossible. All keys to right are automated responses that I frequently use. 9 and 0 will respawn you in either the original spawn or the foremost spawn.

User Configuration File

Configurations are put in the users autoexec.cfg file. There won’t be one originally so you will have to create it. The autoexec.cfg file in Linux goes in the user configuration folder: ~/.etqwcl/sdnet/<playername>/base. In Vista it goes in in the users Documents\Id Software\ETQW…\sdnet\base. This file gets loaded when the user logs in. To be able to test it though it needs to be in ETQW’s global location <ETQW-config-folder>/base. Create an autoexec.cfg in the user folder and redirect to the global one:

exec global.cfg

You can name it anything you want. Once you have your global config set up you can test it from a running QW by opening console (~) and running exec global.cfg. QW will let you know of any error exist in the configuration file.

Global Configuration File

I could explain all the details of the configuration file but rather I’ll just give it to you. It has all the explanations in it plus links you need to look up an details. A couple notes: A smooth, even frames per second is critical to QW. You’ll want 30fps or 60fps without any hitching. Good graphics and great light don’t mean a thing when you’re looking to make that great hit and find yourself fighting your hardware. The config is for a nvidia 9600 GSO which at 2009 this is a medium level graphic card that handles shaders and lighting poorly, the config will reflect that. I haven’t give away all my secrets ;), but here it is:

// Contributor akau <dirk.r.gently@gmail.com>
// http://www.planetquakewars.net/Guides/Config_Guide?locale=en_US
// http://4newbies.planetwolfenstein.gamespy.com/ETQW/iffy_autoexec.php
// http://wiki.battle.no/index.php/Quake_Wars_Cvar_list - cvar listings

/// Hardware ///

// FPS 30 or 60 decision - "showcom_fps 1" to draw fps
// http://community.enemyterritory.com/forums/showthread.php?t=2042
seta com_unlockFPS 1
seta com_unlock_timingMethod 2

// Texture Quality (-2 to 2)
// Texture and Visual Quality mirror those found in Settings > Advanced
seta image_diffusePicMip "0"
seta image_bumpPicMip "0"
seta image_specularPicMip "-1"
seta image_anisotropy "0"       // (0 off, to 16 by 2^)

// Visual Quality/Performance
// Terrain Quality, Effects Level, Debris/Weather many settings
seta r_megadrawmethod "3"             // Lighting Quality   (3 low, 0 high)
seta com_lastFoliageLevel "0"         // Foliage Quality    (0 low, 2 high)
seta seta com_lastGraphicsLevel "0"   // Shader Effects     (0 low, 2 high)
seta com_lastGraphicsDetailLevel "0"  // Effects Level      (0 low, 2 high)
seta com_gpuSpec "0"                  // Shader Level       (0 low, 3 ultra)
seta r_multiSamples "0"               // Anti-Aliasing      (0,2,4,8,16,32)
seta image_filter "GL_LINEAR_MIPMAP_NEAREST" // bilinear antialiasing (faster)

seta r_swapinterval "0"         // Vsync                    (0 off, 1 on)
seta r_shadows "0"              // Shadows                  (0 off, 1 on)
seta r_softParticles "0"        // Better explosions/smoke  (0 off, 1 on)
seta r_useAlphaToCoverage "0"   // Smooth foliage           (0 off, 1 on)

// Good FPS boosts
// r_megaDrawMethod, r_shadows, r_softParticles, com_gpuSpec above
seta com_machineSpec "1"        // Processor                (0 low, 2 high)
seta g_decals "1"               // Bullet marks             (0 off, 1 on)
seta g_showPlayerShadow "0"     // Player shadows           (0 off, 1 on)
seta r_skipMegaTexture "1"      // Skip mega textures       (1 off,  0 on)
seta r_skipStuff "0"            // grass and foliage        (0 off, 1 on)

// Additional FPS boosts
seta r_skipBump "0"             // Skips rendering bumpmaps on textures
seta r_skipSpecular "1"         //
seta r_shaderQuality "2"        // Shader quality (0 high 2 low)
seta r_detailTexture "0"        // Detail level textures
seta r_detailFade "0"           // Detail level fades

seta r_useThreadedRenderer "2"  // For multiple cpus
seta com_videoRam "768"         // usually ETQW can detect video memory

// Resolution
// r_mode list:
// http://community.enemyterritory.com/forums/showpost.php?p=349547&postcount=4
seta r_mode "10"                // -1 for custom
seta r_aspectRatio "2"          // 0=4:3, 1=16:9, 2=16:10, 3=5:4 TFT, -1 custom
seta r_fullscreen "1"
//seta r_customAspectRatioV "10"
//seta r_customAspectRatioH "16"
//seta r_customHeight "900"
//seta r_customWidth "1440"
//seta cg_fov "90"              // field of view, default depends on aspect
                                // ratio.  Note: wider fov increases view depth
// seta image_lodbias "-1"      // viewable distance        (-1 high, 1 low)
// seta r_visdistmult "1.2"

// Gamma/Brightness
seta r_brightness "1.18"
seta r_gamma "1.05"

// Sound
seta s_driver "oss"             // For linux OSS
seta s_volume_dB "-10"
seta s_volumeMusic_dB "-16"
seta s_force22kH "0"            // lowering audio quality helps FPS a bit

// Network - http://ucguides.savagehelp.com/Quake3/connection.html
//seta cl_maxpackets "100"      // max packets 100 for PunkBuster bandwidth.
//seta cl_packetdup "1"         // If high PL - make 1.
//seta snaps "40"               // Leave this at 40, servers will adjust.
//seta rate 25000               // DSL/Cable best at 25,000 servers will adjust.
//seta cl_timenudge 0           // Leave at 0 for less lag and less trouble.
//seta cg_lagometer "0"         // Displays network lag

// Mouse
seta sensitivity "13.0"         // sensitivity
seta m_smooth "1"               // smooth mouse movements
seta m_pitch "0.022"            // vertical sensitivity scale
seta m_yaw "0.022"              // horizontal sensitivity scale
seta m_helicopterPitch "0.022"  // mouse/joystick no inverted when flying

// VOIP - team, global, fireteam (1 on, 0 off)
seta ui_voipReceiveTeam "1"
seta ui_voipReceiveGlobal "1"
seta ui_voipReceiveFireTeam "1"

/// General Settings ///

seta g_skipIntro "1"                  // Seen intro, doesn't work in Linux
seta com_allowconsole "1"             // For Windows tilda key
seta gui_showTooltips "0"             // Enough of the tooltips
seta g_tooltipTimeScale "0"
seta net_clientPunkbusterEnabled "1"  // Punkbuster is our friend

// Limit rolling and bobbing motions (Warning few servers may not allow this)
seta pm_crouchbob 0
seta pm_bobpitch 0
seta pm_bobup 0
seta pm_runroll 0
seta pm_runpitch 0
seta pm_runbob 0
seta pm_walkbob 0

seta in_toggleSprint "1"              // I find the run toggle useful
seta g_weaponSwitchTimeout "0"        // Quick weapon switch

seta ui_advancedFlightControls "1"    // No auto-correcting of flight controls
seta ui_drivingCameraFreelook  "1"    // Freelook on vehicles with no weapons
seta ui_rememberCameraMode "1"        // Remember vehicle camera mode

/// HUD settings ///
// http://community.enemyterritory.com/forums/showthread.php?t=14167

seta g_rotatecommandmap "0"           // No rotating command map
seta gui_showRespawnText "0"          // Unneeded respawn text (1 on, 0 off)

// Chat colors
seta g_chatDefaultColor 1 1 0 .60       // Global chat color (RGBa color) Y
g_chatTeamColor .8 .8 .8 .7             // Team chat color Gray
g_chatFireTeamColor 1 .6 .6 .7          // Fireteam chat color
seta gui_chatAlpha "0.7"                //
seta g_chatLineTimeout "12"             // Chat timeout (default 5 seconds)

//seta g_chatDefaultColor .6 .8 1 .7      // global chat color (RGBa color) B
//g_chatTeamColor 1 1 .6 .7               // team chat color Purple?
//g_chatTeamColor .94 .96 .50 .7          // team chat color
//g_chatFireTeamColor .72 .44 .44 .7      // fireteam chat color

// Less distracting waypoints, player info, mines, objectives, crosshair,
// vehicles, fraglist, commandmap, fireteam list
seta g_waypointAlphaScale "0.5"
seta g_waypointDistanceMax "3084"
seta g_waypointDistanceMin "16"
seta g_waypointSizeMax "15"
seta g_waypointSizeMin "10"

seta g_playerIconAlphaScale ".5"
seta g_playerIconSize "8"
seta g_playerArrowIconSize "5"
seta g_drawVehicleIcons "0"             // Disable the vehicle icons
seta g_friendlyColor ".8 .8 .8 .5"
seta g_enemyColor ".55 .20 .16 0.5"     // Gray red
seta g_neutralColor "0.45 .45 .45 .5"
//seta g_friendlyColor ".14 .88 .32 .5"
//seta g_enemyColor "1 .2 .21 0.5"        // Brighter-red

seta g_drawMineIcons "0"
seta g_mineTriggerWarning "0"

seta gui_objectiveListAlpha "0.4"
seta gui_objectiveStatusAlpha "0.4"

seta gui_crosshairColor "1 1 1 .70"
seta gui_crosshairSpreadScale "0"
seta gui_crosshairGrenadeAlpha "0.286585"
seta gui_crosshairStatsAlpha "0"
seta gui_crosshairSpreadAlpha "0"
seta gui_crosshairAlpha "0.7"
seta gui_crosshairKey "pin_14"
seta gui_crosshairDef "crosshairs"
//seta gui_crosshairColor "0 1 0 .70"     // Green

seta g_showVehicleCockpits "0"
seta gui_vehicleDirectionAlpha "0.5"
seta gui_vehicleAlpha "0.8"

seta gui_obitAlpha "0"                    // remove leftside kill message
seta gui_commandMapAlpha ".8"
seta gui_fireTeamAlpha "0.8"
seta gui_personalBestsAlpha ".4"           // Disabled because of bug?
seta gui_showRespawnText "0"

/// Player ///
seta ui_name "akau"
seta ui_clanTag ""
seta ui_clanTagPosition "1"

/// Keybindings ///

// Dont' unbind all unless you plan to bind every key. ETQW will just replace
// otherwise.
//unbindall

// Xbox Controller Settings
exec xboxgamepad.cfg

// Actions //

// Movement
bind "e" "_forward" "" "default"
bind "s" "_moveleft" "" "default"
bind "d" "_back" "" "default"
bind "f" "_moveright""" "default"
// Lean - lean with shift key and s and f
bind "s" "_leanleft" "shift" "default"
bind "f" "_leanright" "shift" "default"
// Crouch/Prone/Sprint/Walk
bind "shift" "_movedown" "" "default"
bind "v" "_prone" "" "default"
bind "r" "_sprint" "" "default"
bind "CTRL" "_speed" "" "default"
// Toggle sprint key behavior.
// On: move forward always sprints, Off: hold sprint key to sprint
bind "F4" "toggle in_toggleSprint"

// Weapons - melee, second, primary, grenades, gadgets (packs, cameras,
// explosives, airstrike), designators, tools (construct, revive, hack), deploy
bind "q" "_weapon0" "" "default"
bind "a" "_weapon1" "" "default"
bind "w" "_weapon2" "" "default"
bind "c" "_weapon3" "" "default"
bind "z" "_weapon5" "" "default"
bind "4" "_weapon6" "" "default"
bind "x" "useweapon weapon_tool1" "" "default"
bind "3" "useweapon weapon_tool2" "" "default"

// Reload
bind "t" "_reload" "" "default"

// Use
bind "g" "_activate" "" "default"

// Vehicle
bind "capslock" "_usevehicle" "" "default" // enter vehicle
bind w "_leanleft" "" "vehicle"            // strafe in Desecrator
bind r "_leanright" "" "vehicle"
bind "shift" "_sprint" "" "vehicle"        // use shift as vehicle boost
bind "1" "_weapon0" "" "default"           // decoys with right mouse click
bind "MOUSE2" "_weapon0" "" "vehicle"

// Fireteam Menu
bind "o" "_fireteam" "" "default"

// Type Chat - team, global, fireteam
bind "y" "clientMessageMode 1" "" "default"
bind "u" "clientMessageMode" "" "default"
bind "i" "clientMessageMode 2" "" "default"

// Automated Chat
bind "MOUSE3" "_context" "" "default"
bind "MOUSE3" "_quickchat" "shift" "default"

// VOIP - team, global, fireteam
bind "5" "_teamVoice" "" "default"
bind "6" "_Voice" "" "default"
bind "7" "_fireteamvoice" "" "default"

// Respawn
bind "h" "kill"

// Sane screenshot button
bind printscreen screenshot

// Spawn at default spawn and forward-most spawn
bind "9" "setSpawnpoint base"
bind "0" "setSpawnpoint default"

// Load configuration
bind "F9" "exec akau.cfg"

// GreasedScotsman's insta-class changes and announce
// GDF use CTRL + (1234-qw-asd-5-zx) - (ALT Strogg)
// soldier
bind "1" "clientTeam GDF; clientClass Soldier 0;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with an '^d'Assault Rifle'^7'" "CTRL" "default"
bind "2" "clientTeam GDF; clientClass Soldier 1;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with a '^d'Rocket Launcher'^7'" "CTRL" "default"
bind "3" "clientTeam GDF; clientClass Soldier 2;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with a '^d'GPMG'^7'" "CTRL" "default"
bind "4" "clientTeam GDF; clientClass Soldier 3;wait;kill;sayTeam '^7'Respawning as a'^m'Soldier'^7'with a '^d'Shotgun'^7'" "CTRL" "default"
// medic
bind "q" "clientTeam GDF; clientClass Medic 0;wait;kill;sayTeam '^7'Respawning as a'^m'Medic'^7'with an '^d'Assault Rifle'^7'" "CTRL" "default"
bind "w" "clientTeam GDF; clientClass Medic 1;wait;kill;sayTeam '^7'Respawning as a'^m'Medic'^7'with a '^d'Shotgun'^7'" "CTRL" "default"
// engineer
bind "a" "clientTeam GDF; clientClass Engineer 0;wait;kill;sayTeam '^7'Respawning as an'^m'Engineer'^7'with an '^d'Assault Rifle'^7" "CTRL" "default"
bind "s" "clientTeam GDF; clientClass Engineer 1;wait;kill;sayTeam '^7'Respawning as an'^m'Engineer'^7'with a '^d'Shotgun'^7" "CTRL" "default"
bind "d" "clientTeam GDF; clientClass Engineer 2;wait;kill;sayTeam '^7'Respawning as an'^m'Engineer'^7'with an '^d'Assault Rifle w/ Gren. Launcher'^7" "CTRL" "default"
// field-ops
bind "5" "clientTeam GDF; clientClass FieldOps 0;wait;kill;sayTeam '^7'Respawning as a '^m'Field Ops'^7'with an '^d'Assault Rifle'^7" "CTRL" "default"
// covert-ops
bind "z" "clientTeam GDF; clientClass CovertOps 0;wait;kill;sayTeam '^7'Respawning as a'^m'Covert Ops'^7'with a '^d'Scoped Assault Rifle'^7" "CTRL" "default"
bind "x" "clientTeam GDF; clientClass CovertOps 1;wait;kill;sayTeam '^7'Respawning as a'^m'Covert Ops'^7'with a '^d'Sniper Rifle'^7" "CTRL" "default"
// aggressor
bind "1" "clientTeam Strogg; clientClass Aggressor 0;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with a '^d'Lacerator'^7" "ALT" "default"
bind "2" "clientTeam Strogg; clientClass Aggressor 1;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with an '^d'Obliterator'^7" "ALT" "default"
bind "3" "clientTeam Strogg; clientClass Aggressor 2;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with a '^d'Hyperblaster'^7" "ALT" "default"
bind "4" "clientTeam Strogg; clientClass Aggressor 3;wait;kill;sayTeam '^7'Respawning as an'^m'Aggressor'^7'with a '^d'Nailgun'^7" "ALT" "default"
// technician
bind "q" "clientTeam Strogg; clientClass Technician 0;wait;kill;sayTeam '^7'Respawning as a'^m'Technician'^7'with a '^d'Lacerator'^7" "ALT" "default"
bind "w" "clientTeam Strogg; clientClass Technician 1;wait;kill;sayTeam '^7'Respawning as a'^m'Technician'^7'with a '^d'Nailgun'^7" "ALT" "default"
// constructor
bind "a" "clientTeam Strogg; clientClass Constructor 0;wait;kill;sayTeam '^7'Respawning as a'^m'Constructor'^7'with a '^d'Lacerator'^7" "ALT" "default"
bind "s" "clientTeam Strogg; clientClass Constructor 1;wait;kill;sayTeam '^7'Respawning as a'^m'Constructor'^7'with a '^d'Nailgun'^7" "ALT" "default"
bind "d" "clientTeam Strogg; clientClass Constructor 2;wait;kill;sayTeam '^7'Respawning as a'^m'Constructor'^7'with a '^d'Lacerator w/ Plasma Launcher'^7" "ALT" "default"
// oppressor
bind "5" "clientTeam Strogg; clientClass Oppressor 0;wait;kill;sayTeam '^7'Respawning as an'^m'Oppressor'^7'with a '^d'Lacerator'^7." "ALT" "default"
// infiltrator
bind "z" "clientTeam Strogg; clientClass Infiltrator 0;wait;kill;sayTeam '^7'Respawning as an'^m'Infiltrator'^7'with an'^d'Accurized Lacerator'^7" "ALT" "default"
bind "x" "clientTeam Strogg; clientClass Infiltrator 1;wait;kill;sayTeam '^7'Respawning as an'^m'Infiltrator'^7'with a'^d'Railgun'^7" "ALT" "default"

// Automated responses quick-keyed //
// http://4newbies.planetwolfenstein.gamespy.com/ETQW/vsay.php

// Global Replies / End Games
bind "HOME" "clientquickchat quickchat/global/yes" "" "default"
bind "END" "clientquickchat quickchat/global/no" "" "default"
bind "INS" "clientquickchat quickchat/global/taunts/owned" "" "default"
bind "PGUP" "clientquickchat quickchat/global/taunts/meh" "" "defaults" //broke
bind "DEL" "clientquickchat quickchat/global/cheers/goodgame" "" "default"
bind "PGDN" "clientquickchat quickchat/global/cheers/wellplayed" "" "default"

bind "UPARROW" "clientquickchat quickchat/global/hi" "" "defaults"
//bind "DOWNARROW" "clientquickchat quickchat/global/sorry" "" "defaults"
bind "LEFTARROW" "clientquickchat quickchat/global/sorry" "" "defaults"
//bind "RIGHTARROW"

// Team Replies
//bind "KP_NUMLOCK"
bind "KP_SLASH" "clientquickchat quickchat/responses/onit" "" "default"
bind "KP_STAR" "clientquickchat quickchat/responses/sorry" "" "default"
bind "KP_MINUS" "clientquickchat quickchat/responses/thanks" "" "default"
bind "KP_HOME" "clientquickchat quickchat/need/team/medic" "" "default"
bind "KP_UPARROW" "clientquickchat quickchat/need/engineer" "" "default"
bind "KP_PGUP" "clientquickchat quickchat/need/team/covertops" "" "default"
bind "KP_LEFTARROW" "clientquickchat quickchat/need/team/radar" "" "default"
bind "KP_5" "clientquickchat quickchat/need/team/apt" "" "default"
bind "KP_RIGHTARROW" "clientquickchat quickchat/need/team/avt" "" "default"
bind "KP_PLUS" "clientquickchat quickchat/need/medic" "" "default"
bind "KP_END" "clientquickchat quickchat/enemy/indisguise" "" "default"
bind "KP_DOWNARROW" "clientquickchat quickchat/enemy/deployables/aptspotted" "" "default"
bind "KP_PGDN" "clientquickchat quickchat/enemy/deployables/avtspotted" "" "default"
bind "KP_INS" "clientquickchat quickchat/commands/captureforwardspawn" "" "default"
bind "KP_DEL" "clientquickchat quickchat/self/disguise/enemydisguisedasme" "" "default"
// State Class //
bind "KP_ENTER" "clientquickchat quickchat/self/imsoldier" "" "soldier"
bind "KP_ENTER" "clientquickchat quickchat/self/immedic" "" "medic"
bind "KP_ENTER" "clientquickchat quickchat/self/imengineer" "" "engineer"
bind "KP_ENTER" "clientquickchat quickchat/self/imcovertops" "" "covertops"
bind "KP_ENTER" "clientquickchat quickchat/self/imfieldops" "" "fieldops"
bind "KP_ENTER" "clientquickchat quickchat/self/imaggressor" "" "aggressor"
bind "KP_ENTER" "clientquickchat quickchat/self/imtechnician" "" "technician"
bind "KP_ENTER" "clientquickchat quickchat/self/imconstructor" "" "constructor"
bind "KP_ENTER" "clientquickchat quickchat/self/imoppressor" "" "oppressor"
bind "KP_ENTER" "clientquickchat quickchat/self/iminfiltrator" "" "infiltrator"

Customize man page colors with ‘less’ definitions

Man pages by default use less for displaying. I’ve used vim before to for colored text in man pages but something got bjorked in an update. To have color with man pages termcap will need to be invoked. Thanks to nico for the tip.

All that needs to be done is to export bold and underline values of termcap. Adding the values to the ~/.bashrc will make sure that they are always used:

# Less Colors for Man Pages
export LESS_TERMCAP_mb=$'\E[01;31m'       # begin blinking
export LESS_TERMCAP_md=$'\E[01;38;5;74m'  # begin bold
export LESS_TERMCAP_me=$'\E[0m'           # end mode
export LESS_TERMCAP_se=$'\E[0m'           # end standout-mode
export LESS_TERMCAP_so=$'\E[38;5;246m'    # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\E[0m'           # end underline
export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline

And source the ~/.bashrc to have it work:

source ~/.bashrc

Notice I used Arch and Gentoo colors, my two favorite distros :) :

Follow

Get every new post delivered to your Inbox.

Join 52 other followers