Minor edits.

This commit is contained in:
Derek Taylor 2020-05-27 13:02:54 -05:00
parent 7287262d02
commit 136675ce47
3 changed files with 59 additions and 11 deletions

View File

@ -109,6 +109,14 @@ font:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
# family: SauceCodePro Nerd Font
# family: CodeNewRoman Nerd Font
# family: RobotoMono Nerd Font
# family: Hack
# family: JetBrains Mono
# family: UbuntuMono Nerd Font
# family: Monofur Nerd Font
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
# The `style` can be specified to pick a specific face.
@ -120,6 +128,14 @@ font:
#
# If the bold family is not specified, it will fall back to the
# value specified for the normal font.
# family: SauceCodePro Nerd Font
# family: CodeNewRoman Nerd Font
# family: RobotoMono Nerd Font
# family: Hack
# family: JetBrains Mono
# family: UbuntuMono Nerd Font
# family: Monofur Nerd Font
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
# The `style` can be specified to pick a specific face.
@ -131,6 +147,14 @@ font:
#
# If the italic family is not specified, it will fall back to the
# value specified for the normal font.
# family: SauceCodePro Nerd Font Mono
# family: CodeNewRoman Nerd Font
# family: RobotoMono Nerd Font
# family: Hack
# family: JetBrains Mono
# family: UbuntuMono Nerd Font
# family: Monofuritalic Nerd Font Mono
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
# The `style` can be specified to pick a specific face.
@ -142,13 +166,21 @@ font:
#
# If the bold italic family is not specified, it will fall back to the
# value specified for the normal font.
# family: SauceCodePro Nerd Font Mono
# family: CodeNewRoman Nerd Font
# family: RobotoMono Nerd Font
# family: Hack
# family: JetBrains Mono
# family: UbuntuMono Nerd Font
# family: Monofuritalic Nerd Font Mono
# family: TerminessTTF Nerd Font
family: Mononoki Nerd Font
# The `style` can be specified to pick a specific face.
style: Bold Italic
# Point size
size: 11.0
size: 12.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.
@ -290,8 +322,8 @@ colors:
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
# background_opacity: 1.0
background_opacity: 0.95
background_opacity: 1.0
# background_opacity: 0.95
#selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"

View File

@ -35,9 +35,9 @@ opacity-rule = [ "99:name *?= 'Call'",
"100:name *?= 'toot'",
"100:name *?= 'nmon'",
"100:name *?= 'httping'",
"95:name *?= 'xmobar'",
"100:name *?= 'xmobar'",
"94:name *?= 'mocp'",
"95:class_g *?= 'emacs'",
"100:class_g *?= 'emacs'",
"100:class_g *?= 'surf' && name *?='suckless.org'",
"100:class_g *?= 'tabbed'",
"100:name *?= 'newsboat'",

View File

@ -15,6 +15,7 @@ import qualified XMonad.StackSet as W
-- Prompt
import XMonad.Prompt
import XMonad.Prompt.Input
import XMonad.Prompt.Man
import XMonad.Prompt.Pass
import XMonad.Prompt.Shell (shellPrompt)
@ -23,6 +24,7 @@ import XMonad.Prompt.XMonad
import Control.Arrow (first)
-- Data
import Data.Char (isSpace)
import Data.List
import Data.Monoid
import Data.Maybe (isJust)
@ -31,7 +33,7 @@ import qualified Data.Map as M
-- Utilities
import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Util.NamedScratchpad
import XMonad.Util.Run (safeSpawn, spawnPipe)
import XMonad.Util.Run (runProcessWithInput, safeSpawn, spawnPipe)
import XMonad.Util.SpawnOnce
-- Hooks
@ -52,6 +54,7 @@ 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.NoBorders
@ -91,6 +94,9 @@ 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
@ -182,13 +188,13 @@ dtXPKeymap = M.fromList $
------------------------------------------------------------------------
dtXPConfig :: XPConfig
dtXPConfig = def
{ font = "xft:Mononoki Nerd Font:size=9"
{ font = "xft:Mononoki Nerd Font:size=9"
, bgColor = "#292d3e"
, fgColor = "#d0d0d0"
, bgHLight = "#c792ea"
, fgHLight = "#000000"
, borderColor = "#535974"
, promptBorderWidth = 1
, promptBorderWidth = 0
, promptKeymap = dtXPKeymap
, position = Top
-- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 }
@ -203,6 +209,14 @@ dtXPConfig = def
, maxComplRows = Nothing -- set to Just 5 for 5 rows
}
calcPrompt :: XPConfig -> String -> X ()
calcPrompt c ans =
inputPrompt c (trim ans) ?+ \input ->
liftIO(runProcessWithInput "qalc" [input] "") >>= calcPrompt c
where
trim = f . f
where f = reverse . dropWhile isSpace
------------------------------------------------------------------------
-- KEYBINDINGS
------------------------------------------------------------------------
@ -218,10 +232,12 @@ myKeys =
, ("M-S-o", xmonadPrompt dtXPConfig) -- Xmonad Prompt
, ("M-S-s", sshPrompt dtXPConfig) -- Ssh Prompt
, ("M-S-m", manPrompt dtXPConfig) -- Manpage Prompt
-- The next three bindings require pass to be installed
-- Require pass to be installed
, ("M1-C-p", passPrompt dtXPConfig) -- Get Passwords Prompt
, ("M1-C-g", passGeneratePrompt dtXPConfig) -- Generate Passwords Prompt
, ("M1-C-r", passRemovePrompt dtXPConfig) -- Remove Passwords Prompt
-- Calculator prompt
, ("M1-C-c", calcPrompt dtXPConfig "qalc") -- Requires qalculate-gtk
-- Windows
, ("M-S-c", kill1) -- Kill the currently focused client
@ -412,8 +428,8 @@ myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts float
where
myDefaultLayout = tall ||| grid ||| threeCol ||| threeRow ||| oneBig ||| noBorders monocle ||| space ||| floats
tall = renamed [Replace "tall"] $ limitWindows 12 $ spacing 6 $ ResizableTall 1 (3/100) (1/2) []
grid = renamed [Replace "grid"] $ limitWindows 12 $ spacing 6 $ mkToggle (single MIRROR) $ Grid (16/10)
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)