From 728b00c2caf172048a711891d82b12ec4c6d3ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 29 Jun 2024 18:12:34 +0200 Subject: [PATCH] update README.md and check_dependencies.sh, use Hyprland without path --- README.md | 31 ++++++++++++++++- check_dependencies.sh | 78 +++++++++++++++++++++++++------------------ shell/.profile | 4 +-- 3 files changed, 78 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 9caaaeb..3081e5f 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,40 @@ Lupan's config files Installation ------------ +Install Hyprland +---------------- + To reproduce my environment clone this repo into `~/dotfiles` and check that you have required programs in your `PATH` with ``` -$ sh check_dependencies.sh +$ sh check_dependencies.sh hypr +``` + +Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip). + +Install proper configurations with + +``` +$ stow shell hyprland alacritty xsession nvim yazi +``` + +Where `xsession` is just to install `lupan-set-theme` script, `nvim` and `yazi` may be skipped if you do not use them. + +Change to `zsh` as your login shell with + +``` +$ chsh -s /usr/bin/zsh +``` + +Install DWM (old) +----------------- + +To reproduce my environment clone this repo into `~/dotfiles` and check +that you have required programs in your `PATH` with + +``` +$ sh check_dependencies.sh dwm ``` Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip). diff --git a/check_dependencies.sh b/check_dependencies.sh index 0252844..36f54f8 100644 --- a/check_dependencies.sh +++ b/check_dependencies.sh @@ -1,37 +1,51 @@ #!/bin/sh +REQUIRED="$1" + +check_dependency() { + local CMD="$1" + shift + for REQ in "$@"; do + if [ "$REQ" = "$REQUIRED" ]; then + which "$CMD" + break + fi + done +} + echo '# required:' -for CMD in \ - zsh \ - git \ - cc \ - make \ - setxkbmap \ - slock \ - systemctl \ - xmodmap \ - xrandr \ - xrdb \ - xset \ - xsetroot \ - hsetroot \ - xsettingsd \ - sed \ - pkill \ - dmenu \ - dmenu_run \ - xss-lock \ - exa \ - fzf \ - ; do - which "$CMD" -done + +check_dependency zsh dwm hypr +check_dependency git dwm hypr +check_dependency cc dwm +check_dependency make dwm +check_dependency setxkbmap dwm +check_dependency slock dwm +check_dependency systemctl dwm hypr +check_dependency xmodmap dwm +check_dependency xrandr dwm +check_dependency xrdb dwm +check_dependency xset dwm +check_dependency xsetroot dwm +check_dependency hsetroot dwm +check_dependency xsettingsd dwm +check_dependency sed dwm hypr +check_dependency pkill dwm +check_dependency dmenu dwm +check_dependency dmenu_run dwm +check_dependency xss-lock dwm +check_dependency exa dwm hypr +check_dependency fzf dwm hypr +check_dependency Hyprland hypr +check_dependency hyprctl hypr +check_dependency alacritty hypr +check_dependency swaylock hypr +check_dependency waybar hypr +check_dependency wofi hypr echo -e '\n# optional:' -for CMD in \ - sx \ - picom \ - compton \ - xbacklight; do - which "$CMD" -done + +check_dependency sx dwm +check_dependency picom dwm +check_dependency compton dwm +check_dependency xbacklight dwm diff --git a/shell/.profile b/shell/.profile index abeb571..24f21af 100644 --- a/shell/.profile +++ b/shell/.profile @@ -29,8 +29,8 @@ export PATH # start X or Hyprland at login if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then - if which /usr/bin/Hyprland > /dev/null; then - exec /usr/bin/Hyprland + if which Hyprland > /dev/null; then + exec Hyprland elif which /usr/bin/sx > /dev/null; then exec /usr/bin/sx ~/.xsession fi