added whatever tf changes

This commit is contained in:
2025-05-11 18:34:04 +09:00
parent b7342e6e6a
commit e6328e254b
14 changed files with 424 additions and 344 deletions

View File

@@ -2,4 +2,6 @@
dotfiles for nixos
referenced heavily on [librephoenix's nixos-config](https://github.com/librephoenix/nixos-config).
~~referenced heavily on [librephoenix's nixos-config](https://github.com/librephoenix/nixos-config).~~
This config is now more looks like [sioodmy's config](https://github.com/sioodmy/dotfiles).

12
flake.lock generated
View File

@@ -21,11 +21,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1741325094,
"narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=",
"lastModified": 1745907084,
"narHash": "sha256-Q8SpDbTI95vtKXgNcVl1VdSUhhDOORE8R77wWS2rmg8=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16",
"rev": "f1e52a018166e1a324f832de913e12c0e55792d0",
"type": "github"
},
"original": {
@@ -53,11 +53,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1741246872,
"narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=",
"lastModified": 1745794561,
"narHash": "sha256-T36rUZHUART00h3dW4sV5tv4MrXKT7aWjNfHiZz7OHg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "10069ef4cf863633f57238f179a0297de84bd8d3",
"rev": "5461b7fa65f3ca74cef60be837fd559a8918eaa0",
"type": "github"
},
"original": {

View File

@@ -7,9 +7,9 @@
file
eza
jq
killall
htop
btop
fastfetch
mc
parted
tree

View File

@@ -2,7 +2,10 @@
{
fonts.packages = with pkgs; [
_0xproto
nerd-fonts._0xproto
ipafont
takao
noto-fonts-cjk-serif
noto-fonts-cjk-sans
];
}

View File

@@ -2,8 +2,9 @@
{
imports = [
./git
./polybar
./profile
./xmonad
./zed-editor
#./zed-editor
];
}

View File

@@ -0,0 +1,15 @@
{ pkgs, ... }:
let
bar-launcher = conf: bar:
pkgs.writeShellScriptBin "launch-polybar-${conf}" ''
killall -q polybar
polybar -c ~/.config/polybar/${conf}.ini ${bar} 2>&1 | tee /tmp/polybar.log & disown
'';
in
{
environment.systemPackages = [
pkgs.polybar
(bar-launcher "xmonadAppTray" "apptray")
];
homix.".config/polybar/xmonadAppTray.ini".source = ./xmonadAppTray.ini;
}

View File

@@ -0,0 +1,15 @@
[bar/apptray]
monitor-strict = false
bottom = false
width = 7%
height = 24px
offset-x = 93%
modules-right = tray
foreground = #ffffff00
background = #000000A0
border-color = #000000
[module/tray]
type = internal/tray
tray-spacing = 2px
format-margin = 4px

View File

@@ -0,0 +1,4 @@
xmobar weather station
- *RJNG*: Gifu Air Base
- *RJGG*: Nagoya Airport

View File

@@ -13,6 +13,6 @@
xdg-desktop-portal-gtk
];
homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
homix.".config/xmobar/xmobarrc".source = ./xmobarrc;
#homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
#homix.".config/xmobar/xmobarrc".source = ./xmobarrc;
}

View File

@@ -1,33 +1,46 @@
Config {
font = "IPAGothic 9",
bgColor = "black",
fgColor = "#646464",
position = Top,
border = BottomB,
borderColor = "#646464",
Config { font = "DejaVu Sans Mono 9"
, additionalFonts = ["DejaVu Sans Mono italic 9"]
, borderColor = "black"
, border = FullB
, bgColor = "black"
, fgColor = "whitesmoke"
, alpha = 160
, position = TopSize L 93 24
, textOffset = -1
, iconOffset = -1
, lowerOnStart = True
, pickBroadest = False
, persistent = False
, hideOnStart = False
, iconRoot = "."
, allDesktops = True
, overrideRedirect = False
, textOutputFormat = Ansi
, commands = [ Run Weather "RJNG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
"-L","18","-H","25",
"--normal","green",
"--high","red",
"--low","lightblue"] 36000
, Run Weather "RJGG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
"-L", "18", "-H", "25",
"--normal", "green",
"--high", "red",
"--low", "lightblue"] 36000
, Run Network "wlo1" ["-L","0","-H","32",
"--normal","green","--high","red"] 10
, Run Network "enp4s0" ["-L","0","-H","32",
"--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50",
"--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Com "uname" ["-s","-r"] "" 36000
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% | %cpu% | <box>%memory% * %swap%</box> | %wlo1% - %enp4s0% }\
\{ %RJNG% <fc=#ee9a00><fn=1>%date%</fn></fc>"
}
sepChar = "%",
alignSep = "}{",
template = "%multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %date%",
lowerOnStart = True,
hideOnStart = False,
allDesktops = True,
overrideRedirect = True,
pickBroadest = False,
persistent = True,
commands =
[
Run DynNetwork [ "--template", "<dev>: <tx>kB/s|<rx>kB/s",
"--Low", "1000", -- units: B/s
"--High", "5000", -- units: B/s
"--low", "darkgreen",
"--normal", "darkorange",
"--high", "darkred" ] 10,
Run MultiCpu [
"--template", "Cpu: <total0>C|<core1>C"
] 10,
]
}

View File

@@ -1,335 +1,221 @@
--
-- xmonad example config file.
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
import XMonad
import XMonad.Hooks.DynamicLog
import Data.Monoid
import System.Exit
-- XMonad Contrib
import XMonad.Actions.Submap
import XMonad.Actions.Minimize
import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.Gaps
import XMonad.Layout.Minimize
import XMonad.Layout.NoBorders
import XMonad.Layout.Tabbed
import XMonad.Util.Run
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.SpawnOnce
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import qualified Data.Map as M
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
--
myTerminal = "alacritty"
-- Main Terminal Program
term :: String
term = "alacritty"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Launcher Program
menu :: String
menu = "rofi -show drun"
-- Whether clicking on a window to focus also passes the click to the window
myClickJustFocuses :: Bool
myClickJustFocuses = False
-- Focus Follows Mouse
ffm :: Bool
ffm = True
-- Width of the window border in pixels.
--
myBorderWidth = 1
-- Click Focus
cf :: Bool
cf = False
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
--
myModMask = mod4Mask
-- Border Width
bw :: Dimension
bw = 1
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["term", "web", "code", "debug", "docs"] ++ map show [6..9]
-- Modifier Key (1: left alt, 2: right alt, 4: win key)
modKey :: KeyMask
modKey = mod4Mask
-- Border colors for unfocused and focused windows, respectively.
--
myNormalBorderColor = "#dddddd"
myFocusedBorderColor = "#ff0000"
-- workspace
ws :: [String]
ws = ["term", "web", "school", "docs", "code", "debug", "media", "games", "other"]
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- Border Color Normal
bcn :: String
bcn = "#dddddd"
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- Border Color Focused
bcf :: String
bcf = "#ff0000"
-- launch dmenu
, ((modm, xK_p ), spawn "rofi -show drun")
-- Key Bindings
keyBinds conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
[
-- Program Launch KB
((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf),
((modm, xK_r), spawn menu),
-- close focused window
, ((modm .|. shiftMask, xK_c ), kill)
-- Program Close KB
((modm .|. shiftMask, xK_c), kill),
((modm .|. shiftMask .|. controlMask, xK_c), spawn "xkill"),
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- WM Related KB
((modm, xK_Escape), visualSubmap def $ M.fromList $
[
((shiftMask, xK_q), subName "Exit" $ io exitSuccess),
((0, xK_r), subName "Restart" $ spawn "xmonad --recompile; xmonad --restart")
]
),
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Layout Related KB
((modm, xK_space), sendMessage NextLayout),
((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf),
((modm, xK_comma), sendMessage (IncMasterN 1)),
((modm, xK_period), sendMessage (IncMasterN (-1))),
((modm, xK_f), sendMessage $ JumpToLayout "Full"),
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Gaps Related KB
(
(modm, xK_g), visualSubmap def $ M.fromList $
[
((0, xK_g), subName "Toggle Gaps" $ sendMessage $ ToggleGaps),
((controlMask, xK_h), subName "Toggle Left Gap" $ sendMessage $ ToggleGap L),
((controlMask, xK_l), subName "Toggle Right Gap" $ sendMessage $ ToggleGap R),
((controlMask, xK_k), subName "Toggle Up Gap" $ sendMessage $ ToggleGap U),
((controlMask, xK_j), subName "Toggle Down Gap" $ sendMessage $ ToggleGap D),
((0, xK_h), subName "Inc Left Gap" $ sendMessage $ IncGap 5 L),
((0, xK_l), subName "Inc Right Gap" $ sendMessage $ IncGap 5 R),
((0, xK_k), subName "Inc Up Gap" $ sendMessage $ IncGap 5 U),
((0, xK_j), subName "Inc Down Gap" $ sendMessage $ IncGap 5 D),
((shiftMask, xK_h), subName "Dec Left Gap" $ sendMessage $ DecGap 5 L),
((shiftMask, xK_l), subName "Dec Right Gap" $ sendMessage $ DecGap 5 R),
((shiftMask, xK_k), subName "Dec Up Gap" $ sendMessage $ DecGap 5 U),
((shiftMask, xK_j), subName "Dec Down Gap" $ sendMessage $ DecGap 5 D)
]
),
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((modm, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
--
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io exitSuccess)
-- Restart xmonad
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modm .|. shiftMask, xK_slash ), xmessage help)
]
++
--
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
--
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
--
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
--
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events
--
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster)
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), \w -> focus w >> windows W.shiftMaster)
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), \w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster)
-- you may also bind events to the mouse scroll wheel (button4 and button5)
-- Windows Related KB
((modm, xK_a), refresh),
((modm, xK_Tab), windows W.focusDown),
((modm, xK_j), windows W.focusDown),
((modm, xK_k), windows W.focusUp),
((modm, xK_m), windows W.focusMaster),
((modm, xK_Return), windows W.swapMaster),
((modm .|. shiftMask, xK_j), windows W.swapDown),
((modm .|. shiftMask, xK_k), windows W.swapUp),
((modm, xK_h), sendMessage Expand),
((modm, xK_l), sendMessage Shrink),
((modm, xK_t), withFocused $ windows . W.sink),
((modm, xK_m), withFocused minimizeWindow),
((modm .|. shiftMask, xK_m), withLastMinimized maximizeWindowAndFocus),
((modm .|. controlMask, xK_c), windows copyToAll),
((modm .|. controlMask .|. shiftMask, xK_c), killAllOtherCopies),
((modm .|. shiftMask, xK_c), kill1)
]
------------------------------------------------------------------------
-- Layouts:
++
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
--
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
--
myLayout = tiled ||| Mirror tiled ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- Workspace Related KB
[
((modm, xK_Page_Up), nextWS),
((modm, xK_Page_Down), prevWS),
((modm, xK_n), nextWS),
((modm, xK_p), prevWS)
]
-- The default number of windows in the master pane
nmaster = 1
++
[
((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
]
-- Default proportion of screen occupied by master pane
ratio = 1/2
mouseBinds (XConfig {XMonad.modMask = modm}) = M.fromList
[
((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
((modm, button2), \w -> focus w >> windows W.shiftMaster),
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
]
-- Percent of screen to increment by when resizing panes
delta = 3/100
layouts = avoidStruts(tiled ||| Mirror tiled ||| gaped_tiled ||| tabbed shrinkText tabConfig) ||| noBorders Full ||| gaped_full
where
tiled = minimize(Tall nmaster delta ratio)
gaped_tiled = gaps surrounded_gap $ minimize(Tall nmaster delta ratio)
gaped_full = gaps surrounded_gap $ noBorders Full
surrounded_gap = [(U,10),(D,10),(L,10),(R,10)]
nmaster = 1
ratio = 1/2
delta = 3/100
tabConfig = def {
fontName = "xft:DejaVu Sans Mono",
activeColor = "#aaaaaa",
inactiveColor = "#8a8a8a"
}
------------------------------------------------------------------------
-- Window rules:
-- Manage Hook
mh = composeAll
[
title =? "Picture-in-Picture" --> doSideFloat SE,
isFullscreen --> doFullFloat,
isDialog --> doCenterFloat
]
-- Event Hook
eh = mempty
-- Log Hook
lh h = dynamicLogWithPP $ statbarPipe { ppOutput = hPutStrLn h }
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
--
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
--
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
--
myManageHook = composeAll
[ className =? "MPlayer" --> doFloat
, className =? "Gimp" --> doFloat
, resource =? "desktop_window" --> doIgnore
, resource =? "kdesktop" --> doIgnore ]
-- Startup Hook
sh = do
spawn "launch-polybar-xmonadAppTray"
spawnOnce "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
------------------------------------------------------------------------
-- Event handling
-- Status bar used in WM
statbar :: String
statbar = "xmobar"
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
--
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
--
myEventHook = mempty
statbarPipe = xmobarPP {
ppOrder = \(ws:l:t:_) -> [ws,t],
ppCurrent = xmobarColor "red" "black" . \s -> wrap "[" "]" (s ++ ""),
ppUrgent = xmobarColor "gray" "black" . \s -> wrap "{" "}" (s ++ ""),
ppVisible = xmobarColor "red" "black" . \s -> pad (s ++ ""),
ppHidden = xmobarColor "gray" "black" . \s -> pad (s ++ ""),
ppHiddenNoWindows = xmobarColor "gray" "black" . \s -> pad (s ++ ""),
ppTitle = xmobarColor "red" "black" . shorten 32,
ppLayout = id,
ppOutput = putStrLn,
ppWsSep = " ",
ppSep = " | "
}
------------------------------------------------------------------------
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
--
myLogHook = return ()
------------------------------------------------------------------------
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
--
-- By default, do nothing.
myStartupHook = do
spawn "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
--
main :: IO()
main = do
xmobar myConfig >>= xmonad
wsbar <- spawnPipe statbar
xmonad . docks $ myConfig wsbar
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
--
-- No need to modify this.
--
myConfig = def {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
clickJustFocuses = myClickJustFocuses,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook,
startupHook = myStartupHook
}
-- | Finally, a copy of the default bindings in simple textual tabular format.
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"mod-Shift-/ Show this help message with the default keybindings",
"",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"]
myConfig bar = def {
terminal = term,
focusFollowsMouse = ffm,
clickJustFocuses = cf,
borderWidth = bw,
modMask = modKey,
workspaces = ws,
normalBorderColor = bcn,
focusedBorderColor = bcf,
keys = keyBinds,
mouseBindings = mouseBinds,
layoutHook = layouts,
manageHook = mh <+> manageDocks,
handleEventHook = eh,
logHook = lh bar,
startupHook = sh
}

View File

@@ -3,6 +3,16 @@ let
alacrittyconf = pkgs.writeText "alacritty.toml" ''
[window]
opacity = 0.85
[scrolling]
history = 25000
multiplier = 5
[font]
normal = { family = "0xProto Nerd Font Mono", style = "Regular" }
bold = { family = "0xProto Nerd Font Mono", style = "Bold" }
italic = { family = "0xProto Nerd Font Mono", style = "Italic" }
size = 12.00
'';
in
pkgs.symlinkJoin {

View File

@@ -3,6 +3,7 @@ let
packages = {
alacritty = pkgs.callPackage ./alacritty {};
bash = pkgs.callPackage ./bash {};
fastfetch = pkgs.callPackage ./fastfetch {};
};
in
{

View File

@@ -0,0 +1,130 @@
{ pkgs, ... }:
let
config_file = pkgs.writeText "fastfetch-config.jsonc" ''
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"height": 24,
},
"modules": [
"title",
"separator",
{
"type": "os",
"key": " OS",
"keyColor": "yellow",
"format": "{2}"
},
{
"type": "os",
"key": "[]",
"keyColor": "yellow",
"format": "{2} {10} {11}"
},
{
"type": "kernel",
"key": "[]",
"keyColor": "yellow",
"format": "{1} {2} {4}"
},
{
"type": "initsystem",
"key": "[󰅕]",
"keyColor": "yellow",
"format": "{1} {3}"
},
{
"type": "packages",
"key": "[󰏖]",
"keyColor": "yellow",
"format": "Nix: {9} Flatpak: {14} All: {1}"
},
{
"type": "shell",
"key": "[]",
"keyColor": "yellow",
"format": "{1} {4}"
},
"break",
{
"type": "wm",
"key": " DE/WM",
"keyColor": "blue"
},
{
"type": "lm",
"key": "[󰍂]",
"keyColor": "blue",
"format": "{1} {2} {3}"
},
{
"type": "wmtheme",
"key": "[]",
"keyColor": "blue"
},
{
"type": "terminal",
"key": "[]",
"keyColor": "blue",
"format": "{5} {6}"
},
{
"type": "editor",
"key": "[󱩽]",
"keyColor": "blue",
"format": "{2} {4} ({1})"
},
"break",
{
"type": "custom",
"key": " PC",
"keyColor": "green"
},
{
"type": "cpu",
"key": "[]",
"keyColor": "green"
},
{
"type": "gpu",
"key": "[󰋩]",
"keyColor": "green"
},
{
"type": "disk",
"key": "[]",
"keyColor": "green"
},
{
"type": "memory",
"key": "[]",
"keyColor": "green"
},
{
"type": "swap",
"key": "[󰓡]",
"keyColor": "green"
},
{
"type": "display",
"key": "[󰍹]",
"keyColor": "green",
},
{
"type": "uptime",
"key": "[󰔛]",
"keyColor": "green",
"format": "{1}d, {2}h, {3}m, {4}s, since {6}"
}
]
}
'';
in
pkgs.symlinkJoin {
name = "fastfetch-wrapped";
paths = with pkgs; [ fastfetch ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/fastfetch --add-flags "-c ${config_file}"
'';
}