Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Wednesday, June 8, 2016

Reverting Shutdown Shortcut in Kubuntu 16.04

The updated version of KDE/Plasma in Kubuntu 16.04 changes a number of the default shortcuts compard to those in 14.04. One of the main one I'd muscle-memoried is Ctrl-Alt-Del to initiate a shutdown. There is a way to get this back in 16.04, just requires a couple of steps.

  1. Open the Global Keyboard Shortcuts dialog. Select "ksmserver" from the KDE component dropdown. Click the "Log Out" entry. Define a custom shortcut to whatever is preferred. Press Apply.
  2. Open the Desktop Session Login and Logout dialog. In the Default Leave Option section, check "Turn off computer".

Now the option to shutdown will be the default option.

Thursday, August 13, 2015

Conky With a Vengeance

Yet another little tinker update on the Conky config since the last one.

Here's the full .conkyrc. Of course blogger munges the output, so I've noted long lines with the character; there should actually be no line break on those lines:

background no
font Sans:size=8
use_xft yes
xftalpha 0.9
update_interval 5.0
total_run_times 0
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_argb_value 196
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 1200
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
border_inner_margin 5
#border_inner_margin 20
draw_graph_borders yes
default_color CDE0E7
default_shade_color black
default_outline_color green
alignment top_right
gap_x 12
gap_y 0
no_buffers yes
uppercase no # set to yes if you want all text to be in uppercase
cpu_avg_samples 2
override_utf8_locale no

TEXT
${voffset 1} ${voffset -1}

${color gray}${font Sans:size=10}${voffset 5}${time %d-%b-%Y}${font}
    ${font Sans:size=12}${voffset -5}${alignr}${time %I:%M %p}${font}

${color white}SYSTEM ${hr 1}${color}
Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
MB Temperature: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Physical id 0'|awk '{print $4}'}${iconv_stop}
CPU Temperature 0: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 0'|awk '{print $3}'}${iconv_stop}
CPU Temperature 1: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 1'|awk '{print $3}'}${iconv_stop}
CPU Temperature 2: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 2'|awk '{print $3}'}${iconv_stop}
CPU Temperature 3: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 3'|awk '{print $3}'}${iconv_stop}
Fan 1: ${alignr}${hwmon 1 fan 1} RPM
Fan 2: ${alignr}${hwmon 1 fan 2} RPM
GPU Temp: ${alignr}${exec nvidia-smi | grep '. ..\% ..C'|
    awk '{print $3}'}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg

${color yellow}CPU LOAD ${hr 1}${color}
${color b0b000}CPU Frequency: ${alignr}${freq} MHz
CPU1 ${alignr}${cpu cpu1}%
${cpubar cpu1}
${cpugraph cpu1 000000 ffffff}
CPU2 ${alignr}${cpu cpu2}%
${cpubar cpu2}
${cpugraph cpu2 000000 ffffff}
CPU3 ${alignr}${cpu cpu3}%
${cpubar cpu3}
${cpugraph cpu3 000000 ffffff}
CPU4 ${alignr}${cpu cpu4}%
${cpubar cpu4}
${cpugraph cpu4 000000 ffffff}
${color b0b040}CPU All
${cpugraph cpu0 000000 ff0000}${color}

${color 30b030}RESOURCE USAGE ${hr 1}${color}
${color 30b030}RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}
Swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}${color}

${color gray}Highest CPU $alignr CPU% MEM%${color}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}

${color gray}Highest Memory $alignr CPU% MEM%${color}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}

${color white}FILE SYSTEM ${hr 1}${color}
Root: ${alignr}${fs_used /} / ${fs_size /}
${fs_bar 4 /}
Files: ${alignr}${fs_used /files} / ${fs_size /files}
${fs_bar 4 /files}

${color white}NETWORK ${hr 1}${color}
Eth0: ${addr eth0}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}

Monday, October 27, 2014

White-on-blue Theme for Vim

