Minor edits.

This commit is contained in:
Derek Taylor
2020-05-30 11:49:58 -05:00
parent 136675ce47
commit bb310e1043
6 changed files with 128 additions and 81 deletions

100
.bashrc
View File

@@ -14,42 +14,42 @@ export HISTCONTROL=ignoredups:erasedups # no duplicate entries
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
# foreground colors
for fgc in {30..37}; do
# background colors
for bgc in {40..47}; do
fgc=${fgc#37} # white
bgc=${bgc#40} # black
# foreground colors
for fgc in {30..37}; do
# background colors
for bgc in {40..47}; do
fgc=${fgc#37} # white
bgc=${bgc#40} # black
vals="${fgc:+$fgc;}${bgc}"
vals=${vals%%;}
vals="${fgc:+$fgc;}${bgc}"
vals=${vals%%;}
seq0="${vals:+\e[${vals}m}"
printf " %-9s" "${seq0:-(default)}"
printf " ${seq0}TEXT\e[m"
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
done
echo; echo
done
seq0="${vals:+\e[${vals}m}"
printf " %-9s" "${seq0:-(default)}"
printf " ${seq0}TEXT\e[m"
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
done
echo; echo
done
}
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
use_color=true
@@ -64,36 +64,36 @@ match_lhs=""
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs} ]] \
&& type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database)
&& type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
fi
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
fi
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
else
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
else
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi
grep='grep --colour=auto' \
egrep='egrep --colour=auto' \
fgrep='fgrep --colour=auto'
grep='grep --colour=auto' \
egrep='egrep --colour=auto' \
fgrep='fgrep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='\u@\h \W \$ '
else
PS1='\u@\h \w \$ '
fi
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='\u@\h \W \$ '
else
PS1='\u@\h \w \$ '
fi
fi
unset use_color safe_term match_lhs sh

View File

@@ -180,7 +180,7 @@ font:
style: Bold Italic
# Point size
size: 12.0
size: 11.0
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.

View File

@@ -125,7 +125,7 @@ highlight StatusLine ctermfg=7 ctermbg=8 cterm=none
highlight StatusLineNC ctermfg=7 ctermbg=8 cterm=none
highlight NERDTreeClosable ctermfg=2
highlight NERDTreeOpenable ctermfg=8
highlight Comment ctermfg=4 ctermbg=none cterm=none
highlight Comment ctermfg=4 ctermbg=none cterm=italic
highlight Constant ctermfg=12 ctermbg=none cterm=none
highlight Special ctermfg=4 ctermbg=none cterm=none
highlight Identifier ctermfg=6 ctermbg=none cterm=none

View File

@@ -322,7 +322,7 @@ layouts = [
section_top = 10,
panel_width = 320
),
layout.Floating(**layout_theme)
layout.Floating(**layout_theme)
]
##### COLORS #####

View File

