Expanded zsh configuration

This commit is contained in:
opalvault
2022-01-04 23:40:32 -08:00
parent fcdd49684b
commit fcb08caae1
11 changed files with 174 additions and 74 deletions
+3
View File
@@ -96,6 +96,9 @@
(setq tramp-default-method "ssh")
(use-package no-littering
:straight t)
;; (use-package modus-themes
;; :straight t
;; :init
+2 -2
View File
@@ -16,7 +16,7 @@ exec_always --no-startup-id dunst
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
@@ -39,7 +39,7 @@ font pango:Fira Code Regular 12
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# font pango:DejaVu Sans Mono 8
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
+6 -6
View File
@@ -12,10 +12,10 @@ order += "load"
order += "cpu_temperature 0"
order += "disk /"
order += "disk /home"
order += "ethernet enp1s0"
order += "wireless wlp2s0"
order += "ethernet enp0s13f0u2u1"
order += "wireless wlp0s20f3"
order += "volume master"
order += "battery 1"
order += "battery 0"
order += "tztime local"
load {
@@ -35,7 +35,7 @@ disk "/home" {
format = "<span background='#a1d569'>  %free Free </span>"
}
ethernet enp0s13f0u2u3 {
ethernet enp0s13f0u2u1 {
format_up = "<span background='#88c0d0'>  %ip </span>"
format_down = "<span background='#88c0d0'>  Disconnected </span>"
}
@@ -53,7 +53,7 @@ volume master {
mixer_idx = 0
}
battery 1 {
battery 0 {
last_full_capacity = true
format = "<span background='#a3be8c'>  %status %percentage </span>"
format_down = "No Battery"
@@ -61,7 +61,7 @@ battery 1 {
status_bat = "Battery"
status_unk = "Unknown"
status_full = "Charged"
path = "/sys/class/power_supply/BAT%d/uevent"
path = "/sys/class/power_supply/BAT0/uevent"
low_threshold = 10
}
+27
View File
@@ -0,0 +1,27 @@
# ~ Guix #
alias install="guix install"
alias remove="guix remove"
alias search="guix search"
alias pull="guix pull"
alias upgrade="guix package -u"
alias hreconfig="guix home reconfigure ~/dotfiles/guix/home/guix-home.scm"
# ~ Search history with up and down arrows ~ #
# Up Arrow
bind '"\e[A": history-search-backward'
# Down Arrow
bind '"\e[B": history-search-forward'
# ~ Commands ~ #
alias ip="ip -c"
alias rm="rm -i"
alias ols="ls-with-file-mode-bits.sh"
# ~ Derp ~ #
alias unmount="umount"
alias please="sudo"
alias yeet="rm -rf"
# ~ Source Zsh Configuration ~ #
alias zshrcsource="source ~/dotfiles/guix/home/files/zsh/zshrc"
+5
View File
@@ -0,0 +1,5 @@
# ~ Move files to trash folder instead ~ #
del () { mv "$@" $HOME/.local/share/trash/files/.; }
# Make directory and CD into it.
mk () { mkdir -p -- "$1" && cd -P -- "$1" }
+15 -28
View File
@@ -1,42 +1,29 @@
# Sometimes SSH'ing with Emacs is ungraceful.
# To remedy this I disable the zsh line editor.
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
# --- zsh config --- #
#### ~~~~ General ~~~~ #####
export ZSH="$XDG_CONFIG_HOME/oh-my-zsh"
HISTFILE=$XDG_CONFIG_HOME/zsh/.history
ZSH_THEME="mrtazz"
DISABLE_AUTO_UPDATE="true"
ENABLE_CORRECTION="true"
plugins=(git)
source $ZSH/oh-my-zsh.sh # This has to stay below plugins.
# This has to stay below plugins.
source $ZSH/oh-my-zsh.sh
# --- user paths --- #
# Scripts
export PATH=/home/opal/bin:$PATH
# --- locale --- #
export LANG=en_US.UTF-8
# --- autostart --- #
#### ~~~~ Autostart ~~~~ #####
pfetch
# --- Functions --- #
# Move files to trash folder instead.
del () { mv "$@" $HOME/.local/share/Trash/files/.; }
# Make directory and CD into it.
mkcd () { mkdir -p -- "$1" && cd -P -- "$1" }
#### ~~~~ Path Additions ~~~~ #####
export PATH=/home/opal/scripts:$PATH # Scripts
# --- Aliases --- #
alias install="guix install"
alias remove="guix remove"
alias search="guix search"
alias pull="guix pull"
alias upgrade="guix package -u"
alias hreconfig="guix home reconfigure ~/dotfiles/guix/home/guix-home.scm"
#### ~~~~ Locale ~~~~ #####
export LANG=en_US.UTF-8
# qol
alias unmount="umount"
# config
alias zshrcsource="source ~/dotfiles/guix/home/files/zsh/zshrc"
#### ~~~~ Import ~~~~ #####
ALIAS_LOCATION="$XDG_CONFIG_HOME/zsh/zsh_aliases"
FUNCTION_LOCATION="$XDG_CONFIG_HOME/zsh/zsh_functions"
source $ALIAS_LOCATION
source $FUNCTION_LOCATION
+23 -3
View File
@@ -42,6 +42,7 @@
(gnu packages music)
(gnu packages base)
(gnu packages xorg)
(gnu packages dns)
(gnu services)
(guix gexp))
@@ -62,13 +63,18 @@
arandr
feh
picom)
;; Tools/Libraries
;; Admin
(list
inetutils
\bind
wget
curl
cmake
zip
zip)
;; Tools/Libraries
(list
unzip
zip
cmake
libtool
gst-plugins-bad
gst-plugins-base
@@ -208,6 +214,20 @@
,(local-file
(string-append (getenv "HOME")
"/dotfiles/guix/home/files/rofi/config.rasi")))))
(simple-service 'zsh-aliases
home-files-service-type
(list
`("config/zsh/zsh_aliases"
,(local-file
(string-append (getenv "HOME")
"/dotfiles/guix/home/files/zsh/zsh_aliases")))))
(simple-service 'zsh-functions
home-files-service-type
(list
`("config/zsh/zsh_functions"
,(local-file
(string-append (getenv "HOME")
"/dotfiles/guix/home/files/zsh/zsh_functions")))))
(simple-service 'xmodmap-config
home-files-service-type
(list
+1 -1
View File
@@ -33,7 +33,7 @@
(setuid-programs
(let ((from (lambda (package file)
(setuid-program (program (file-append package file))))))
(cons* (from i3status "/bin/i3status")
(cons* (from i3lock "/bin/i3lock")
(from network-manager "/bin/nmtui")
%setuid-programs)))
(users (cons* (user-account