Skip to content

Commit

Permalink
bare bones version of malias
Browse files Browse the repository at this point in the history
  • Loading branch information
kostaskonkk committed Jul 16, 2019
1 parent 225d9a8 commit 0883956
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 42 deletions.
5 changes: 5 additions & 0 deletions .aliases
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ export ROS_WORKSPACE=/home/kostas/datmo_ws
alias datmo_='cd ~/datmo_ws/src/datmo'
alias vdatmo='vim -S ~/datmo_ws/src/datmo/.datmo.vim'
alias t='roslaunch datmo test.launch'
alias to='roslaunch odometry test.launch'
alias compile='cd ~/datmo_ws && find src/datmo/src |entr -p catkin_make'
alias lshape='mupdf ~/report/papers/L-Shape.pdf'

alias datmo_compile='cd ~/datmo_ws && find src/datmo/src/ -ignore_readdir_race |entr -p catkin_make -DCATKIN_WHITELIST_PACKAGES=datmo'
###################### OS [S]pecifics ##########################
Expand Down Expand Up @@ -47,6 +49,8 @@ alias la='ls -A'
alias l='ls -CF'
alias vs='vim -S'
alias screens='sh ~/.screenlayout/monitor_laptop.sh'
alias cl='xrandr --output eDP-1 --off'
alias ol='xrandr --output eDP-1 --auto'

########################## R[O]S ##############################
alias mmac='export ROS_MASTER_URI=http://localhost:11311'
Expand Down Expand Up @@ -93,6 +97,7 @@ alias notes_car='vim ~/Dropbox/report/notes/car.md'

####################### [V]arious #############################

#alias malias="history | tail -n2 | head -n1 | awk '{$1="";=print $0}' | alias_maker"
alias malias='history | tail -n2 | head -n1 | alias_maker'
alias mat='cd ~/Dropbox/path_following && matlab && cd -'
alias cc='xclip -selection clipboard'
Expand Down
55 changes: 35 additions & 20 deletions .config/i3/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 16
Expand All @@ -14,6 +12,18 @@ font pango:monospace 16
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8

for_window [class="St" title="todo.md"] move scratchpad
exec_always --no-startup-id "st -e vim ~/Dropbox/todo.md"

for_window [class="MuPDF" title="kim2018shape.pdf"] move workspace 4:Papers
exec_always --no-startup-id "mupdf ~/report/papers/kim2018shape.pdf"

for_window [class="St" title="datmo.tex"] move workspace 8:Report
exec_always st -e vim -S /home/kostas/report/.report.vim

for_window [window_role="pop-up"] floating enable

