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

View File

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

View File

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

View File

@@ -2,8 +2,9 @@
{ {
imports = [ imports = [
./git ./git
./polybar
./profile ./profile
./xmonad ./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 xdg-desktop-portal-gtk
]; ];
homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs; #homix.".config/xmonad/xmonad.hs".source = ./xmonad.hs;
homix.".config/xmobar/xmobarrc".source = ./xmobarrc; #homix.".config/xmobar/xmobarrc".source = ./xmobarrc;
} }

View File

@@ -1,33 +1,46 @@
Config { Config { font = "DejaVu Sans Mono 9"
font = "IPAGothic 9", , additionalFonts = ["DejaVu Sans Mono italic 9"]
bgColor = "black", , borderColor = "black"
fgColor = "#646464", , border = FullB
position = Top, , bgColor = "black"
border = BottomB, , fgColor = "whitesmoke"
borderColor = "#646464", , alpha = 160
, position = TopSize L 93 24
sepChar = "%", , textOffset = -1
alignSep = "}{", , iconOffset = -1
template = "%multicpu% | %coretemp% | %memory% | %dynnetwork% }{ %date%", , lowerOnStart = True
, pickBroadest = False
lowerOnStart = True, , persistent = False
hideOnStart = False, , hideOnStart = False
allDesktops = True, , iconRoot = "."
overrideRedirect = True, , allDesktops = True
pickBroadest = False, , overrideRedirect = False
persistent = True, , textOutputFormat = Ansi
, commands = [ Run Weather "RJNG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
commands = "-L","18","-H","25",
[ "--normal","green",
Run DynNetwork [ "--template", "<dev>: <tx>kB/s|<rx>kB/s", "--high","red",
"--Low", "1000", -- units: B/s "--low","lightblue"] 36000
"--High", "5000", -- units: B/s , Run Weather "RJGG" ["-t","@<station> <tempC>C, <rh>%, <pressure>hPa",
"--low", "darkgreen", "-L", "18", "-H", "25",
"--normal", "darkorange", "--normal", "green",
"--high", "darkred" ] 10, "--high", "red",
"--low", "lightblue"] 36000
Run MultiCpu [ , Run Network "wlo1" ["-L","0","-H","32",
"--template", "Cpu: <total0>C|<core1>C" "--normal","green","--high","red"] 10
] 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>"
}

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
import XMonad.Hooks.DynamicLog
import Data.Monoid import Data.Monoid
import System.Exit 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 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 -- Main Terminal Program
-- certain contrib modules. term :: String
-- term = "alacritty"
myTerminal = "alacritty"
-- Whether focus follows the mouse pointer. -- Launcher Program
myFocusFollowsMouse :: Bool menu :: String
myFocusFollowsMouse = True menu = "rofi -show drun"
-- Whether clicking on a window to focus also passes the click to the window -- Focus Follows Mouse
myClickJustFocuses :: Bool ffm :: Bool
myClickJustFocuses = False ffm = True
-- Width of the window border in pixels. -- Click Focus
-- cf :: Bool
myBorderWidth = 1 cf = False
-- modMask lets you specify which modkey you want to use. The default -- Border Width
-- is mod1Mask ("left alt"). You may also consider using mod3Mask bw :: Dimension
-- ("right alt"), which does not conflict with emacs keybindings. The bw = 1
-- "windows key" is usually mod4Mask.
--
myModMask = mod4Mask
-- The default number of workspaces (virtual screens) and their names. -- Modifier Key (1: left alt, 2: right alt, 4: win key)
-- By default we use numeric strings, but any string may be used as a modKey :: KeyMask
-- workspace name. The number of workspaces is determined by the length modKey = mod4Mask
-- of this list.
--
-- A tagging example:
--
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
--
myWorkspaces = ["term", "web", "code", "debug", "docs"] ++ map show [6..9]
-- Border colors for unfocused and focused windows, respectively. -- workspace
-- ws :: [String]
myNormalBorderColor = "#dddddd" ws = ["term", "web", "school", "docs", "code", "debug", "media", "games", "other"]
myFocusedBorderColor = "#ff0000"
------------------------------------------------------------------------ -- Border Color Normal
-- Key bindings. Add, modify or remove key bindings here. bcn :: String
-- bcn = "#dddddd"
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal -- Border Color Focused
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) bcf :: String
bcf = "#ff0000"
-- launch dmenu -- Key Bindings
, ((modm, xK_p ), spawn "rofi -show drun") 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 -- Program Close KB
, ((modm .|. shiftMask, xK_c ), kill) ((modm .|. shiftMask, xK_c), kill),
((modm .|. shiftMask .|. controlMask, xK_c), spawn "xkill"),
-- Rotate through the available layout algorithms -- WM Related KB
, ((modm, xK_space ), sendMessage NextLayout) ((modm, xK_Escape), visualSubmap def $ M.fromList $
[
-- Reset the layouts on the current workspace to default ((shiftMask, xK_q), subName "Exit" $ io exitSuccess),
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) ((0, xK_r), subName "Restart" $ spawn "xmonad --recompile; xmonad --restart")
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- 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)
] ]
),
-- 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"),
-- 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)
]
),
-- 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)
]
++ ++
-- -- Workspace Related KB
-- mod-[1..9], Switch to workspace N [
-- mod-shift-[1..9], Move client to workspace N ((modm, xK_Page_Up), nextWS),
-- ((modm, xK_Page_Down), prevWS),
[((m .|. modm, k), windows $ f i) ((modm, xK_n), nextWS),
((modm, xK_p), prevWS)
]
++
[
((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
++
--
-- 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)
] ]
------------------------------------------------------------------------ mouseBinds (XConfig {XMonad.modMask = modm}) = M.fromList
-- Layouts: [
((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)
]
-- You can specify and transform your layouts by modifying these values. layouts = avoidStruts(tiled ||| Mirror tiled ||| gaped_tiled ||| tabbed shrinkText tabConfig) ||| noBorders Full ||| gaped_full
-- 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 where
-- default tiling algorithm partitions the screen into two panes tiled = minimize(Tall nmaster delta ratio)
tiled = Tall nmaster delta ratio gaped_tiled = gaps surrounded_gap $ minimize(Tall nmaster delta ratio)
gaped_full = gaps surrounded_gap $ noBorders Full
-- The default number of windows in the master pane surrounded_gap = [(U,10),(D,10),(L,10),(R,10)]
nmaster = 1 nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2 ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100 delta = 3/100
tabConfig = def {
------------------------------------------------------------------------ fontName = "xft:DejaVu Sans Mono",
-- Window rules: activeColor = "#aaaaaa",
inactiveColor = "#8a8a8a"
-- 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 ]
------------------------------------------------------------------------
-- Event handling
-- * 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
------------------------------------------------------------------------
-- 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
-- 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. -- Manage Hook
help :: String mh = composeAll
help = unlines ["The default modifier key is 'alt'. Default keybindings:", [
"", title =? "Picture-in-Picture" --> doSideFloat SE,
"-- launching and killing programs", isFullscreen --> doFullFloat,
"mod-Shift-Enter Launch xterminal", isDialog --> doCenterFloat
"mod-p Launch dmenu", ]
"mod-Shift-p Launch gmrun", -- Event Hook
"mod-Shift-c Close/kill the focused window", eh = mempty
"mod-Space Rotate through the available layout algorithms", -- Log Hook
"mod-Shift-Space Reset the layouts on the current workSpace to default", lh h = dynamicLogWithPP $ statbarPipe { ppOutput = hPutStrLn h }
"mod-n Resize/refresh viewed windows to the correct size",
"mod-Shift-/ Show this help message with the default keybindings", -- Startup Hook
"", sh = do
"-- move focus up or down the window stack", spawn "launch-polybar-xmonadAppTray"
"mod-Tab Move focus to the next window", spawnOnce "feh --bg-scale ~/画像/wallpaper/85444653_p0.jpg"
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window", -- Status bar used in WM
"mod-k Move focus to the previous window", statbar :: String
"mod-m Move focus to the master window", statbar = "xmobar"
"",
"-- modifying the window order", statbarPipe = xmobarPP {
"mod-Return Swap the focused window and the master window", ppOrder = \(ws:l:t:_) -> [ws,t],
"mod-Shift-j Swap the focused window with the next window", ppCurrent = xmobarColor "red" "black" . \s -> wrap "[" "]" (s ++ ""),
"mod-Shift-k Swap the focused window with the previous window", ppUrgent = xmobarColor "gray" "black" . \s -> wrap "{" "}" (s ++ ""),
"", ppVisible = xmobarColor "red" "black" . \s -> pad (s ++ ""),
"-- resizing the master/slave ratio", ppHidden = xmobarColor "gray" "black" . \s -> pad (s ++ ""),
"mod-h Shrink the master area", ppHiddenNoWindows = xmobarColor "gray" "black" . \s -> pad (s ++ ""),
"mod-l Expand the master area", ppTitle = xmobarColor "red" "black" . shorten 32,
"", ppLayout = id,
"-- floating layer support", ppOutput = putStrLn,
"mod-t Push window back into tiling; unfloat and re-tile it", ppWsSep = " ",
"", ppSep = " | "
"-- 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", main :: IO()
"", main = do
"-- quit, or restart", wsbar <- spawnPipe statbar
"mod-Shift-q Quit xmonad", xmonad . docks $ myConfig wsbar
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N", myConfig bar = def {
"", terminal = term,
"-- Workspaces & screens", focusFollowsMouse = ffm,
"mod-Shift-[1..9] Move client to workspace N", clickJustFocuses = cf,
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", borderWidth = bw,
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", modMask = modKey,
"", workspaces = ws,
"-- Mouse bindings: default actions bound to mouse events", normalBorderColor = bcn,
"mod-button1 Set the window to floating mode and move by dragging", focusedBorderColor = bcf,
"mod-button2 Raise the window to the top of the stack", keys = keyBinds,
"mod-button3 Set the window to floating mode and resize by dragging"] 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" '' alacrittyconf = pkgs.writeText "alacritty.toml" ''
[window] [window]
opacity = 0.85 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 in
pkgs.symlinkJoin { pkgs.symlinkJoin {

View File

@@ -3,6 +3,7 @@ let
packages = { packages = {
alacritty = pkgs.callPackage ./alacritty {}; alacritty = pkgs.callPackage ./alacritty {};
bash = pkgs.callPackage ./bash {}; bash = pkgs.callPackage ./bash {};
fastfetch = pkgs.callPackage ./fastfetch {};
}; };
in 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}"
'';
}