Tuesday, October 14, 2014

Enable / disable touchpad

Create launchers with commands to enable/disable touchpad easily. Works in Xfce but not only.

xinput set-prop 15 "Device Enabled" 0 xinput set-prop 15 "Device Enabled" 1

Monday, October 13, 2014

Install Shutter to capture screen and edit captures and images

sudo apt-get install shutter

Install Shotwell to see and edit images

sudo add-apt-repository ppa:yorba/ppa&&sudo apt-get update&&sudo apt-get install shotwell

Edit shortcuts in a program in Xfce

1. Enable editable accelerators in SettingsManager -> Appearance -> Settings

2. Hover the mouse over the menu item for which you want to change the shortcut and press the new key combination.

Use in terminal, etc. Works in all programs.

Wednesday, October 16, 2013

Search within text files by CLI

Open terminal in the target folder and run this command:

 grep -r <word> *

replacing <word>  with the needed expression.

Change the color font of Xfce desktop

Open home as root and ctrl-h to see hidden files.

Open .gtkrc.2.0 and add this:

style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 0

#Text colors you can delete if you want to use gtk theme colors
fg[NORMAL] = "#ffffff"
fg[SELECTED] = "#ffffff"
fg[ACTIVE] = "#0000ff"

widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"


I have changed the original lines that made selected font green so that it will stay white.

Delete these lines to get back to the default theme-based colors.

Friday, October 11, 2013

Dual monitors shortkey settings


With LXRandr, one can save  a certain display configuration. Then, in order to find that, you need to know what has changed in the home folder:

find ~/ -mmin -5 -type f
You can change 5 to a smaller number if you wish.
In this way, after saving configuration in LXRandr and running this command, the last change recorded is in ~/.config/autostart/lxrandr-autostart.desktop. That's it.
To open that:

gedit ~/.config/autostart/lxrandr-autostart.desktop
It contains something like:

[Desktop Entry]
Name=LXRandR autostart
Comment=Start xrandr with settings done in LXRandR
Exec=xrandr --output LVDS --mode 1680x1050 --rate 60.1 --output VGA-0 --off
What you need is (- with variable resolution - that is depending on my specific displays):
xrandr --output LVDS --mode 1680x1050 --rate 60.1 --output VGA-0 --off 

that is for the external monitor off, internal on.

To have the external on and the internal off:

xrandr --output LVDS --off --output VGA-0 --mode 1360x768 --rate 60.0 

To have extended monitor:

xrandr --output VGA-0 --auto --left-of LVDS 
Double desktop for a specific resolution for each display:

xrandr --output LVDS --mode 1680x1050 --rate 60.1 --output VGA-0 --mode 1360x768 --rate 60.0
To have the same display resolution on both:

xrandr --output LVDS --mode 1360x768 --rate 60.1 --output VGA-0 --mode 1360x768 --rate 60.0
xrandr --output LVDS --mode 1680x1050 --rate 60.1 --output VGA-0 --mode 1680x1050 --rate 60.0
or lower:
xrandr --output LVDS --mode 1280x720 --rate 60.1 --output VGA-0 --mode mode 1280x720 --rate 60.0 

And for each you need to assign a key (that is done differently depending on the desktop environment).