hide_edge_borders smart
set $mod Mod4
set $up k
set $down j
Expand All @@ -24,7 +34,7 @@ bar {
font pango:mono 10
status_command i3blocks
#status_command i3status
#tray_output primary
#tray_output primary
position top
mode dock
modifier None
Expand All @@ -41,7 +51,8 @@ bindsym $mod+Return exec st
bindsym $mod+d exec dmenu_run
bindsym $mod+Shift+w exec firefox https://web.whatsapp.com
bindsym $mod+Shift+m exec firefox https://messenger.com

bindsym $mod+s sticky toggle


# kill focused window
bindsym $mod+Shift+q kill
Expand All @@ -55,10 +66,9 @@ exec xrandr --auto
exec --no-startup-id nm-applet
exec --no-startup-id dropbox start
exec --no-startup-id compton
exec --no-startup-id i3-msg workspace 8:Report; exec st -e vim -S /home/kostas/report/.report.vim
exec --no-startup-id i3-msg workspace 3:Plots
exec --no-startup-id i3-msg exec st -e vim -S /home/kostas/datmo_ws/src/evo/.evo.vim
exec --no-startup-id i3-msg "workspace 2:Datmo; exec st -e vim -S /home/kostas/datmo_ws/src/datmo/.datmo.vim"
#exec --no-startup-id i3-msg workspace 3:Plots
#exec --no-startup-id i3-msg exec st -e vim -S /home/kostas/datmo_ws/src/evo/.evo.vim
#exec --no-startup-id i3-msg "workspace 2:Datmo; exec st -e vim -S /home/kostas/datmo_ws/src/datmo/.datmo.vim"

# Keyboard man xkeyboard-config
exec setxkbmap -layout us,gr -option 'grp:caps_toggle'
Expand Down Expand Up @@ -86,6 +96,9 @@ bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# move to different motitor
bindsym $mod+greater move workspace to output right
bindsym $mod+less move workspace to output left

# split in horizontal orientation
bindsym $mod+z split h
Expand All @@ -97,29 +110,32 @@ bindsym $mod+v split v
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
#bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
bindsym $mod+Shift+minus floating toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
bindsym $mod+minus focus mode_toggle

# move the currently focused window to the scratchpad
bindsym $mod+Shift+space move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+space scratchpad show

# focus the parent container
bindsym $mod+a focus parent
bindsym $mod+b bar mode toggle

# focus the child container
#bindsym $mod+d focus child

# move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show

# [W]orkspaces
# switch to workspace
bindsym $mod+1 workspace 1:Firefox
bindsym $mod+2 workspace 2:Datmo
Expand Down Expand Up @@ -151,8 +167,8 @@ bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

# resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
# [R]esize
bindsym $mod+r mode "resize"
mode "resize" {
# These bindings trigger as soon as you enter the resize mode

Expand All @@ -176,4 +192,3 @@ mode "resize" {
bindsym Escape mode "default"
}


22 changes: 7 additions & 15 deletions .local/bin/alias_maker
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
#! /bin/bash

if [ "$1" == "" ]; then
cowsay -t "Give me a word, bitch"
exit 1
fi
read HIST
echo "$HIST"
#awk '{$1="";print $0}' "$HIST" > "$command"
command=$(echo "$HIST" | awk '{$1="";print $0}')
echo "alias $1='$command'">>/home/kostas/.aliases

"$command" = "$(awk '{$1="";print $0}' "$HIST" )"
#| cut -d' ' -f4-
cowsay "$alias $1='$command' has been added to your aliases"

#cowsay -t "Give me a word, bitch"

#if [ $1 =="" ]; then
#cowsay -t "Give me a word, bitch"
#exit 1
#fi

#new_alias="alias $1='$command'"
#echo "${new_alias}">>~/.dotfiles/aliases

#cowsay "${new_alias} has been added to your aliases"
5 changes: 0 additions & 5 deletions .rviz/persistent_settings

This file was deleted.

25 changes: 23 additions & 2 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,27 @@ au BufNewFile,BufRead *.py
""""""""" [Y]CM
let g:ycm_server_python_interpreter="/usr/bin/python"

""""""""" [F]ast Fold
let g:tex_fold_enabled = 1
let g:xml_syntax_folding = 1
let g:fastfold_savehook = 1
""""""""" La[T]ex vimtex
let g:tex_flavor='latex'
"let g:tex_flavor='latex'
let g:tex_flavor='pdflatex'
let g:vimtex_quickfix_mode=0
"let g:vimtex_fold_manual=1
let g:tex_conceal='abdmg' "concealment
set conceallevel=1 "concealment


""""""""" Indentation
"let g:vimtex_indent_enabled=1
"let g:vimtex_indent_bib_enabled=1
"let g:vimtex_indent_on_ampersands=1

au BufNewFile,BufRead *.tex
\ set wrap linebreak nolist |
\ set foldmethod=syntax
"\ set spell spelllang=en_gb

""""""""" [P]lugin manager
Expand All @@ -149,10 +163,17 @@ Plug 'sjl/gundo.vim'
"Plug 'vim-syntastic/syntastic'
Plug 'PotatoesMaster/i3-vim-syntax'
Plug 'SirVer/ultisnips'|Plug 'honza/vim-snippets'
Plug 'lervag/vimtex'
Plug 'lervag/vimtex'|Plug 'Konfekt/FastFold'
Plug 'ycm-core/YouCompleteMe'
if !has('macunix')
Plug 'taketwo/vim-ros'
endif

call plug#end() " Initialize plugin system

function! OpenBibtexPDF()
let s:word = expand("<cword>")
let s:cmd = "silent !setsid mupdf `find ~/report/papers/ -iname '" . s:word . ".pdf' | head -1`"
execute s:cmd
endfunction
map <silent> <leader>r :call OpenBibtexPDF()<cr>

0 comments on commit 0883956

Please sign in to comment.