@@ -12,23 +12,28 @@
;; Setting the font.
(setq doom-font (font-spec :family "Mononoki Nerd Font Mono" :size 15))
;;(setq doom-font (font-spec :family "SauceCodePro Nerd Font" :size 15))
;; Setting the theme
(setq doom-theme 'doom-dracula)
(setq doom-theme 'doom-palenight)
;; Setting the neotree width to be adjustable.
(setq neo-window-fixed-size nil)
;; Setting the indent guides to show an arrow.
(def-package! highlight-indent-guides
:commands highlight-indent-guides-mode
:hook (prog-mode . highlight-indent-guides-mode)
:config
(setq highlight-indent-guides-method 'character
highlight-indent-guides-character ?\⇨
highlight-indent-guides-delay 0.01
highlight-indent-guides-responsive 'top
highlight-indent-guides-auto-enabled nil))
;; Sets transparency for focuses and unfocused frames.
;; (set-frame-parameter (selected-frame) 'alpha '(95 . 80))
;; (add-to-list 'default-frame-alist '(alpha . (95 . 80)))
;; Setting the indent guides to show a pipe character.
;; (def-package! highlight-indent-guides
;; :commands highlight-indent-guides-mode
;; :hook (prog-mode . highlight-indent-guides-mode)
;; :config
;; (setq highlight-indent-guides-method 'character
;; highlight-indent-guides-character ?\|
;; highlight-indent-guides-delay 0.01
;; highlight-indent-guides-responsive 'top
;; highlight-indent-guides-auto-enabled nil))
(require 'emms-setup)
(emms-standard)

View File

@@ -54,10 +54,10 @@ import XMonad.Actions.GridSelect
import XMonad.Actions.MouseResize
-- Layouts modifiers
import XMonad.Layout.Gaps
import XMonad.Layout.Renamed (renamed, Rename(Replace))
import XMonad.Layout.Spacing (spacing)
import XMonad.Layout.Spacing
import XMonad.Layout.NoBorders
import XMonad.Layout.LayoutModifier
import XMonad.Layout.LimitWindows (limitWindows, increaseLimit, decreaseLimit)
import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..))
import XMonad.Layout.Reflect (REFLECTX(..), REFLECTY(..))
@@ -94,9 +94,6 @@ myNormColor = "#292d3e" -- Border color of normal windows
myFocusColor :: [Char]
myFocusColor = "#bbc5ff" -- Border color of focused windows
myGaps :: Int
myGaps = 5 -- Sets layout gaps and window spacing
altMask :: KeyMask
altMask = mod1Mask -- Setting this for use in xprompts
@@ -106,6 +103,7 @@ windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace
------------------------------------------------------------------------
-- AUTOSTART
------------------------------------------------------------------------
myStartupHook :: X ()
myStartupHook = do
spawnOnce "nitrogen --restore &"
spawnOnce "picom &"
@@ -423,19 +421,63 @@ myManageHook = composeAll
------------------------------------------------------------------------
-- LAYOUTS
------------------------------------------------------------------------
-- Makes setting the spacingRaw simpler to write. The spacingRaw
-- module adds a configurable amount of space around windows.
mySpacing :: Integer -> l a -> XMonad.Layout.LayoutModifier.ModifiedLayout Spacing l a
mySpacing i = spacingRaw False (Border i i i i) True (Border i i i i) True
-- This is a variation of the above except no borders are applied
-- if fewer than two windows. So a single window has no gaps.
mySpacing' i = spacingRaw False (Border i i i i) True (Border i i i i) True
tall = renamed [Replace "tall"]
$ limitWindows 12
$ mySpacing 8
$ ResizableTall 1 (3/100) (1/2) []
grid = renamed [Replace "grid"]
$ limitWindows 12
$ mySpacing 8
$ mkToggle (single MIRROR)
$ Grid (16/10)
threeCol = renamed [Replace "threeCol"]
$ limitWindows 3
$ mySpacing' 8
$ ThreeCol 1 (3/100) (1/3)
threeRow = renamed [Replace "threeRow"]
$ limitWindows 3
$ Mirror
$ mkToggle (single MIRROR) zoomRow
oneBig = renamed [Replace "oneBig"]
$ limitWindows 6
$ Mirror
$ mkToggle (single MIRROR)
$ mkToggle (single REFLECTX)
$ mkToggle (single REFLECTY)
$ OneBig (5/9) (8/12)
monocle = renamed [Replace "monocle"]
$ limitWindows 20
$ Full
space = renamed [Replace "space"]
$ limitWindows 4
$ Mirror
$ mkToggle (single MIRROR)
$ mkToggle (single REFLECTX)
$ mkToggle (single REFLECTY)
$ OneBig (2/3) (2/3)
floats = renamed [Replace "floats"]
$ limitWindows 20
$ simplestFloat
myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $
mkToggle (NBFULL ?? NOBORDERS ?? EOT) $ myDefaultLayout
where
myDefaultLayout = tall ||| grid ||| threeCol ||| threeRow ||| oneBig ||| noBorders monocle ||| space ||| floats
tall = renamed [Replace "tall"] $ limitWindows 12 $ gaps [(U,myGaps), (D,myGaps), (L,myGaps), (R,myGaps)] $ spacing myGaps $ ResizableTall 1 (3/100) (1/2) []
grid = renamed [Replace "grid"] $ limitWindows 12 $ spacing myGaps $ mkToggle (single MIRROR) $ Grid (16/10)
threeCol = renamed [Replace "threeCol"] $ limitWindows 3 $ ThreeCol 1 (3/100) (1/2)
threeRow = renamed [Replace "threeRow"] $ limitWindows 3 $ Mirror $ mkToggle (single MIRROR) zoomRow
oneBig = renamed [Replace "oneBig"] $ limitWindows 6 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (5/9) (8/12)
monocle = renamed [Replace "monocle"] $ limitWindows 20 $ Full
space = renamed [Replace "space"] $ limitWindows 4 $ spacing 12 $ Mirror $ mkToggle (single MIRROR) $ mkToggle (single REFLECTX) $ mkToggle (single REFLECTY) $ OneBig (2/3) (2/3)
floats = renamed [Replace "floats"] $ limitWindows 20 $ simplestFloat
myDefaultLayout = tall ||| grid ||| threeCol ||| threeRow ||| oneBig ||| noBorders monocle ||| space ||| floats
------------------------------------------------------------------------
-- SCRATCHPADS