Expanded zsh configuration
This commit is contained in:
87
desktop.org
87
desktop.org
@@ -24,7 +24,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.
|
||||
@@ -47,7 +47,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.
|
||||
@@ -224,10 +224,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 {
|
||||
@@ -247,7 +247,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>"
|
||||
}
|
||||
@@ -265,7 +265,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"
|
||||
@@ -273,7 +273,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
|
||||
}
|
||||
|
||||
@@ -804,36 +804,39 @@ wintypes:
|
||||
Aside from using e-shell for quick command line usage, I mainly use vterm with Zsh. It's a bit of a complicated setup but allows for the maximum number of files possible to live in .config instead of littering my home directory.
|
||||
** zshrc
|
||||
#+begin_src shell :tangle ~/dotfiles/guix/home/files/zsh/zshrc :mkdirp yes
|
||||
# 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 --- #
|
||||
#### ~~~~ Locale ~~~~ #####
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
|
||||
#### ~~~~ Import ~~~~ #####
|
||||
ALIAS_LOCATION="$XDG_CONFIG_HOME/zsh/zsh_aliases"
|
||||
FUNCTION_LOCATION="$XDG_CONFIG_HOME/zsh/zsh_functions"
|
||||
source $ALIAS_LOCATION
|
||||
source $FUNCTION_LOCATION
|
||||
#+end_src
|
||||
** zsh_aliases
|
||||
#+begin_src shell :tangle ~/dotfiles/guix/home/files/zsh/zsh_aliases
|
||||
# ~ Guix #
|
||||
alias install="guix install"
|
||||
alias remove="guix remove"
|
||||
alias search="guix search"
|
||||
@@ -841,12 +844,36 @@ alias pull="guix pull"
|
||||
alias upgrade="guix package -u"
|
||||
alias hreconfig="guix home reconfigure ~/dotfiles/guix/home/guix-home.scm"
|
||||
|
||||
# qol
|
||||
alias unmount="umount"
|
||||
# ~ Search history with up and down arrows ~ #
|
||||
# Up Arrow
|
||||
bind '"\e[A": history-search-backward'
|
||||
# Down Arrow
|
||||
bind '"\e[B": history-search-forward'
|
||||
|
||||
# config
|
||||
|
||||
# ~ 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"
|
||||
alias :q='echo This aint a file, dingus.'
|
||||
alias :wq='echo This aint a file, dingus.'
|
||||
|
||||
# ~ Source Zsh Configuration ~ #
|
||||
alias zshrcsource="source ~/dotfiles/guix/home/files/zsh/zshrc"
|
||||
#+end_src
|
||||
** zsh_functions
|
||||
#+begin_src shell :tangle ~/dotfiles/guix/home/files/zsh/zsh_functions
|
||||
# ~ 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" }
|
||||
#+end_src
|
||||
** zprofile
|
||||
#+begin_src shell :tangle ~/dotfiles/guix/home/files/zsh/zprofile :mkdirp yes
|
||||
# Each new shell auto-imports all environment variables.
|
||||
@@ -865,7 +892,7 @@ export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
GUIX_PROFILE="$HOME/.config/guix/current" . "$GUIX_PROFILE/etc/profile"
|
||||
xmodmap ~/.config/xmodmap/xmodmap
|
||||
#+end_src
|
||||
#+end_src
|
||||
** zshenv
|
||||
#+begin_src shell :tangle ~/dotfiles/guix/home/files/zsh/zshenv :mkdirp yes
|
||||
if [[ -z "$XDG_CONFIG_HOME" ]]
|
||||
|
||||
10
emacs.org
10
emacs.org
@@ -159,6 +159,11 @@ Helpful.el is a package that reformats the describe-X functions to be much more
|
||||
#+begin_src emacs-lisp
|
||||
(setq tramp-default-method "ssh")
|
||||
#+end_src
|
||||
*** No Littering!
|
||||
#+begin_src emacs-lisp
|
||||
(use-package no-littering
|
||||
:straight t)
|
||||
#+end_src
|
||||
** Theme
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
@@ -757,6 +762,11 @@ Sets HTML strings to have the background of the color they represent.
|
||||
evil))
|
||||
(add-hook 'prog-mode-hook #'parinfer-mode)))
|
||||
#+end_src
|
||||
*** Picolisp
|
||||
#+begin_src emacs-lisp
|
||||
(use-package plisp-mode
|
||||
:straight t)
|
||||
#+end_src
|
||||
*** Common Lisp
|
||||
#+begin_src emacs-lisp
|
||||
(defvar inferior-lisp-program "sbcl")
|
||||
|
||||
29
guix.org
29
guix.org
@@ -69,6 +69,7 @@ I use GNU Guix as my operating system. I'm able to declare the state of the oper
|
||||
(gnu packages music)
|
||||
(gnu packages base)
|
||||
(gnu packages xorg)
|
||||
(gnu packages dns)
|
||||
(gnu services)
|
||||
(guix gexp))
|
||||
|
||||
@@ -89,13 +90,18 @@ I use GNU Guix as my operating system. I'm able to declare the state of the oper
|
||||
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
|
||||
@@ -158,6 +164,7 @@ I use GNU Guix as my operating system. I'm able to declare the state of the oper
|
||||
;; Languages
|
||||
(list
|
||||
ruby
|
||||
picolisp
|
||||
python
|
||||
guile-3.0
|
||||
sbcl
|
||||
@@ -235,6 +242,20 @@ I use GNU Guix as my operating system. I'm able to declare the state of the oper
|
||||
,(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
|
||||
@@ -331,7 +352,7 @@ I use GNU Guix as my operating system. I'm able to declare the state of the oper
|
||||
(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
|
||||
|
||||
@@ -96,6 +96,9 @@
|
||||
|
||||
(setq tramp-default-method "ssh")
|
||||
|
||||
(use-package no-littering
|
||||
:straight t)
|
||||
|
||||
;; (use-package modus-themes
|
||||
;; :straight t
|
||||
;; :init
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
guix/home/files/zsh/zsh_aliases
Normal file
27
guix/home/files/zsh/zsh_aliases
Normal 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
guix/home/files/zsh/zsh_functions
Normal file
5
guix/home/files/zsh/zsh_functions
Normal 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" }
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user