Skip to content

Instantly share code, notes, and snippets.

View jarun's full-sized avatar

Arun jarun

View GitHub Profile
@jarun
jarun / blank
Last active September 11, 2015 17:54
Blank screen
perl -e 'select(undef,undef,undef,.1)' && xset dpms force off
xtrlock -b
@jarun
jarun / Backup
Created November 28, 2014 12:53
Backup modified files
$ cat list.txt
/home/arun/.bashrc
/home/arun/.vimrc
/home/arun/.config/smplayer/smplayer.ini
/opt/tor-browser_en-US/Docs/ChangeLog.txt
$ take_backup.sh list.txt
$ tar -xvf backup-timestamp.tar.bz2 -C /
@jarun
jarun / fontconfig
Last active September 11, 2015 18:00
font configuration files
FILE: /etc/fonts/conf.d/99-sharp-fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="hinting" mode="assign"><bool>true</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
<edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
@jarun
jarun / toggletouch
Created November 4, 2014 20:38
toggle the touchpad
#!/bin/bash
#SYNSTATE=$(xinput list-props "SynPS/2 Synaptics TouchPad" | grep Enabled | grep -Eo '.$')
#if [ $SYNSTATE = 0 ]; then xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1
#else xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 0
#fi
SYNSTATE=$(synclient -l|grep TouchpadOff|cut -d = -f2)
if [ $SYNSTATE = 0 ]; then synclient touchpadoff=1
else synclient touchpadoff=0
@jarun
jarun / brightness
Created November 4, 2014 19:29
brightness control
------------
/usr/bin/br+
------------
#!/bin/bash
curval=`cat /sys/class/backlight/intel_backlight/brightness`
if [ $curval -ge 700 ]; then
echo already max
else
@jarun
jarun / lastlog
Created October 9, 2015 03:18
log the output of a command (as well as show in terminal)
#!/bin/bash
"$@" 2>&1 | tee /tmp/lastlog
@jarun
jarun / myscript
Last active February 13, 2016 14:20
myscript [startup script]
echo 200 | sudo tee /sys/class/backlight/intel_backlight/brightness
#pkexec /usr/lib/gnome-settings-daemon/gsd-backlight-helper --set-brightness 0
syndaemon -i 1 -d
synclient touchpadoff=1
#ibus exit
#echo powersave | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
sudo service bluetooth stop
sudo service ssh stop
@jarun
jarun / blacklist
Last active February 13, 2016 14:23
blacklisted modules
#arun blacklist
blacklist btrfs
blacklist zlib_deflate
blacklist ufs
blacklist qnx4
blacklist hfsplus
blacklist hfs
blacklist minix
blacklist vfat
blacklist msdos
@jarun
jarun / xft-settings.sh
Last active April 26, 2016 13:56
Manjaro LXQt infinality settings [/etc/X11/xinit/xinitrc.d/xft-settings.sh]
#!/bin/bash
XFT_SETTINGS="
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
@jarun
jarun / text_at_beginning.md
Created May 23, 2016 06:13
Add the same text at the beginning of multiple lines

vim

  • Press Ctrl-v to select the first column of text in the lines you want to change (visual mode).
  • Press Shift-i and type the text you want to insert.
  • Hit Esc, wait 1 second and the inserted text will appear on every line.

sed

$ sed -i 's/^/buku -u /' filename