If you want to make vim look like the old white-on-blue of WordPerfect (and frankly, who doesn't?), you can apply these changes to a colour file.

I started with desert.vim (usually in a directory like /usr/share/vim/vim74/colors), copied to ~/.vim/colors and made the following changes:

26,27c24 < ""hi Normal guifg=White guibg=grey20 < hi Normal guifg=grey90 guibg=#061c34 --- > hi Normal guifg=White guibg=grey20 48,49c45 < ""hi SpecialKey guifg=yellowgreen < hi SpecialKey guifg=darkblue --- > hi SpecialKey guifg=yellowgreen 73d68 < hi SpellBad guisp=darkred

There are probably more changes that could (should?) be made, but that gets the primary effect.

Saturday, October 25, 2014

Updated Conky Config

Made a few little tinkering updates to the previous conky config (thanks for the CPU graph tip JB).

Rather than try and paste the .conkyrc file in here (which is difficult to copy/paste and doesn't fit properly in this blogger template), I'll just link to it in my repo: https://bitbucket.org/ashonit/config/src/2c99ecffce6140874d3408b8eb413c377da86abb/.conkyrc?at=default

Install lm-sensors and run sensors-detect in order to get CPU temps to show.

The most difficult thing I've found is getting fan readings, since hwmon was removed from the Ubuntu repos, there doesn't seem to be a replacement. I haven't been able to find a reliable way to query the file-system for current RPM values either -- if anyone knows, please let me know!

Screenshot of the latest setup:

Monday, April 1, 2013

Script to initialise Wacom Intuos 5

To round out the setup for my Wacom Intuos 5 tablet, this is the script I run to initialise it for left-handed use with an nVidia graphics card in Xubuntu 12.10:

#!/bin/bash if [ -x /usr/bin/xsetwacom ]; then xsetwacom set "Wacom Intuos5 M Pen stylus" Rotate half xsetwacom set "Wacom Intuos5 M Pen eraser" Rotate half xsetwacom set "Wacom Intuos5 M Pen cursor" Rotate half xsetwacom set "Wacom Intuos5 M Pen pad" Rotate half # HEAD-0, HEAD-1 identify screens when using nVidia graphics. # Use xrandr output for AMD, Intel, etc. xsetwacom set "Wacom Intuos5 M Pen stylus" MapToOutput HEAD-0 fi

Saturday, March 23, 2013

Configure Mouse Speed in Xubuntu

I found the default mouse acceleration to be way too fast (particularly when trying to click on the single-pixel window borders in xfce).

To slow it down, I followed Patrick Mylund's instructions. These are the results specific to the Logitech G400.

$ xinput --list --short

This shows the names/IDs of input devices. In my case, "Logitech Gaming Mouse G400".

Now create a file ~/.xinput-mouse.sh, chmod it +x to make it executable, and add edit to include the following command:

xinput --set-prop "Logitech Gaming Mouse G400" "Device Accel Constant Deceleration" 4

Add a file xinput-mouse.desktop to ~/.config/autostart with the following contents:

[Desktop Entry] Encoding=UTF-8 Version=0.9.4 Type=Application Name=xinput-mouse Comment=Slow the mouse acceleration Exec=/home/<username>/.xinput-mouse.sh OnlyShowIn=XFCE; StartupNotify=false Terminal=false Hidden=false

Sunday, June 10, 2012

Mapping Keyboard Shortcuts in Cinnamon

Using gconf-editor, follow instructions at http://www.maphew.com/Linux/Use_WinKey_in_Ubuntu.html.

The example is to map Super+E (or Windows+E) to start nautilus, like Windows opens Windows Explorer. The important steps (in gconf-editor) are:
  1. Go to /Apps/metacity/global_keybidings
  2. Set run_command_1 to <Super>E
  3. Go to /Apps/metacity/keybinding_commands
  4. Set command_1 to /usr/bin/nautilus

Running Diablo II under wine in Linux Mint Cinnamon

Disabling or re-mapping Alt+Click
If you're playing Diablo II in wine, the default Alt+Click mapping in Cinnamon (which moves the underlying window) is kind of annoying. Since the desktop environment is based on Gnome (I guess), you can use the gconf-editor tool to edit the mappings.

Under Mint 13, the configuration editor isn't installed by default, so you might have to do this:
    sudo apt-get install gconf-editor
    gconf-editor
Then navigate to apps/metacity/general and edit the mouse_button_modifier key to something else (I used "Control" which seems to be fine).

Getting "pick up items with Alt held down" to work
Holding down Alt highlights items. If you can't pick up items with Alt held down, you may need to disable the window manager control of the wine window.

To do this, run winecfg, go to Graphics tab, and uncheck the "Allow the window manager to control the windows" option.

Alt+Click for item pick up now works. The downside is that the window won't appear in the taskbar any more, and when you minimise it you get a little icon in the bottom left-hand corner. But it works.

Note: While initially I did this and it seemed to helped, it might also cause keyboard interaction to stop working. I was playing around with the "Window focus mode" in Cinnamon -> Window Settings at the same time, so at the moment I've turned the window manager control back on in winecfg and it's okay.