Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
id=`xprop -root _NET_ACTIVE_WINDOW |awk -F ' ' '{print $NF}'`
echo "id $id"
echo `xprop -id "$id" _MOTIF_WM_HINTS`
val=`xprop -id "$id" _MOTIF_WM_HINTS |awk -F '=' '{print $2}' |awk -F ', ' '{print $3}'`
echo "now $val"
if test "$val" -eq 1
then
echo "set 0"
xprop -id "$id" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
@technic
technic / virtualbox.txt
Last active November 5, 2017 14:58
how to get alt+tab
in Input->Keyboard->KeyboardSettings set auto capture keyboard = false
@technic
technic / .bash_logout
Created December 8, 2017 20:46
bash_logout
# ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
@technic
technic / lyx-commands
Created February 20, 2018 12:53
Lyx command sequences to instert references of EqRef and Format types
command-sequence label-insert [_CURSOR_]; inset-insert ref LatexCommand eqref reference "_CURSOR_" \end_inset; char-left; inset-settings ref; char-delete-backward; char-right;
command-sequence label-insert [_CURSOR_]; inset-insert ref LatexCommand formatted reference "_CURSOR_" \end_inset; char-left; inset-settings ref; char-delete-backward; char-right;
@technic
technic / Cargo.toml
Last active May 18, 2018 17:24
rust iron webframework middleware shared state example with RwLock
[package]
name = "iron-shared-example"
version = "0.1.0"
authors = ["Alex Maystrenko <alexeytech@gmail.com>"]
[dependencies]
iron = "*"
router = "*"
persistent = "*"
urlencoded = "*"
@technic
technic / example.xml
Created June 16, 2018 18:03
Kate magic lines
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
@technic
technic / technic.zsh-theme
Last active July 5, 2018 13:09
my oh-my-zsh theme
# technic mod of bira theme
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $UID -eq 0 ]]; then
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}'
local user_symbol='#'
else
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
local user_symbol='$'
@technic
technic / .gitignore
Last active July 12, 2018 12:10
Jupyter notebook cheat sheat
*.aux
*.log
*.out
*.tex
@technic
technic / README.md
Created October 17, 2018 09:59
Increase margin/border in LyX editor area.

Go to Document -> Settings -> Local layout and enter something like

LeftMargin MM
RightMargin MM

Done! Thx to this forum topic

@technic
technic / alias.sh
Created December 3, 2018 15:54
Git aliases
alias gd='git diff'
alias gst='git status'
alias gc='git commit -v'
alias ga='git add'
alias gb='git branch'
alias gds='git diff --staged'
alias gp='git push'
alias gup='git pull --rebase'
alias gupa='git pull --rabase --autostash'
alias gco='git checkout'