enable hdmi output on openbox

Enable and change resolution to HDMI output connected

xrandr --output $( xrandr | awk '/HDMI.* connected/ {print $1}' ) --mode 1360x768
Advertisements

set the screen or keyboard brightness on linux

To list the devices

brightnessctl -l

Set the screen brightness

brightnessctl -d intel_backlight -c backlight s 30%

Increase the screen brightness in more 10%

brightnessctl -d intel_backlight -c backlight s 10%+

Decrease the screen brightness in less 10%

brightnessctl -d intel_backlight -c backlight s 10%-

Turn on the keyboard brightness

brightnessctl -d asus::kbd_backlight s 10%

Turn off the keyboard brightness

brightnessctl -d asus::kbd_backlight s 0%

remapping keyboard keys on X11

To see your current keycode mapping

xmodmap -pke

To remaping one key

echo 'keycode 105 = KP_Divide' >> ~/.Xmodmap

Reload keyboad mapping configuration

xmodmap ~/.Xmodmap

To load keymap configuration when X11 starts

echo 'test -s ~/.Xmodmap && xmodmap ~/.Xmodmap' >> ~/.bashrc

To clear keymap configuration, use default keymap settings

setxkbmap

Alternatively, if you use openbox, you can configure your keymaps when X11 starts

echo 'xmodmap -e "keycode 105 = KP_Divide"' >> ~/.config/openbox/autostart

You can get keycode of pressed keys

xev

adjust sound card volume with amixer

Show all mixer Controls

amixer -c 0 scontrols

Show all mixer Contents

amixer -c 0 scontents

Get only values of Master content

amixer -c 0 sget Master

Set value to Master

amixer -c 0 set Master 30

Mute Internal Mic and Mic

amixer -c 0 set 'Internal Mic' mute
amixer -c 0 set 'Mic' mute

Unmute Internal Mic and Mic

amixer -c 0 set 'Internal Mic' unmute
amixer -c 0 set 'Mic' unmute

Set value to Headphone

amixer -c 0 set 'Headphone' 100

Set value to Speaker and mute it

amixer -c 0 set 'Speaker' 80 mute