From 5d631bd3ad7f78e8ca69d7001cada582fcd8d18f Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 30 Dec 2023 11:47:56 +0000 Subject: Add several packages --- Makefile | 6 +++++- aliases/.config/aliasrc | 18 ++++++++++++++++++ bin/.local/bin/remaps | 4 ++++ bin/.local/bin/statusbar/battery | 11 +++++++++++ bin/.local/bin/statusbar/clock | 3 +++ statusbar/.local/bin/statusbar/battery | 11 ----------- statusbar/.local/bin/statusbar/clock | 3 --- wget/.config/wget/wgetrc | 1 + xinit/.config/xinitrc | 10 ++++++++++ xprofile/.config/xprofile | 4 ++++ zsh/.config/zsh/zprofile | 5 +++++ 11 files changed, 61 insertions(+), 15 deletions(-) create mode 100644 aliases/.config/aliasrc create mode 100755 bin/.local/bin/remaps create mode 100755 bin/.local/bin/statusbar/battery create mode 100755 bin/.local/bin/statusbar/clock delete mode 100755 statusbar/.local/bin/statusbar/battery delete mode 100755 statusbar/.local/bin/statusbar/clock create mode 100644 wget/.config/wget/wgetrc create mode 100644 xinit/.config/xinitrc create mode 100644 xprofile/.config/xprofile diff --git a/Makefile b/Makefile index bbbf6a1..d49f359 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,13 @@ clean: rm -f $$HOME/.profile + rm -f $$HOME/.xinitrc + rm -f $$HOME/.xprofile rm -f $$HOME/.zprofile stow --verbose --target=$$HOME --delete */ install: stow --verbose --target=$$HOME --restow */ - ln -s $$HOME/.config/zsh/zprofile $$HOME/.zprofile + ln -s $$HOME/.config/xinitrc $$HOME/.xinitrc + ln -s $$HOME/.config/xprofile $$HOME/.xprofile ln -s $$HOME/.config/zsh/zprofile $$HOME/.profile + ln -s $$HOME/.config/zsh/zprofile $$HOME/.zprofile diff --git a/aliases/.config/aliasrc b/aliases/.config/aliasrc new file mode 100644 index 0000000..969d5c2 --- /dev/null +++ b/aliases/.config/aliasrc @@ -0,0 +1,18 @@ +alias ls="ls -hN --color=auto --group-directories-first" +alias ll='ls -l' + +alias cp='cp -iv' +alias rm='rm -iv' +alias mv='mv -iv' + +alias grep="grep --color=auto" +alias diff="diff --color=auto" + +# Git +alias gs='git status' +alias ga='git add' +alias gb='git branch' +alias gc='git commit' +alias gd='git diff' +alias go='git checkout' +alias gl='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short' diff --git a/bin/.local/bin/remaps b/bin/.local/bin/remaps new file mode 100755 index 0000000..4cd25d4 --- /dev/null +++ b/bin/.local/bin/remaps @@ -0,0 +1,4 @@ +#!/bin/sh + +setxkbmap -layout gb +setxkbmap -option caps:super diff --git a/bin/.local/bin/statusbar/battery b/bin/.local/bin/statusbar/battery new file mode 100755 index 0000000..9373375 --- /dev/null +++ b/bin/.local/bin/statusbar/battery @@ -0,0 +1,11 @@ +#!/bin/sh + +for battery in /sys/class/power_supply/BAT? +do + # Get its remaining capacity and charge status. + capacity=$(cat "$battery"/capacity 2>/dev/null) || break + status=$(cat "$battery"/status 2>/dev/null) || break + + printf "[%s%%]%s " "$capacity" "$status" + unset warn +done diff --git a/bin/.local/bin/statusbar/clock b/bin/.local/bin/statusbar/clock new file mode 100755 index 0000000..d2b8a51 --- /dev/null +++ b/bin/.local/bin/statusbar/clock @@ -0,0 +1,3 @@ +#!/bin/sh + +date +"%d %B %Y %R" diff --git a/statusbar/.local/bin/statusbar/battery b/statusbar/.local/bin/statusbar/battery deleted file mode 100755 index 9373375..0000000 --- a/statusbar/.local/bin/statusbar/battery +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -for battery in /sys/class/power_supply/BAT? -do - # Get its remaining capacity and charge status. - capacity=$(cat "$battery"/capacity 2>/dev/null) || break - status=$(cat "$battery"/status 2>/dev/null) || break - - printf "[%s%%]%s " "$capacity" "$status" - unset warn -done diff --git a/statusbar/.local/bin/statusbar/clock b/statusbar/.local/bin/statusbar/clock deleted file mode 100755 index d2b8a51..0000000 --- a/statusbar/.local/bin/statusbar/clock +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -date +"%d %B %Y %R" diff --git a/wget/.config/wget/wgetrc b/wget/.config/wget/wgetrc new file mode 100644 index 0000000..4445aa6 --- /dev/null +++ b/wget/.config/wget/wgetrc @@ -0,0 +1 @@ +hsts-file=~/.cache/wget/wget-hsts diff --git a/xinit/.config/xinitrc b/xinit/.config/xinitrc new file mode 100644 index 0000000..ec388f3 --- /dev/null +++ b/xinit/.config/xinitrc @@ -0,0 +1,10 @@ +#!/bin/sh + +# xinitrc runs when you run starx + +# Source xprofile as that contains commands that need run whenever we startx. +# Commands are kept in xprofile as that will run automatically if a display manager is used when logging in. +. ~/.xprofile + +exec dwm + diff --git a/xprofile/.config/xprofile b/xprofile/.config/xprofile new file mode 100644 index 0000000..3581af3 --- /dev/null +++ b/xprofile/.config/xprofile @@ -0,0 +1,4 @@ +#!/bin/sh + +remaps & # Sets correct keyboard layout and remaps some keys to make life easier in dwm. +dwmblocks & diff --git a/zsh/.config/zsh/zprofile b/zsh/.config/zsh/zprofile index 9f45164..a737d5b 100644 --- a/zsh/.config/zsh/zprofile +++ b/zsh/.config/zsh/zprofile @@ -13,3 +13,8 @@ export XDG_CACHE_HOME="$HOME/.cache" export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh" export LESSHISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/less/history" export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc" + +## StartX when first logging in. +if [[ "$(tty)" = "/dev/tty1" ]]; then + pgrep dwm || startx +fi -- cgit v1.2.3-13-gbd6f