Code Monkey home page Code Monkey logo

dotfiles's Introduction

Heeeeeey!! <👋>

You should check out these amazing repos I contributed to! 👇

dotfiles's People

Contributors

aurkenb avatar dependabot[bot] avatar rgomezcasas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotfiles's Issues

Listado de comandos disponibles en "dot" es muy lento, ejecuta un sh por cada item disponible.

Hola Rafa

En relación a "dot". Noté que tarda en printar los comandos disponibles. Señalo la línea que se lleva el tiempo de ejecución.

xargs -I % sh -c 'echo "$(basename $(dirname %)) $(basename %)"' |

Que te parece reemplazar
xargs -I % sh -c 'echo "$(basename $(dirname %)) $(basename %)"' |
por
awk -F"/" '{print $(NF-1) " " $NF}' |

de esa manera te evitas abrir un nuevo sh para ejecutar el echo y la ejecución pasa a ser instantánea.

Siento tener poco tiempo para subir un PR. Será para la próxima!

Fantástico codebase, me haz hecho tremendamente feliz 🥇 🥇 🥇 🥇

Installer not found

Hi,
I tried to follow the Readme, but the bash installer command is failing.
I also tried to find this installer on this repository, but can't.
How I can install the dotfiles?

$ bash <(curl -s https://raw.githubusercontent.com/rgomezcasas/dotfiles/master/installer)

/dev/fd/11: line 1: 404:: command not found
$ curl -s https://raw.githubusercontent.com/rgomezcasas/dotfiles/master/installer
404: Not Found%
$ curl -i https://raw.githubusercontent.com/rgomezcasas/dotfiles/master/installer
HTTP/2 404
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
content-type: text/plain; charset=utf-8
x-github-request-id: 14D8:6572:2A1F08:2DAEA1:61CF11DA
accept-ranges: bytes
date: Fri, 31 Dec 2021 14:21:44 GMT
via: 1.1 varnish
x-served-by: cache-gig2250024-GIG
x-cache: HIT
x-cache-hits: 1
x-timer: S1640960504.367827,VS0,VE0
vary: Authorization,Accept-Encoding,Origin
access-control-allow-origin: *
x-fastly-request-id: 8ae61d668aa5bef411ff698557043864c9b31679
expires: Fri, 31 Dec 2021 14:26:44 GMT
source-age: 29
content-length: 14

404: Not Found%
$

tks

Some links were not successfully set up

I got this error during the installation

Some links were not successfully set up
Path exists /Users/dsf/.hushlogin
All paths have been set up

==> Some tasks were not executed successfully

and this message when I open the terminal

.dotfiles/terminal/init.sh:ulimit:1: setrlimit failed: invalid argument

Missing file

The file login_init.zsh is missing from the repo.

Used in shell/zsh/.zlogin

Not able to find the installer files

Hey,

Excellent repo and collection of dotfiles. However I am not able to install it with the commands in the readme. I see that the installer files doesn't exist in the repo.

bash <(curl -s https://raw.githubusercontent.com/rgomezcasas/dotfiles/master/installer)

Let me know what I should run to install it.

Thanks!

scripts, aliases, exports, shell con carga jerarquizada

Hola Rafa!

Veo una oportunidad de mejora muy buena:

Cuando cargas init.sh tomas todos los aliases, exports y funciones comunes a todas las plataformas. Entre los aliases veo que utilizas comandos propios de macos que no servirían para linux.

for aliasToSource in "$DOTFILES_PATH/shell/_aliases/"*; do source "$aliasToSource"; done
for exportToSource in "$DOTFILES_PATH/shell/_exports/"*; do source "$exportToSource"; done
for functionToSource in "$DOTFILES_PATH/shell/_functions/"*; do source "$functionToSource"; done

Claro que puedes tener branches por cada máquina pero eso genera varios inconvenientes. Creo que el desafío es tener alta portabilidad y moverse indistintamente entre plataformas u ordenadores sin inconvenientes.

Siguiendo con el principio DRY, te propongo una estructura de directorios jerarquizada, en el cual defines los aliases, funciones y exports comunes para todas las plataformas en all_platforms, y luego realizas las configuraciones particulares por plataforma o por máquina.

  • init.sh
  • all_platforms
  • linux
    • all.linux.aliases.sh
    • Machine1
      • machine1.aliases.sh
  • macos
    • Machine1
    • Machine2
  • windows

por ejemplo podrías tener una función browse en mac (dentro de /macos/functions/helpers.sh)

browse () {
  open -a "$DOTFILES_DEFAULT_BROWSER" $1
}

mientras que en linux (dentro de /linux/functions/helpers.sh)

browse () {
  sensible-browser  $1
}

El orden de carga sería
all_platforms/*
<tu_distribución>/*
<tu_distribución>/<tu_ordenador>/*

Por ejemplo con

platform_name=$(get_platform)
machine_name=$(hostname)

load_hierarchy=(
  "all_platforms"
  "$platform_name"
  "$platform_name/$machine_name"
)
load_file_order=(
  ".sh_exports" ".sh_functions" ".sh_aliases" "key_binds.sh" "prompt.sh"
)

# load all platform and shell functions, aliases, exports and key bindings.
# as an hierarchy. First: /shell/all_platforms, then /shell/<your_platform>,
# then /shell/<your_platform>/<your_machine>
for hierarchy in $load_hierarchy; do
  for load_file in $load_file_order; do
    source_path "$DOTFILES_PATH/shell/$hierarchy/$load_file"
  done
done

A su vez, podrías verificar si el recurso al que le harás source es un directorio o un fichero

# Source the file or directory specified in the path parameter.
#
# param $1 (path) the path to source. Cannot be null.
function source_path {
  if [[ -d "$1" ]]; then
    for script in $1/*; do source "$script"; done
  elif [[ -f "$1" ]]; then
    source $1
  fi
}

Tengo este cambio implementado en mi local. Si deseas abro un PR. Si no estás de acuerdo, simplemente cierra el issue que no me ofenderé. Tus comentarios son más que bienvenidos

Saludos!
Sebastián

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.