## INICIO ## ## escape key ## bind Escape abort ## set window name ## exec ratpoison -c 'set winfmt %n %a %s %t' ## make the default groups ## exec sleep 1; ratpoison -c "grename home" ## unmanaged windows ## ## prepare terminal ## exec xrdb -merge .Xresources ## setings ##################################################### set startupmessage 0 set winname title set wingravity center set transgravity center set border 4 set barborder 4 set barinpadding 1 set padding 0 0 0 0 set barpadding 10 4 set barinpadding 0 set inputwidth 160 set bargravity c set font "JetBrainsMono nerd font:size=14" set bgcolor #000000 set fgcolor #55af66 set fwcolor #55af66 set bwcolor #224528 set framemsgwait -1 set mesgwait 4 ## alias ##################################################### ## funtions ########################################### ## show root window ## alias showroot exec ratpoison -c fdump > /tmp/FOO; ratpoison -c 'select -' -c only alias unshowroot exec ratpoison -c "frestore `cat /tmp/FOO`" ## programs ## alias telegram exec telegram_desktop.sh & alias whatsapp exec /opt/whatsapp-desktop/WhatsApp & alias autoborder exec rp_autoborder.sh & alias screenkey exec screenkey -p bottom -s medium --font-color "#ff8000" --opacity 0 & alias deadbeef exec rp_deadbeef.sh & alias surfer exec surfer.sh & ## general help ## alias help exec ratpoison -c "set msgwait 0" -c "echo $(echo "[ emojis ] - paste emojis\n[ info ] - system info\n[ weather ] - forecast\n[ cal ] - calendar\n[ apropos ] - command examples\n[ fetch ] - ratpoison fetch\n[ trans ] - translate to inglish from prompt to clipboard\n[ transes ] - translate to spanish from select to panel\n[ figlet ] - ratpoison banner\n[ telegram ] - telegram desktop\n[ whatsapp ] - whatsapp desktop\n[ autoborder ] - ratpoison autoborder\n[ screenkey ] - capture keymap\n[ deadbeef ] - ratpoison deadbeef" | column -s "-" -t -o " -> ")" -c "set msgwait 4" & ## hello ## alias hello exec ratpoison -c "set msgwait 0" -c "echo $(cat .rp_hello)" -c "set msgwait 4" & ## emojis ## alias emojis exec ratpoison -c "putsel $(cat .emojis | dmenu -i -l 8 | cut -d "-" -f 1)" & alias emoticons exec ratpoison -c "putsel $(cat .emoticons | dmenu -i -l 8 | cut -d "-" -f 1" & ## system ## alias system exec ratpoison -c "set msgwait 0" -c "echo $(rp_sysinfo.sh)" -c "set msgwait 4" & ## weather ## alias weather exec ratpoison -c "set msgwait 0" && ratpoison -c "echo $(wthr=$(ansiweather -a false -s false -l Córdoba,AR | cut -c 21-100 | tr '-' '\n'); icon=$(cat /tmp/weather_gen | awk '{print $1}'); echo " weather in Córdoba $icon \n\n Temperature $wthr")" && ratpoison -c "set msgwait 4" & ## cal ## alias cal exec ratpoison -c "set msgwait 0" -c "echo $(ccal)" -c "set msgwait 4" & ## apropos ## alias apropos exec ratpoison -c "echo $(apropos $(ratpoison -c "prompt apropos | "))" & ## fetch ## alias fetch exec ratpoison -c "set msgwait 0" -c "echo $(rp_fetch.sh)" -c "set msgwait 4" & ## translator ## alias transes exec TRANSES=$(trans -b :es "$(ratpoison -c getsel)"); ratpoison -c "set msgwait 0" -c "echo $TRANSES" -c "set msgwait 4" & alias trans exec TRANS=$(trans -b :en "$(ratpoison -c "prompt trans [eng] | ")"); ratpoison -c "set msgwait 0" -c "echo $TRANS" -c "set msgwait 4" -c "putsel $(echo "$TRANS")" & ## figlet ## alias figlet exec ratpoison -c "set msgwait 0" && ratpoison -c "echo $(figlet -c -t -f smslant "$(ratpoison -c "prompt in: ") ")" && ratpoison -c "set msgwait 4" & ## podcast ## alias podcast exec rp_podcastplayer.sh & ## keys ###################################################### ## groups ## bind x exec rp_tabbedrename.sh & bind X ratpoison -i -c grename bind g exec ratpoison -i -c groups definekey top s-g exec ratpoison -c "gselect $(ratpoison -c groups | dmenu -i -l 8 | cut -c 1)" & bind D exec ratpoison -c "gdelete $(ratpoison -c "prompt gdelete: ")" & bind N gnext bind S-ISO_Left_Tab gother bind P gprev ## frames ## bind f exec ratpoison -i -c fselect bind h focusleft bind H exchangeleft bind j focusdown bind J exchangedown bind k focusup bind K exchangeup bind l focusright bind L exchangeright bind r exec ratpoison -i -c resize bind R exec ratpoison -c remove && rp_autoborder.sh & bind s exec ratpoison -c hsplit && rp_autoborder.sh & bind S exec ratpoison -c split && rp_autoborder.sh & bind o exec ratpoison -c only && rp_autoborder.sh & bind Tab focuslast definekey top s-n focus definekey top s-p focusprev ## windows ## bind w exec ratpoison -i -c "windows %n %a: %t" definekey top s-w exec ratpoison -c "select $(ratpoison -c windows | dmenu -i -l 8 | cut -c 1)" & bind n next bind p prev bind q delete bind Q exec rp_window_kill.sh & bind m exec ratpoison -i -c gmove bind M exec ratpoison -i -c gmerge bind d dedicate definekey s-e exec rp_expo.sh && rp_autoborder.sh & definekey top s-q exec ratpoison -c delete -c remove ## cursor ##################################################################### definekey top s-l exec ratpoison -c "ratrelwarp 20 0" # mouse to right definekey top s-L exec ratpoison -c "ratrelwarp 200 0" # mouse to right fast definekey top s-h exec ratpoison -c "ratrelwarp -20 0" # mouse to left definekey top s-H exec ratpoison -c "ratrelwarp -200 0" # mouse to left fast definekey top s-j exec ratpoison -c "ratrelwarp 0 20" # mouse to down definekey top s-J exec ratpoison -c "ratrelwarp 0 200" # mouse to down fast definekey top s-k exec ratpoison -c "ratrelwarp 0 -20" # mouse to up definekey top s-K exec ratpoison -c "ratrelwarp 0 -200" # mouse to up fast ## cursour buttons ################################################################## definekey top s-1 exec ratpoison -c "ratclick 1" # mouse button left definekey top s-2 exec ratpoison -c "ratclick 2" # mouse button middle definekey top s-3 exec ratpoison -c "ratclick 3" # mouse button right definekey top s-s exec ratpoison -c "rathold down 1" # mouse button left hold down definekey top s-S exec ratpoison -c "rathold up 1" # mouse button left hold up ## show root window ############################################# bind minus showroot bind plus unshowroot ## other ################################################################# ## terminal ## bind Return exec tabbed -n terminal -c xterm -bc -into ## launcher ## bind Menu exec dmenu_run -i -l 8 bind period exec ## cursor ## bind b banish ## borders ## bind B exec ratpoison -c "set fwcolor #55af66" ## panel ## bind space exec rp_bardzen.sh & sleep 0.1; rp_autoborder.sh & ## tilling ## definekey top s-Return exec rp_tilling.sh && rp_autoborder.sh ## session ## bind E exec rp_session.sh bind S-space exec ratpoison -c "tmpwm nowm.sh" & ## multimedia ## definekey top s-m exec rp_musicplayer.sh & definekey top s-i exec ratpoison -c "set msgwait 0" -c "echo $(rp_info.sh)" -c "set msgwait 4" & definekey top XF86AudioRaiseVolume exec rp_volup.sh & definekey top XF86AudioLowerVolume exec rp_voldown.sh & definekey top XF86AudioMute exec xterm -e pulsemixer ## copy/paste to/from x ## bind c exec ratpoison -c getsel | xsel -b && ratpoison -c "echo copy to clipboard" & bind C exec rp_fileputsel.sh & ## notes ## bind i exec echo "$(ratpoison -c "prompt  note | ")" >> ~/rp_notes.txt & ## captures ## definekey top s-c exec rp_capturemedia.sh & definekey top Print exec rp_screenshot.sh & ## display ## definekey top XF86Display exec slock & definekey top s-space exec nowm_wcurrent.sh & ## utils ############################################################ ## help ## definekey top s-question exec ratpoison -c "set msgwait 0" -c "echo $(cat .ratpoison_keymap | grep $(ratpoison -c "prompt  keymap | ") | column -s "=" -t -o " -> ")" -c "msgwait 4" & ## calc ## bind asterisk exec ratpoison -c "set msgwait 0" -c "echo calc = $(ratpoison -c "prompt calc: " | bc)" -c "set msgwait 4" & ## cheat ## bind question exec ratpoison -c "set msgwait 0" -c "echo $(cheat.sh $(ratpoison -c "prompt cheat: "))" -c "msgwait 4" & ## websearch ## bind quotedbl exec rp_xlinks.sh & ## dmenu filebrowser + ratpoison prompt ## bind slash exec rp_open.sh ## hooks ############################################################################### addhook newwindow exec rp_autoborder.sh & addhook deletewindow exec rp_autoborder.sh & addhook switchgroup exec ratpoison -i -c groups &