36 changed files with 3145 additions and 69 deletions
@ -1,20 +1,2 @@
|
||||
.pyc |
||||
*cache* |
||||
roles/*/molecule/default/.molecule |
||||
roles/docker |
||||
roles/emacs |
||||
roles/emacs-dotfiles |
||||
roles/fonts |
||||
roles/i3blocks-gaps |
||||
roles/i3-gaps |
||||
roles/qutebrowser |
||||
roles/slim |
||||
roles/syncthing |
||||
roles/syncthing-inotify |
||||
roles/termite |
||||
roles/virtualbox |
||||
roles/virtualenvwrapper |
||||
roles/vte-ng |
||||
install-all.retry |
||||
molecule/default/.molecule/ |
||||
roles/qutebrowser-dotfiles/files/hosts |
||||
dotfiles/git/.compartido/Proyectos/*/.gitconfig |
||||
dotfiles/git/.compartido/Trabajo/.gitconfig |
||||
|
@ -1,4 +0,0 @@
|
||||
extends: relaxed |
||||
truthy: disable |
||||
rules: {line-length: {max: 130}} |
||||
|
@ -1,51 +1,20 @@
|
||||
# Proveedor de entorno |
||||
# Dotfiles |
||||
|
||||
Este playbook instala lo siguiente: |
||||
## TL;DR |
||||
|
||||
- Docker |
||||
Script automatizado: |
||||
|
||||
- Emacs |
||||
``` sh |
||||
# Hacer dump de los paquetes actuales |
||||
bash manage.sh packages-bundle |
||||
# Actualizar el SO |
||||
bash manage.sh packages-update |
||||
# Sincronizar los dotfiles |
||||
bash manage.sh dotfiles |
||||
``` |
||||
|
||||
- Fuentes |
||||
## Resumen |
||||
|
||||
- Paquetes de Debian que uso |
||||
Mediante aconfmgr, se hace un dump de los paquetes instalados de arch (tanto pacman como yay) para poder gestionar los paquetes de forma declarativa |
||||
|
||||
- i3blocks-gaps |
||||
|
||||
- i3-gaps |
||||
|
||||
- Paquetes de Pip que uso |
||||
|
||||
- Qutebrowser |
||||
|
||||
- SLim |
||||
|
||||
- Syncthing |
||||
|
||||
- Termite |
||||
|
||||
- Virtualbox |
||||
|
||||
- Virtualenvwrapper |
||||
|
||||
Además, también instala mis ficheros de configuración de emacs, i3-wm, qutebrowser y zsh. Básicamente instala todo lo que necesito en un ordenador. |
||||
|
||||
Para poder usarlo, antes hay que instalar algunas dependencias: |
||||
|
||||
sudo apt install sudo python-pip git |
||||
sudo pip install ansible |
||||
|
||||
Luego copiamos el repositorio: |
||||
|
||||
git clone https://git.daemons.it/drymer/dotfiles |
||||
|
||||
Instalamos los roles que tiene como dependencias: |
||||
|
||||
cd dotfiles |
||||
ansible-galaxy install -r requirements.yml -p roles |
||||
|
||||
Y solo queda ejecutar el playbook: |
||||
|
||||
ansible-playbook install-all.yml -K |
||||
|
||||
Se pueden usar los tags `configuration` o `packages` para instalar solo configuración o paquetes, respectivamente. |
||||
Además, se gestionan los dotfiles con stow. |
||||
|
@ -0,0 +1,37 @@
|
||||
--- |
||||
font: |
||||
normal: |
||||
family: DejaVu Sans Mono for Powerline |
||||
style: Regular |
||||
size: 12 |
||||
|
||||
key_bindings: |
||||
- { key: Return, mods: Control|Shift, action: SpawnNewInstance } |
||||
|
||||
# Colors (Molokai Dark) |
||||
colors: |
||||
# Default colors |
||||
primary: |
||||
background: '#1B1D1E' |
||||
foreground: '#F8F8F2' |
||||
bright: |
||||
black: '#666666' |
||||
red: '#F92672' |
||||
green: '#A6E22E' |
||||
yellow: '#E2E22E' |
||||
blue: '#819AFF' |
||||
magenta: '#AE81FF' |
||||
cyan: '#66D9EF' |
||||
white: '#F8F8F2' |
||||
|
||||
scrolling: |
||||
history: 10000 |
||||
|
||||
cursor: |
||||
style: |
||||
blinking: Always |
||||
blink_interval: 100 |
||||
shape: Underline |
||||
unfocused_hollow: false |
||||
|
||||
background_opacity: 0.9 |
@ -0,0 +1,36 @@
|
||||
[core] |
||||
pager = diff-so-fancy | less --tabs=4 -RFX |
||||
[color] |
||||
ui = auto |
||||
[color "diff-highlight"] |
||||
oldNormal = red bold |
||||
oldHighlight = red bold 52 |
||||
newNormal = green bold |
||||
newHighlight = green bold 22 |
||||
[color "diff"] |
||||
meta = yellow |
||||
frag = magenta bold |
||||
commit = yellow bold |
||||
old = red bold |
||||
new = green bold |
||||
whitespace = red reverse |
||||
[diff-so-fancy] |
||||
markEmptyLines = false |
||||
changeHunkIndicators = false |
||||
stripLeadingSymbols = false |
||||
useUnicodeRuler = true |
||||
[rerere] |
||||
enabled = true |
||||
[pull] |
||||
rebase = false |
||||
|
||||
# Esto permite tener un usuario y correo diferente para el trabajo, |
||||
# proyectos con mi nombre real y proyectos bajo mi alias |
||||
[includeIf "gitdir:~/Trabajo/"] |
||||
path = ~/Trabajo/.gitconfig |
||||
[includeIf "gitdir:~/.compartido/Trabajo/"] |
||||
path = ~/Trabajo/.gitconfig |
||||
[includeIf "gitdir:~/.Proyectos/real/"] |
||||
path = ~/Proyectos/real/.gitconfig |
||||
[includeIf "gitdir:~/.Proyectos/alias/"] |
||||
path = ~/Personal/alias/.gitconfig |
@ -0,0 +1,3 @@
|
||||
opacity-rule = [ |
||||
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" |
||||
]; |
@ -0,0 +1,49 @@
|
||||
[global] |
||||
font = Hack 10 |
||||
markup = yes |
||||
format = "<b>%s</b>\n%b" |
||||
sort = yes |
||||
indicate_hidden = yes |
||||
alignment = left |
||||
bounce_freq = 0 |
||||
show_age_threshold = 60 |
||||
word_wrap = yes |
||||
ignore_newline = no |
||||
geometry = "300x5-30+20" |
||||
shrink = no |
||||
transparency = 0 |
||||
idle_threshold = 120 |
||||
monitor = 0 |
||||
follow = mouse |
||||
sticky_history = yes |
||||
history_length = 20 |
||||
show_indicators = yes |
||||
line_height = 0 |
||||
separator_height = 2 |
||||
padding = 8 |
||||
horizontal_padding = 8 |
||||
separator_color = frame |
||||
startup_notification = false |
||||
dmenu = /usr/bin/dmenu -p dunst: |
||||
browser = /usr/bin/firefox -new-tab |
||||
icon_position = off |
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ |
||||
frame_width = 4 |
||||
frame_color = "#98C379" |
||||
[shortcuts] |
||||
close = ctrl+space |
||||
close_all = ctrl+shift+space |
||||
history = ctrl+period |
||||
context = ctrl+shift+period |
||||
[urgency_low] |
||||
background = "#282c34" |
||||
foreground = "#bbc2cf" |
||||
timeout = 10 |
||||
[urgency_normal] |
||||
background = "#282c34" |
||||
foreground = "#bbc2cf" |
||||
timeout = 20 |
||||
[urgency_critical] |
||||
background = "#2B0000" |
||||
foreground = "#bbc2cf" |
||||
timeout = 0 |
@ -0,0 +1,13 @@
|
||||
general { |
||||
interval = 5 |
||||
output_format = none |
||||
} |
||||
|
||||
order += "battery all" |
||||
|
||||
battery all { |
||||
format = "%status %percentage %remaining" |
||||
integer_battery_capacity = true |
||||
last_full_capacity = true |
||||
} |
||||
|
@ -0,0 +1,2 @@
|
||||
|
||||
rofi.theme: /usr/share/rofi/themes/Monokai.rasi |
@ -0,0 +1,3 @@
|
||||
#!/bin/sh |
||||
|
||||
xautolock -time 10 -locker "~/.i3/scripts/lock" & |
@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env python3 |
||||
# |
||||
# Copyright (C) 2016 James Murphy |
||||
# Licensed under the GPL version 2 only |
||||
# |
||||
# A battery indicator blocklet script for i3blocks |
||||
|
||||
import re |
||||
from subprocess import check_output |
||||
|
||||
status = check_output(['acpi'], universal_newlines=True) |
||||
|
||||
if not status: |
||||
# stands for no battery found |
||||
fulltext = "<span color='red'><span font='FontAwesome'>\uf00d \uf240</span></span>" |
||||
percentleft = 100 |
||||
else: |
||||
# if there is more than one battery in one laptop, the percentage left is |
||||
# available for each battery separately, although state and remaining |
||||
# time for overall block is shown in the status of the first battery |
||||
batteries = status.split("\n") |
||||
state_batteries=[] |
||||
commasplitstatus_batteries=[] |
||||
percentleft_batteries=[] |
||||
time = "" |
||||
for battery in batteries: |
||||
if battery!='': |
||||
state_batteries.append(battery.split(": ")[1].split(", ")[0]) |
||||
commasplitstatus = battery.split(", ") |
||||
if not time: |
||||
time = commasplitstatus[-1].strip() |
||||
# check if it matches a time |
||||
time = re.match(r"(\d+):(\d+)", time) |
||||
if time: |
||||
time = ":".join(time.groups()) |
||||
timeleft = " ({})".format(time) |
||||
else: |
||||
timeleft = "" |
||||
|
||||
p = int(commasplitstatus[1].rstrip("%\n")) |
||||
if p>0: |
||||
percentleft_batteries.append(p) |
||||
commasplitstatus_batteries.append(commasplitstatus) |
||||
state = state_batteries[0] |
||||
commasplitstatus = commasplitstatus_batteries[0] |
||||
if percentleft_batteries: |
||||
percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries)) |
||||
else: |
||||
percentleft = 0 |
||||
|
||||
# stands for charging |
||||
FA_LIGHTNING = "<span color='yellow'><span font='FontAwesome'>\uf0e7</span></span>" |
||||
|
||||
# stands for plugged in |
||||
FA_PLUG = "<span font='FontAwesome'>\uf1e6</span>" |
||||
|
||||
# stands for using battery |
||||
FA_BATTERY = "<span font='FontAwesome'>\uf240</span>" |
||||
|
||||
# stands for unknown status of battery |
||||
FA_QUESTION = "<span font='FontAwesome'>\uf128</span>" |
||||
|
||||
|
||||
if state == "Discharging": |
||||
fulltext = FA_BATTERY + " " |
||||
elif state == "Full": |
||||
fulltext = FA_PLUG + " " |
||||
timeleft = "" |
||||
elif state == "Unknown": |
||||
fulltext = FA_BATTERY + " " |
||||
timeleft = "" |
||||
else: |
||||
fulltext = FA_LIGHTNING + " " + FA_PLUG + " " |
||||
|
||||
def color(percent): |
||||
if percent < 10: |
||||
# exit code 33 will turn background red |
||||
return "#FFFFFF" |
||||
if percent < 20: |
||||
return "#FF3300" |
||||
if percent < 30: |
||||
return "#FF6600" |
||||
if percent < 40: |
||||
return "#FF9900" |
||||
if percent < 50: |
||||
return "#FFCC00" |
||||
if percent < 60: |
||||
return "#FFFF00" |
||||
if percent < 70: |
||||
return "#FFFF33" |
||||
if percent < 80: |
||||
return "#FFFF66" |
||||
return "#FFFFFF" |
||||
|
||||
form = '<span color="{}">{}%</span>' |
||||
fulltext += form.format(color(percentleft), percentleft) |
||||
fulltext += timeleft |
||||
|
||||
print(fulltext) |
||||
print(fulltext) |
||||
if percentleft < 10: |
||||
exit(33) |
@ -0,0 +1,34 @@
|
||||
#!/bin/bash |
||||
|
||||
sleep 0.01 |
||||
# i3lock blurred screen inspired by /u/patopop007 and the blog post |
||||
# http://plankenau.com/blog/post-10/gaussianlock |
||||
|
||||
# Timings are on an Intel i7-2630QM @ 2.00GHz |
||||
|
||||
# Dependencies: |
||||
# imagemagick |
||||
# i3lock |
||||
# scrot (optional but default) |
||||
|
||||
IMAGE=/tmp/i3lock.png |
||||
SCREENSHOT="scrot $IMAGE" # 0.46s |
||||
|
||||
# Alternate screenshot method with imagemagick. NOTE: it is much slower |
||||
# SCREENSHOT="import -window root $IMAGE" # 1.35s |
||||
|
||||
# Here are some imagemagick blur types |
||||
# Uncomment one to use, if you have multiple, the last one will be used |
||||
|
||||
# All options are here: http://www.imagemagick.org/Usage/blur/#blur_args |
||||
BLURTYPE="0x5" # 7.52s |
||||
#BLURTYPE="0x2" # 4.39s |
||||
#BLURTYPE="5x2" # 3.80s |
||||
#BLURTYPE="2x8" # 2.90s |
||||
#BLURTYPE="2x3" # 2.92s |
||||
|
||||
# Get the screenshot, add the blur and lock the screen with it |
||||
$SCREENSHOT |
||||
convert $IMAGE -blur $BLURTYPE $IMAGE |
||||
i3lock -i $IMAGE |
||||
rm $IMAGE |
@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env perl |
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr> |
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org> |
||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com> |
||||
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr> |
||||
|
||||
# This program is free software: you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation, either version 3 of the License, or |
||||
# (at your option) any later version. |
||||
|
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
|
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
use strict; |
||||
use warnings; |
||||
use utf8; |
||||
use Getopt::Long; |
||||
|
||||
binmode(STDOUT, ":utf8"); |
||||
|
||||
# default values |
||||
my $t_warn = $ENV{T_WARN} || 70; |
||||
my $t_crit = $ENV{T_CRIT} || 90; |
||||
my $chip = $ENV{SENSOR_CHIP} || ""; |
||||
my $temperature = -9999; |
||||
|
||||
sub help { |
||||
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n"; |
||||
print "-w <percent>: warning threshold to become yellow\n"; |
||||
print "-c <percent>: critical threshold to become red\n"; |
||||
print "--chip <chip>: sensor chip\n"; |
||||
exit 0; |
||||
} |
||||
|
||||
GetOptions("help|h" => \&help, |
||||
"w=i" => \$t_warn, |
||||
"c=i" => \$t_crit, |
||||
"chip=s" => \$chip); |
||||
|
||||
# Get chip temperature |
||||
open (SENSORS, "sensors -u $chip |") or die; |
||||
while (<SENSORS>) { |
||||
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) { |
||||
$temperature = $1; |
||||
last; |
||||
} |
||||
} |
||||
close(SENSORS); |
||||
|
||||
$temperature eq -9999 and die 'Cannot find temperature'; |
||||
|
||||
# Print short_text, full_text |
||||
print "$temperature°C\n"; |
||||
|
||||
# Print color, if needed |
||||
if ($temperature >= $t_crit) { |
||||
print "#FF0000\n"; |
||||
exit 33; |
||||
} elsif ($temperature >= $t_warn) { |
||||
print "#FFFC00\n"; |
||||
} |
||||
|
||||
exit 0; |
@ -0,0 +1,260 @@
|
||||
keycode 8 = |
||||
keycode 9 = Escape NoSymbol Escape |
||||
keycode 10 = 1 exclam 1 exclam bar exclamdown bar |
||||
keycode 11 = 2 quotedbl 2 quotedbl at oneeighth at |
||||
keycode 12 = 3 periodcentered 3 periodcentered numbersign sterling numbersign |
||||
keycode 13 = 4 dollar 4 dollar asciitilde dollar asciitilde |
||||
keycode 14 = 5 percent 5 percent onehalf threeeighths onehalf |
||||
keycode 15 = 6 ampersand 6 ampersand notsign fiveeighths notsign |
||||
keycode 16 = 7 slash 7 slash braceleft seveneighths braceleft |
||||
keycode 17 = 8 parenleft 8 parenleft bracketleft trademark bracketleft |
||||
keycode 18 = 9 parenright 9 parenright bracketright plusminus bracketright |
||||
keycode 19 = 0 equal 0 equal braceright degree braceright |
||||
keycode 20 = apostrophe question apostrophe question backslash questiondown backslash |
||||
keycode 21 = exclamdown questiondown exclamdown questiondown dead_tilde asciitilde dead_tilde |
||||
keycode 22 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server |
||||
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab |
||||
keycode 24 = q Q q Q at Greek_OMEGA at |
||||
keycode 25 = w W w W lstroke Lstroke lstroke |
||||
keycode 26 = e E e E EuroSign cent EuroSign |
||||
keycode 27 = r R r R paragraph registered paragraph |
||||
keycode 28 = t T t T tslash Tslash tslash |
||||
keycode 29 = y Y y Y leftarrow yen leftarrow |
||||
keycode 30 = u U u U downarrow uparrow downarrow |
||||
keycode 31 = i I i I rightarrow idotless rightarrow |
||||
keycode 32 = o O o O oslash Oslash oslash |
||||
keycode 33 = p P p P thorn THORN thorn |
||||
keycode 34 = dead_grave dead_circumflex dead_grave dead_circumflex bracketleft dead_abovering bracketleft |
||||
keycode 35 = plus asterisk plus asterisk bracketright dead_macron bracketright |
||||
keycode 36 = Return NoSymbol Return |
||||
keycode 37 = Control_L NoSymbol Control_L |
||||
keycode 38 = a A a A ae AE ae |
||||
keycode 39 = s S s S ssharp section ssharp |
||||
keycode 40 = d D d D eth ETH eth |
||||
keycode 41 = f F f F dstroke ordfeminine dstroke |
||||
keycode 42 = g G g G eng ENG eng |
||||
keycode 43 = h H h H hstroke Hstroke hstroke |
||||
keycode 44 = j J j J dead_hook dead_horn dead_hook |
||||
keycode 45 = k K k K kra ampersand kra |
||||
keycode 46 = l L l L lstroke Lstroke lstroke |
||||
keycode 47 = ntilde Ntilde ntilde Ntilde asciitilde dead_doubleacute asciitilde |
||||
keycode 48 = dead_acute dead_diaeresis dead_acute dead_diaeresis braceleft braceleft braceleft |
||||
keycode 49 = masculine ordfeminine masculine ordfeminine backslash backslash backslash |
||||
keycode 50 = Shift_L NoSymbol Shift_L |
||||
keycode 51 = ccedilla Ccedilla ccedilla Ccedilla braceright dead_breve braceright |
||||
keycode 52 = z Z z Z guillemotleft less guillemotleft |
||||
keycode 53 = x X x X guillemotright greater guillemotright |
||||
keycode 54 = c C c C cent copyright cent |
||||
keycode 55 = v V v V leftdoublequotemark leftsinglequotemark leftdoublequotemark |
||||
keycode 56 = b B b B rightdoublequotemark rightsinglequotemark rightdoublequotemark |
||||
keycode 57 = n N n N n N n |
||||
keycode 58 = m M m M mu masculine mu |
||||
keycode 59 = comma semicolon comma semicolon horizconnector multiply horizconnector |
||||
keycode 60 = period colon period colon periodcentered division periodcentered |
||||
keycode 61 = minus underscore minus underscore dead_belowdot dead_abovedot dead_belowdot |
||||
keycode 62 = Shift_R NoSymbol Shift_R |
||||
keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab |
||||
keycode 64 = Alt_L Meta_L Alt_L Meta_L |
||||
keycode 65 = space NoSymbol space |
||||
keycode 66 = Caps_Lock NoSymbol Caps_Lock |
||||
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 |
||||
keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 |
||||
keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 |
||||
keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 |
||||
keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 |
||||
keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 |
||||
keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 |
||||
keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 |
||||
keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 |
||||
keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 |
||||
keycode 77 = Num_Lock NoSymbol Num_Lock |
||||
keycode 78 = Scroll_Lock NoSymbol Scroll_Lock |
||||
keycode 79 = KP_Home 7 KP_Home 7 |
||||
keycode 80 = KP_Up 8 KP_Up 8 |
||||
keycode 81 = KP_Prior 9 KP_Prior 9 |
||||
keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode |
||||
keycode 83 = KP_Left 4 KP_Left 4 |
||||
keycode 84 = KP_Begin 5 KP_Begin 5 |
||||
keycode 85 = KP_Right 6 KP_Right 6 |
||||
keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode |
||||
keycode 87 = KP_End 1 KP_End 1 |
||||
keycode 88 = KP_Down 2 KP_Down 2 |
||||
keycode 89 = KP_Next 3 KP_Next 3 |
||||
keycode 90 = KP_Insert 0 KP_Insert 0 |
||||
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal |
||||
keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift |
||||
keycode 93 = |
||||
keycode 94 = less greater less greater bar brokenbar bar |
||||
keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 |
||||
keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 |
||||
keycode 97 = |
||||
keycode 98 = Katakana NoSymbol Katakana |
||||
keycode 99 = Hiragana NoSymbol Hiragana |
||||
keycode 100 = Henkan_Mode NoSymbol Henkan_Mode |
||||
keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana |
||||
keycode 102 = Muhenkan NoSymbol Muhenkan |
||||
keycode 103 = |
||||
keycode 104 = KP_Enter NoSymbol KP_Enter |
||||
keycode 105 = Control_R NoSymbol Control_R |
||||
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab |
||||
keycode 107 = Print Sys_Req Print Sys_Req |
||||
keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift |
||||
keycode 109 = Linefeed NoSymbol Linefeed |
||||
keycode 110 = Home NoSymbol Home |
||||
keycode 111 = Up NoSymbol Up |
||||
keycode 112 = Prior NoSymbol Prior |
||||
keycode 113 = Left NoSymbol Left |
||||
keycode 114 = Right NoSymbol Right |
||||
keycode 115 = End NoSymbol End |
||||
keycode 116 = Down NoSymbol Down |
||||
keycode 117 = Next NoSymbol Next |
||||
keycode 118 = Insert NoSymbol Insert |
||||
keycode 119 = Delete NoSymbol Delete |
||||
keycode 120 = |
||||
keycode 121 = XF86AudioMute NoSymbol XF86AudioMute |
||||
keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume |
||||
keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume |
||||
keycode 124 = XF86PowerOff NoSymbol XF86PowerOff |
||||
keycode 125 = KP_Equal NoSymbol KP_Equal |
||||
keycode 126 = plusminus NoSymbol plusminus |
||||
keycode 127 = Pause Break Pause Break |
||||
keycode 128 = XF86LaunchA NoSymbol XF86LaunchA |
||||
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal |
||||
keycode 130 = Hangul NoSymbol Hangul |
||||
keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja |
||||
keycode 132 = |
||||
keycode 133 = Super_L NoSymbol Super_L |
||||
keycode 134 = Super_R NoSymbol Super_R |
||||
keycode 135 = Super_L NoSymbol Super_L |
||||
keycode 136 = Cancel NoSymbol Cancel |
||||
keycode 137 = Redo NoSymbol Redo |
||||
keycode 138 = SunProps NoSymbol SunProps |
||||
keycode 139 = Undo NoSymbol Undo |
||||
keycode 140 = SunFront NoSymbol SunFront |
||||
keycode 141 = XF86Copy NoSymbol XF86Copy |
||||
keycode 142 = SunOpen NoSymbol SunOpen |
||||
keycode 143 = XF86Paste NoSymbol XF86Paste |
||||
keycode 144 = Find NoSymbol Find |
||||
keycode 145 = XF86Cut NoSymbol XF86Cut |
||||
keycode 146 = Help NoSymbol Help |
||||
keycode 147 = XF86MenuKB NoSymbol XF86MenuKB |
||||
keycode 148 = XF86Calculator NoSymbol XF86Calculator |
||||
keycode 149 = |
||||
keycode 150 = XF86Sleep NoSymbol XF86Sleep |
||||
keycode 151 = XF86WakeUp NoSymbol XF86WakeUp |
||||
keycode 152 = XF86Explorer NoSymbol XF86Explorer |
||||
keycode 153 = XF86Send NoSymbol XF86Send |
||||
keycode 154 = |
||||
keycode 155 = XF86Xfer NoSymbol XF86Xfer |
||||
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 |
||||
keycode 157 = XF86Launch2 NoSymbol XF86Launch2 |
||||
keycode 158 = XF86WWW NoSymbol XF86WWW |
||||
keycode 159 = XF86DOS NoSymbol XF86DOS |
||||
keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver |
||||
keycode 161 = |
||||
keycode 162 = XF86RotateWindows NoSymbol XF86RotateWindows |
||||
keycode 163 = XF86Mail NoSymbol XF86Mail |
||||
keycode 164 = XF86Favorites NoSymbol XF86Favorites |
||||
keycode 165 = XF86MyComputer NoSymbol XF86MyComputer |
||||
keycode 166 = XF86Back NoSymbol XF86Back |
||||
keycode 167 = XF86Forward NoSymbol XF86Forward |
||||
keycode 168 = |
||||
keycode 169 = XF86Eject NoSymbol XF86Eject |
||||
keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject |
||||
keycode 171 = XF86AudioNext NoSymbol XF86AudioNext |
||||
keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause |
||||
keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev |
||||
keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject |
||||
keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord |
||||
keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind |
||||
keycode 177 = XF86Phone NoSymbol XF86Phone |
||||
keycode 178 = |
||||
keycode 179 = XF86Tools NoSymbol XF86Tools |
||||
keycode 180 = XF86HomePage NoSymbol XF86HomePage |
||||
keycode 181 = XF86Reload NoSymbol XF86Reload |
||||
keycode 182 = XF86Close NoSymbol XF86Close |
||||
keycode 183 = |
||||
keycode 184 = |
||||
keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp |
||||
keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown |
||||
keycode 187 = parenleft NoSymbol parenleft |
||||
keycode 188 = parenright NoSymbol parenright |
||||
keycode 189 = XF86New NoSymbol XF86New |
||||
keycode 190 = Redo NoSymbol Redo |
||||
keycode 191 = XF86Tools NoSymbol XF86Tools |
||||
keycode 192 = XF86Launch5 NoSymbol XF86Launch5 |
||||
keycode 193 = XF86Launch6 NoSymbol XF86Launch6 |
||||
keycode 194 = XF86Launch7 NoSymbol XF86Launch7 |
||||
keycode 195 = XF86Launch8 NoSymbol XF86Launch8 |
||||
keycode 196 = XF86Launch9 NoSymbol XF86Launch9 |
||||
keycode 197 = |
||||
keycode 198 = |
||||
keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle |
||||
keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn |
||||
keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff |
||||
keycode 202 = |
||||
keycode 203 = Mode_switch NoSymbol Mode_switch |
||||
keycode 204 = NoSymbol Alt_L NoSymbol Alt_L |
||||
keycode 205 = NoSymbol Meta_L NoSymbol Meta_L |
||||
keycode 206 = NoSymbol Super_L NoSymbol Super_L |
||||
keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L |
||||
keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay |
||||
keycode 209 = XF86AudioPause NoSymbol XF86AudioPause |
||||
keycode 210 = XF86Launch3 NoSymbol XF86Launch3 |
||||
keycode 211 = XF86Launch4 NoSymbol XF86Launch4 |
||||
keycode 212 = XF86LaunchB NoSymbol XF86LaunchB |
||||
keycode 213 = XF86Suspend NoSymbol XF86Suspend |
||||
keycode 214 = XF86Close NoSymbol XF86Close |
||||
keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay |
||||
keycode 216 = XF86AudioForward NoSymbol XF86AudioForward |
||||
keycode 217 = |
||||
keycode 218 = Print NoSymbol Print |
||||
keycode 219 = |
||||
keycode 220 = XF86WebCam NoSymbol XF86WebCam |
||||
keycode 221 = |
||||
keycode 222 = |
||||
keycode 223 = XF86Mail NoSymbol XF86Mail |
||||
keycode 224 = XF86Messenger NoSymbol XF86Messenger |
||||
keycode 225 = XF86Search NoSymbol XF86Search |
||||
keycode 226 = XF86Go NoSymbol XF86Go |
||||
keycode 227 = XF86Finance NoSymbol XF86Finance |
||||
keycode 228 = XF86Game NoSymbol XF86Game |
||||
keycode 229 = XF86Shop NoSymbol XF86Shop |
||||
keycode 230 = |
||||
keycode 231 = Cancel NoSymbol Cancel |
||||
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown |
||||
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp |
||||
keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia |
||||
keycode 235 = XF86Display NoSymbol XF86Display |
||||
keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff |
||||
keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown |
||||
keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp |
||||
keycode 239 = XF86Send NoSymbol XF86Send |
||||
keycode 240 = XF86Reply NoSymbol XF86Reply |
||||
keycode 241 = XF86MailForward NoSymbol XF86MailForward |
||||
keycode 242 = XF86Save NoSymbol XF86Save |
||||
keycode 243 = XF86Documents NoSymbol XF86Documents |
||||
keycode 244 = XF86Battery NoSymbol XF86Battery |
||||
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth |
||||
keycode 246 = XF86WLAN NoSymbol XF86WLAN |
||||
keycode 247 = |
||||
keycode 248 = |
||||
keycode 249 = |
||||
keycode 250 = |
||||
keycode 251 = |
||||
keycode 252 = |
||||
keycode 253 = |
||||
keycode 254 = |
||||
keycode 255 = |
||||
! |
||||
! Swap Caps_Lock and Control_L |
||||
! |
||||
remove Lock = Caps_Lock |
||||
remove Control = Control_L |
||||
keysym Control_L = Caps_Lock |
||||
keysym Caps_Lock = Control_L |
||||
add Lock = Caps_Lock |
||||
add Control = Control_L |
||||
! |
||||
! Arreglar las putas ctrl + flechas |
||||
! |
@ -0,0 +1,53 @@
|
||||
# Generic |
||||
alias rm="$HOME/bin/safer.sh" |
||||
alias ipcurl='curl icanhazip.com && curl --silent https://geoiptool.com/|grep maker_country | cut -d" " -f5 | cut -d"<" -f1 | head -n1' |
||||
alias toripcurl='torify curl icanhazip.com && torify curl --silent http://geoiptool.com/|grep maker_country | cut -d" " -f5 | cut -d"<" -f1 | head -n1' |
||||
alias grep="grep --color" |
||||
alias notify-send='notify-send -i terminal' |
||||
alias ec="emacsclient -t" |
||||
alias rmr="/bin/rm" |
||||
alias watch='watch -n1' |
||||
alias cwd='pwd | tr -d "\r\n" | xclip -selection clipboard' |
||||
alias alarm="notify-send -u critical \"Ya ha terminado el proceso\"" |
||||
alias finished="echo \"Ya ha terminado el proceso\" | espeak -ves 2> /dev/null" |
||||
alias cat="ccat" |
||||
alias ls="exa" |
||||
alias how="howdoi" |
||||
|
||||
# Apps |
||||
alias alpine='docker run -ti -v `pwd`:/data alpine sh' |
||||
alias linkcheck='docker run -ti registry.daemons.it/linkcheck' |
||||
alias cjira='docker run -ti -v $HOME/.jira-cl.json:/root/.jira-cl.json registry.daemons.it/jira' |
||||
|
||||
# Kubernetes, copied from oh my zsh plugin |
||||
alias kaf='kubectl apply -f' |
||||
alias keti='kubectl exec -ti' |
||||
alias kgp='kubectl get pods' |
||||
alias kgs='kubectl get svc' |
||||
alias kgi='kubectl get ingress' |
||||
alias kgsec='kubectl get secret' |
||||
alias kgd='kubectl get deployment' |
||||
alias kgrs='kubectl get rs' |
||||
alias kl='kubectl logs' |
||||
alias klf='kubectl logs -f' |
||||
|
||||
# History |
||||
alias hist='history -E -20' |
||||
|
||||
# Terraform |
||||
alias tf="terraform" |
||||
alias tfa="terraform apply" |
||||
alias tfi="terraform init; alarm" |
||||
alias tfaa="terraform apply --auto-approve; alarm" |
||||
alias tfp="terraform plan; alarm" |
||||
alias tfd="terraform destroy; alarm" |
||||
|
||||
# Alertmanager |
||||
# Config https://github.com/prometheus/alertmanager#configuration |
||||
alertmanager_version="v0.15.1" |
||||
alias amtool="docker run --name amtool --rm -ti --entrypoint amtool -v $HOME/.config/amtool/config.yml:/root/.config/amtool/config.yml quay.io/prometheus/alertmanager:$alertmanager_version" |
||||
alias amta="amtool alert" |
||||
alias amts="amtool silence" |
||||
alias amtsa="amtool silence add" |
||||
alias amtse="amtool silence expire" |
||||
alias amtsall="amtool silence add --duration=2h --start=$(date --utc --rfc-3339=seconds | sed 's/ /T/') --comment 'Estamos en ello.' severity=~'info|warning|critical'" |
@ -0,0 +1,96 @@
|
||||
# Path |
||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/sbin:/usr/local/bin" |
||||
|
||||
# Prompt verde |
||||
#PS1='\[\e[0;92m\]\u\[\e[0;93m\] % \[\e[0;92m\]\h \[\e[1;93m\]\w\[\e[0;92m\]\$ ' |
||||
# Prompt azul |
||||
PS1='\[\e[1;94m\]\u\[\e[0m\] % \[\e[1;91m\]\h \[\e[1;93m\]\w\[\e[1;34m\] $\[\033[0m\] ' |
||||
|
||||
# Terms típicas de emacs |
||||
[[ $TERM == "dumb" ]] && TERM=xterm; PS1='$ ' |
||||
[[ $TERM == "emacs" ]] && PS1='$ ' |
||||
[[ $TERM == "xterm" ]] && PS1='$ ' |
||||
|
||||
# Term |
||||
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then |
||||
TERM=linux |
||||
fi |
||||
|
||||
# Notificar correo nuevo |
||||
if [ -x /usr/bin/biff ]; then |
||||
biff y 2> /dev/null |
||||
fi |
||||
|
||||
# Usar scripts en /etc/profile.d/ |
||||
for profile_script in /etc/profile.d/*.sh ; do |
||||
if [ -x $profile_script ]; then |
||||
. $profile_script |
||||
fi |
||||
done |
||||
unset profile_script |
||||
|
||||
# Alias |
||||
source ~/.aliases |
||||
|
||||
# Python |
||||
export WORKON_HOME=~/.virtualenvs |
||||
source /usr/local/bin/virtualenvwrapper_lazy.sh |
||||
|
||||
export EDITOR="emacsclient -t -c" |
||||
export ALTERNATE_EDITOR="nano" |
||||
|
||||
ESC="\033" |
||||
NORMAL="\[$ESC[m\]" |
||||
RESET="\[$ESC[${DULL};${FG_WHITE};${BG_NULL}m\]" |
||||
|
||||
if [ -f /etc/bash_completion ]; then |
||||
. /etc/bash_completion |
||||
fi |
||||
PATH=$PATH:~/Scripts/bin:$HOME/.npm-bin/bin/ |
||||
PATH=$PATH:~/Scripts/bin:$HOME/bin |
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash |
||||
sleep 0.5 |
||||
|
||||
# --httptoolkit-- |
||||
# This section will be reset each time a HTTP Toolkit terminal is opened |
||||
if [ -n "$HTTP_TOOLKIT_ACTIVE" ]; then |
||||
# When HTTP Toolkit is active, we inject various overrides into PATH |
||||
export PATH="/opt/http-toolkit/resources/app/httptoolkit-server/overrides/path:$PATH" |
||||
|
||||
if command -v winpty >/dev/null 2>&1; then |
||||
# Work around for winpty's hijacking of certain commands |
||||
alias php=php |
||||
alias node=node |
||||
fi |
||||
fi |
||||
# --httptoolkit-end-- |
||||
# --httptoolkit-- |
||||
# This section will be reset each time a HTTP Toolkit terminal is opened |
||||
if [ -n "$HTTP_TOOLKIT_ACTIVE" ]; then |
||||
# When HTTP Toolkit is active, we inject various overrides into PATH |
||||
export PATH="/opt/http-toolkit/resources/app/httptoolkit-server/overrides/path:$PATH" |
||||
|
||||
if command -v winpty >/dev/null 2>&1; then |
||||
# Work around for winpty's hijacking of certain commands |
||||
alias php=php |
||||
alias node=node |
||||
fi |
||||
fi |
||||
# --httptoolkit-end-- |
||||
# --httptoolkit-- |
||||
# This section will be reset each time a HTTP Toolkit terminal is opened |
||||
if [ -n "$HTTP_TOOLKIT_ACTIVE" ]; then |
||||
# When HTTP Toolkit is active, we inject various overrides into PATH |
||||
export PATH="/home/ap/.local/share/httptoolkit-server/client/0.1.27/overrides/path:$PATH" |
||||
|
||||
if command -v winpty >/dev/null 2>&1; then |
||||
# Work around for winpty's hijacking of certain commands |
||||
alias php=php |
||||
alias node=node |
||||
fi |
||||
fi |
||||
# --httptoolkit-end-- |
||||
[[ -s "/home/ap/.gvm/scripts/gvm" ]] && source "/home/ap/.gvm/scripts/gvm" |
||||
export ELB_NAME='DEV-PORTAL-ELB-12-27-507' |
||||
export ASG_NAME='DEV-PORTAL-ASG-12.27.507-2021-06-25T12-13-36Z' |
@ -0,0 +1,211 @@
|
||||
# Busca en la basura |
||||
function busca() { |
||||
find "*$@*" ~/Trash/ |
||||
} |
||||
|
||||
function cdtemp() { |
||||
cd `mktemp -d` |
||||
} |
||||
|
||||
# Un bucle infinito facilitado |
||||
function always(){ |
||||
while true; |
||||
do |
||||
eval $1 |
||||
eval $2 |
||||
done |
||||
} |
||||
|
||||
# Check that the directories of the main directory are updated git repos |
||||
function git_updated() { |
||||
local ROOT=`pwd` |
||||
local gitstatus |
||||
|
||||
for dir in `ls --color=none | grep -v Archive` |
||||
do |
||||
if [[ -d $dir ]] |
||||
then |
||||
cd $dir |
||||
if [[ -d .git ]] |
||||
then |
||||
gitstatus="`git status -s | awk '{print $2}'`" |
||||
cd $ROOT |
||||
if [[ -n $gitstatus ]] |
||||
then |
||||
echo "- \033[0;31m$dir\033[0m:\n$gitstatus" |
||||
fi |
||||
else |
||||
# Recursion at it's finest |
||||
git_updated |
||||
cd $ROOT |
||||
fi |
||||
fi |
||||
done |
||||
} |
||||
|
||||
# fzf functions |
||||
## insert located file |
||||
fzf-locate-widget() { |
||||
local selected |
||||
if selected=$(locate / | fzf -q "$LBUFFER"); then |
||||
LBUFFER=$selected |
||||
fi |
||||
zle redisplay |
||||
} |
||||
zle -N fzf-locate-widget |
||||
bindkey '\ei' fzf-locate-widget |
||||
|
||||
## Git stuff |
||||
# fco - checkout git branch/tag |
||||
unalias gco |
||||
gco() { |
||||
local tags branches target |
||||
tags=$( |
||||
git tag | awk '{print "\x1b[31;1mtag\x1b[m\t" $1}') || return |
||||
branches=$( |
||||
git branch --all | grep -v HEAD | |
||||
sed "s/.* //" | sed "s#remotes/[^/]*/##" | |
||||
sort -u | awk '{print "\x1b[34;1mbranch\x1b[m\t" $1}') || return |
||||
target=$( |
||||
(echo "$tags"; echo "$branches") | |
||||
fzf-tmux -l30 -- --no-hscroll --ansi +m -d "\t" -n 2) || return |
||||
git checkout $(echo "$target" | awk '{print $2}') |
||||
} |
||||
|
||||
# warn_me about stuff at any time |
||||
function warn_me (){ |
||||
echo "notify-send --urgency=critical \"$1\"" | at $2 |
||||
} |
||||
|
||||
|
||||
# Kubectl functions |
||||
function kube_dump_logs(){ |
||||
local deploy="$1" |
||||
local namespace="$2" |
||||
local time="$3" |
||||
|
||||
if [[ -z "$deploy" ]] |
||||
then |
||||
echo "You must pass a kubernetes deployment as an argument." |
||||
return 1 |
||||
fi |
||||
if [[ -z "$time" ]] |
||||
then |
||||
time=1h |
||||
fi |
||||
|
||||
if [[ -z "$namespace" ]] |
||||
then |
||||
namespace_param="-n default" |
||||
else |
||||
namespace_param="-n $namespace" |
||||
fi |
||||
|
||||
mkdir -p "$deploy" |
||||
|
||||
for pod in $(kube_get_deploy_pods $deploy $namespace) |
||||
do |
||||
echo Dumping "$pod" ... |
||||
eval kubectl logs "$pod" --since="$time" "$namespace_param" > "$deploy"/"$pod" |
||||
done |
||||
echo "Dumped $deploy logs." |
||||
} |
||||
|
||||
function kube_get_deploy_pods(){ |
||||
local deploy="$1" |
||||
local namespace="$2" |
||||
|
||||
if [[ -z "$deploy" ]] |
||||
then |
||||
echo "You must pass a kubernetes deployment as an argument." |
||||
return 1 |
||||
fi |
||||
if [[ -z "$namespace" ]] |
||||
then |
||||
namespace="-n default" |
||||
else |
||||
namespace="-n $namespace" |
||||
fi |
||||
|
||||
eval kubectl get pods $namespace | grep "$deploy" | cut -d ' ' -f1 |
||||
} |
||||
|
||||
# Crea un pod de debian si no existe y lo borra al terminar |
||||
function kdebian(){ |
||||
echo "apt update; apt install -y curl" | xclip |
||||
kubectl run --generator=run-pod/v1 -ti --rm debian --image=debian |
||||
} |
||||
|
||||
function kbash(){ |
||||
kubectl exec -ti $1 bash |
||||
} |
||||
|
||||
function ksh(){ |
||||
kubectl exec -ti $1 sh |
||||
} |
||||
|
||||
# Docker |
||||
## Reveal |
||||
function reveal () { |
||||
function async () |
||||
{ |
||||
sleep 3 && xdg-open http:localhost:8000 |
||||
} |
||||
async &! |
||||
docker run -ti --name registry.daemons.it/reveal --rm -v `pwd`:/revealjs/files/ -p 127.0.0.1:8000:8000 revealjs |
||||
} |
||||
|
||||
## reveal-md |
||||
function revealmd () { |
||||
async () { |
||||
sleep 3 && xdg-open http:localhost:1948/main.md |
||||
} |
||||
async &! |
||||
docker run -ti --rm -v `pwd`:/revealjs/files/ -p 127.0.0.1:1948:1948 registry.daemons.it/reveal-md |
||||
} |
||||
|
||||
function nginx_this(){ |
||||
docker stop nginx_this &> /dev/null |
||||
docker run -d --rm -v `pwd`:/usr/share/nginx/html --name nginx_this -p \ |
||||
127.0.0.1:2000:80 nginx:alpine |
||||
# open browser |
||||
firefox "http://127.0.0.1:2000" |
||||
} |
||||
|
||||
function promtool(){ |
||||
docker run -ti -v `pwd`:/data --entrypoint promtool --workdir /data prom/prometheus:v2.17.1 "$@" |
||||
} |
||||
|
||||
function kterm (){ |
||||
image=$1 |
||||
tag=$2 |
||||
if [[ -z $tag ]] |
||||
then |
||||
tag=latest |
||||
fi |
||||
kubectl run --generator=run-pod/v1 -ti --rm kterm --image=$image:$tag sh |
||||
} |
||||
|
||||
function dterm (){ |
||||
image=$1 |
||||
tag=$2 |
||||
if [[ -z $tag ]] |
||||
then |
||||
tag=latest |
||||
fi |
||||
bash_exists=$(docker run -ti $image:$tag sh -c "command -v bash") |
||||
if [[ -n $bash_exists ]] |
||||
then |
||||
docker run -ti --network host $image:$tag bash |
||||
else |
||||
docker run -ti --network host $image:$tag sh |
||||
fi |
||||
} |
||||
|
||||
function helmfile (){ |
||||
docker run -ti -v `pwd`:/data -w /data -v \ |
||||
$HOME/bin/helmify-kustomize:/usr/local/bin/helmify-kustomize:ro -v \ |
||||
$HOME/.kube:/root/.kube:ro -e \ |
||||
KUBECONFIG=/root/.kube/$(basename `echo $KUBECONFIG`) \ |
||||
quay.io/roboll/helmfile:helm3-v0.140.0 helmfile "$@" |
||||
} |
@ -0,0 +1,94 @@
|
||||
# Debug |
||||
# set -x |
||||
# zmodload zsh/zprof |
||||
|
||||
# Ruta de oh-my-zsh |
||||
export ZSH=$HOME/.oh-my-zsh |
||||
|
||||
# Instala cosas |
||||
if [[ ! -a ~/Instalados/zsh-interactive-cd ]]; then |
||||
git clone https://github.com/changyuheng/zsh-interactive-cd ~/Instalados/zsh-interactive-cd |
||||
fi |
||||
|
||||
|
||||
# Modify path |
||||
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/sbin:/usr/local/bin" |
||||
export PATH="$PATH:$HOME/bin/" |
||||
export PATH="$PATH:$HOME/.bin/" |
||||
export PATH="$PATH:$HOME/.local/bin" |
||||
export PATH="$PATH:/$HOME/.emacs.d/bin/" |
||||
export PATH="$PATH:/opt/go/bin" |
||||
export PATH="$PATH:/opt/brew/bin/" |
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" |
||||
export GOPATH=/opt/go |
||||
|
||||
# Cargar los programas instalados |
||||
source $HOME/Instalados/zsh-interactive-cd/zsh-interactive-cd.plugin.zsh |
||||
source /usr/share/z/z.sh |
||||
# fzf: automatically selects the item if there's only one |
||||
export FZF_CTRL_T_OPTS="--select-1 --exit-0" |
||||
|
||||
# fzf The following example uses tree command to show the entries of the directory |
||||
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -200'" |
||||
|
||||
# Full command on preview window |
||||
export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'" |
||||
|
||||
# Term |
||||
export TERM="xterm-256color" |
||||
|
||||
# Prompt ZSH |
||||
eval "$(starship init zsh)" |
||||
|
||||
# No comprobar si hay actualizaciones |
||||
DISABLE_AUTO_UPDATE="true" |
||||
|
||||
# No corregir errores |
||||
ENABLE_CORRECTION="false" |
||||
|
||||
# Mostrar puntos rojos mientras se espera el completado |
||||
COMPLETION_WAITING_DOTS="true" |
||||
|
||||
# Formato de tiempo |
||||