Fixes #54, setup xkb on laptop
Functions: - tar/unzip that remove original file after extraction - remove directory - sudo nvim Vim leader mappings: - delete entire buffer into system clipboard - find merge conflicts
This commit is contained in:
@@ -33,7 +33,8 @@ function rgrp() { grep -r $1 * ; }
|
||||
function cpd() { cp -avr $1 $2 ; }
|
||||
|
||||
# extract tar archive
|
||||
function untar() { tar -xzvf $1 ; }
|
||||
function untar() { tar -xzvf $1 && rm $1; }
|
||||
function runzip() { unzip $1 && rm $1; }
|
||||
# }}} command line related #
|
||||
|
||||
# directory-related {{{ #
|
||||
@@ -44,6 +45,7 @@ function f() { cd $1 && pwd > ~/.last_dir && ls -a ; }
|
||||
if [ -f ~/.last_dir ]
|
||||
then cd `cat ~/.last_dir`
|
||||
fi
|
||||
function rmr() { rm -rf $1 ; }
|
||||
|
||||
# todo: fix
|
||||
# function f.() { f $(printf "%0.s../" $(seq 1 $1 )) ; }
|
||||
@@ -100,11 +102,12 @@ alias rg="ranger"
|
||||
function ok() { okular $1 & ; }
|
||||
function chr() { google-chrome $1 ; }
|
||||
function ni() { nvim $1 ; }
|
||||
function sni() { sudo nvim $1 ; }
|
||||
alias nisw="f ~/.local/share/nvim/swap"
|
||||
# function mrk() { pandoc -o ${1%.*}.html $1 && chr ${1%.*}.html ; }
|
||||
function mrk() { pandoc -o ${1%.*}.html $1 ; }
|
||||
|
||||
alias vbn="cvlc --loop --alsa-gain 1 ~/Downloads/brown-noise.mp3"
|
||||
alias vbn="cvlc --loop --alsa-gain 1 ~/Music/brown-noise.mp3"
|
||||
alias vlm="alsamixer -c 2"
|
||||
alias rmsw="rm .sw*"
|
||||
|
||||
@@ -409,7 +412,7 @@ function run() {
|
||||
# temp {{{ #
|
||||
alias m8="make checkpasswd && ./checkpasswd < passwd.in"
|
||||
alias m3="make pfact && ./pfact.out 14"
|
||||
function pf() { make pfact && ./pfact.out $1 ; }
|
||||
function pf() { ./pfact.out $1 ; }
|
||||
alias 35w="c9 3-5_wait.c && ./3-5_wait.out abc a"
|
||||
# }}} temp #
|
||||
|
||||
|
||||
@@ -2,15 +2,10 @@
|
||||
|
||||
# startup {{{ #
|
||||
exec redshift -O 4000
|
||||
exec_always /home/kevin/.local/bin/wal -i "/home/kevin/Pictures/Backgrounds/"
|
||||
exec /home/kevin/.local/bin/wal -i "/home/kevin/Pictures/Backgrounds/"
|
||||
# exec_always /home/kevin/.local/bin/wal -i "/home/kevin/Pictures/Backgrounds/japan-street.jpg"
|
||||
exec imwheel
|
||||
# enable horizontal scrolling
|
||||
exec --no-startup-id synclient HorizTwoFingerScroll=1
|
||||
# disable touchscreen
|
||||
exec xinput disable 12
|
||||
exec $def_term
|
||||
reload
|
||||
# }}} startup #
|
||||
|
||||
set $def_term "rxvt-unicode"
|
||||
@@ -129,8 +124,10 @@ bindsym $mod+F10 workspace $ws10; exec $def_term
|
||||
|
||||
# ws bindings {{{ #
|
||||
# switch to workspace
|
||||
bindsym $mod+plus workspace next
|
||||
bindsym $mod+minus workspace prev
|
||||
# bindsym $mod+plus workspace next
|
||||
# bindsym $mod+minus workspace prev
|
||||
bindsym $mod+minus move workspace to output left
|
||||
bindsym $mod+plus move workspace to output right
|
||||
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
|
||||
@@ -61,7 +61,7 @@ interval=60
|
||||
[wifi]
|
||||
label=🖧
|
||||
instance=wlp3s0
|
||||
interval=10
|
||||
interval=5
|
||||
# }}} wifi #
|
||||
|
||||
# time {{{ #
|
||||
|
||||
@@ -5,8 +5,8 @@ URxvt.font: xft:hack:size=13
|
||||
URxvt*inheritPixmap: true
|
||||
URxvt*transparent: true
|
||||
! URxvt*shading: 0 to 99 darkens, 101 to 200 lightens
|
||||
! URxvt*shading: 40
|
||||
URxvt*shading: 20
|
||||
URxvt*shading: 40
|
||||
! URxvt*shading: 20
|
||||
/* }}} transparency */
|
||||
|
||||
URxvt.scrollBar: false
|
||||
|
||||
@@ -144,9 +144,12 @@ let mapleader="\<Space>"
|
||||
nnoremap <leader>cmt :%s/>\(.*\)>/<!---\1-->/g<CR>
|
||||
" delete line into system clipboard
|
||||
nnoremap <leader>D "+dd
|
||||
" delete entire buffer into system clipboard
|
||||
nnoremap <leader>DA "+ggdG
|
||||
" reload file
|
||||
nnoremap <leader>e :e<CR>
|
||||
" find merge conflicts
|
||||
nnoremap <leader>fc /[<>=]\{7\}<CR>
|
||||
" reload folds
|
||||
nnoremap <leader>ff :set foldmethod=marker<CR> zM
|
||||
" toggle search highlighting
|
||||
|
||||
@@ -102,5 +102,9 @@ export PATH="${PATH}:${HOME}/.local/bin/"
|
||||
xset r rate 200 60
|
||||
# laptop
|
||||
if [ "$(hostname)" = "X1-Carbon" ];
|
||||
then
|
||||
xrandr --dpi 125
|
||||
xinput disable "ELAN Touchscreen"
|
||||
# enable horizontal scrolling
|
||||
synclient HorizTwoFingerScroll=1
|
||||
fi
|
||||
|
||||
87
xkb/X1-Carbon-pc
Normal file
87
xkb/X1-Carbon-pc
Normal file
@@ -0,0 +1,87 @@
|
||||
default partial alphanumeric_keys modifier_keys
|
||||
xkb_symbols "pc105" {
|
||||
|
||||
key <ESC> { [ Escape ] };
|
||||
|
||||
// The extra key on many European keyboards:
|
||||
key <LSGT> { [ less, greater, bar, brokenbar ] };
|
||||
|
||||
// The following keys are common to all layouts.
|
||||
key <BKSL> { [ backslash, bar ] };
|
||||
key <SPCE> { [ space ] };
|
||||
|
||||
include "srvr_ctrl(fkey2vt)"
|
||||
include "pc(editing)"
|
||||
include "keypad(x11)"
|
||||
|
||||
key <END> { [ BackSpace, BackSpace ] };
|
||||
|
||||
key <TAB> { [ Tab, ISO_Left_Tab ] };
|
||||
key <RTRN> { [ Return ] };
|
||||
|
||||
key <CAPS> { [ Caps_Lock ] };
|
||||
key <NMLK> { [ Num_Lock ] };
|
||||
|
||||
key <LFSH> { [ Shift_L ] };
|
||||
key <LCTL> { [ Control_L ] };
|
||||
key <LWIN> { [ Super_L ] };
|
||||
|
||||
key <RTSH> { [ Shift_R ] };
|
||||
key <RCTL> { [ Control_R ] };
|
||||
key <RWIN> { [ Super_R ] };
|
||||
key <MENU> { [ Menu ] };
|
||||
|
||||
// Beginning of modifier mappings.
|
||||
modifier_map Shift { Shift_L, Shift_R };
|
||||
modifier_map Lock { Caps_Lock };
|
||||
modifier_map Control{ Control_L, Control_R };
|
||||
modifier_map Mod2 { Num_Lock };
|
||||
modifier_map Mod4 { Super_L, Super_R };
|
||||
|
||||
// Fake keys for virtual<->real modifiers mapping:
|
||||
key <LVL3> { [ ISO_Level3_Shift ] };
|
||||
key <MDSW> { [ Mode_switch ] };
|
||||
modifier_map Mod5 { <LVL3>, <MDSW> };
|
||||
|
||||
key <ALT> { [ NoSymbol, Alt_L ] };
|
||||
include "altwin(meta_alt)"
|
||||
|
||||
key <META> { [ NoSymbol, Meta_L ] };
|
||||
modifier_map Mod1 { <META> };
|
||||
|
||||
key <SUPR> { [ NoSymbol, Super_L ] };
|
||||
modifier_map Mod4 { <SUPR> };
|
||||
|
||||
key <HYPR> { [ NoSymbol, Hyper_L ] };
|
||||
modifier_map Mod4 { <HYPR> };
|
||||
// End of modifier mappings.
|
||||
|
||||
key <OUTP> { [ XF86Display ] };
|
||||
key <KITG> { [ XF86KbdLightOnOff ] };
|
||||
key <KIDN> { [ XF86KbdBrightnessDown ] };
|
||||
key <KIUP> { [ XF86KbdBrightnessUp ] };
|
||||
};
|
||||
|
||||
hidden partial alphanumeric_keys
|
||||
xkb_symbols "editing" {
|
||||
key <PRSC> {
|
||||
type= "PC_ALT_LEVEL2",
|
||||
symbols[Group1]= [ Print, Sys_Req ]
|
||||
};
|
||||
key <SCLK> { [ Scroll_Lock ] };
|
||||
key <PAUS> {
|
||||
type= "PC_CONTROL_LEVEL2",
|
||||
symbols[Group1]= [ Pause, Break ]
|
||||
};
|
||||
key <INS> { [ Insert ] };
|
||||
key <BKSP> { [ Home ] };
|
||||
key <PGUP> { [ Prior ] };
|
||||
key <HOME> { [ Delete ] };
|
||||
key <DELE> { [ End ] };
|
||||
key <PGDN> { [ Next ] };
|
||||
|
||||
key <UP> { [ Up ] };
|
||||
key <LEFT> { [ Left ] };
|
||||
key <DOWN> { [ Down ] };
|
||||
key <RGHT> { [ Right ] };
|
||||
};
|
||||
@@ -5,6 +5,9 @@ xkb_config_file_name="pc"
|
||||
sys_layout_file="/usr/share/X11/xkb/symbols/$xkb_config_file_name"
|
||||
xkb_config_dir="$linux_config_dir/xkb"
|
||||
|
||||
# Copy system file into xkb_config_dir.
|
||||
# cp "$sys_layout_file" ./"$pc"-"$xkb_config_file_name"
|
||||
|
||||
# Remove system file.
|
||||
sudo rm -rf "$sys_layout_file"
|
||||
# Link config file in repository to system config location.
|
||||
|
||||
Reference in New Issue
Block a user