Skip to content

Commit f23a433

Browse files
committed
fix: $HOME/bin PATH, vertical monitor resolution, update ghc
configuration.nix: - FIX `$HOME/bin` PATH: `$HOME/bin` wasn't part of PATH anymore, xmonad need it for `dmenu_run`, .xsession doesn't help. Added `xserver.displayManager.sessionCommands` script that executes before wm and fixes path. - FIX mouse accel: deactivated mouse accel with xset in `sesssionCommands` too. desktop.nix: - FIX vertical monitor: xserver has a default `resolutions` field. xmonad: - little cleanup I did while trying to fix `$HOME/bin` path .shell/env: - more consistent path system packages: - update ghc to ghc882 - removed p7zip because deprecated - commented nomacs out because it couldn't build
1 parent 79c739d commit f23a433

File tree

5 files changed

+27
-14
lines changed

5 files changed

+27
-14
lines changed

.shell/env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export HISTFILESIZE=
77

88
## Programming envs {{{
99
# haskell
10-
export PATH=$PATH:~/.cabal/bin:~/.local/bin
10+
export PATH=$PATH:$HOME/.cabal/bin:$HOME/.local/bin
1111

1212
# cargo
13-
export PATH="$PATH:$HOME/.cargo/bin"
13+
export PATH=$PATH:$HOME/.cargo/bin
1414

1515
# opam
1616
eval `opam config env`

.xmonad/xmobarrc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Config { font = "xft:Fira Code:size=10"
1010
, overrideRedirect = False
1111
, border = BottomBM 0
1212
, borderColor = "#3e3e3e"
13-
, commands = [ Run Network "wlp1s0" [ "-t" , "d:<rx> u:<tx>"
13+
, commands = [ Run Network "enp3s0" [ "-t" , "d:<rx> u:<tx>"
1414
, "-L" , "100"
1515
, "-H" , "700"
1616
, "-m" , "4"
1717
, "--normal" , "#b0bdbd"
1818
, "--high" , "#ff8d80"
1919
] 20
2020

21-
, Run CoreTemp [ "-t" , "c:<core0>.<core1>"
21+
, Run CoreTemp [ "-t" , "c:<core0>.<core1>.<core2>.<core3>"
2222
, "-L" , "40"
2323
, "-H" , "75"
2424
, "-m" , "2"
@@ -34,7 +34,9 @@ Config { font = "xft:Fira Code:size=10"
3434
, "--high" , "#ff8d80"
3535
] 20
3636

37-
, Run DiskU [("/dev/mapper/main", "r:<usedvp>%")]
37+
, Run DiskU [ ("/", "r:<usedp>%")
38+
, ("/home/aigis", "v:<usedp>%")
39+
]
3840
[ "-L" , "50"
3941
, "-H" , "85"
4042
, "-m" , "2"
@@ -62,5 +64,5 @@ Config { font = "xft:Fira Code:size=10"
6264
]
6365
, sepChar = "%"
6466
, alignSep = "}{"
65-
, template = " %StdinReader% }{%battery% / r:%du% / %coretemp% / %memory% / %wlp1s0% / <fc=#ede7b4>%date%</fc> "
67+
, template = " %StdinReader% }{%disku% / %coretemp% / %memory% / %enp3s0% / <fc=#ede7b4>%date%</fc> "
6668
}

.xmonad/xmonad.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,19 +194,19 @@ myManageHookFloat = composeAll
194194
]
195195

196196
-- xmobar
197-
myLogHook h = dynamicLogWithPP $ wsPP { ppOutput = hPutStrLn h }
197+
myLogHook = dynamicLogWithPP . wsPP
198198

199199
myWsBar = "xmobar $HOME/.xmonad/xmobarrc"
200200

201-
wsPP = xmobarPP
201+
wsPP h = xmobarPP
202202
{ ppOrder = \(ws:l:t:_) -> [ws,l,t]
203203
, ppCurrent = xmobarColor colorfg colorDarkbg . \s -> "="++s++"="
204204
, ppUrgent = xmobarColor colorRed colorDarkbg . \s -> "<"++s++">"
205205
, ppVisible = xmobarColor colorfg colorDarkbg . \s -> "~"++s++"~"
206206
, ppHidden = xmobarColor colorfg colorDarkbg . \s -> "-"++s++"-"
207207
, ppHiddenNoWindows = xmobarColor colorfg colorDarkbg . \s -> "_"++s++"_"
208208
, ppTitle = xmobarColor colorfg colorDarkbg
209-
, ppOutput = putStrLn
209+
, ppOutput = hPutStrLn h
210210
, ppWsSep = " "
211211
, ppSep = " "
212212
}

configuration.nix

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
# configuration.nix
12
# Edit this configuration file to define what should be installed on
23
# your system. Help is available in the configuration.nix(5) man page
34
# and in the NixOS manual (accessible by running ‘nixos-help’).
45
{ config, pkgs, ... }:
5-
# configuration.nix
66
{
77
boot.tmpOnTmpfs = true;
88

@@ -38,7 +38,14 @@
3838
windowManager.xmonad.haskellPackages = pkgs.haskell.packages.ghc865;
3939

4040
displayManager.defaultSession = "none+xmonad";
41+
displayManager.sessionCommands = ''
42+
export PATH=$HOME/bin:$PATH
43+
44+
# disable accel on mouse
45+
${pkgs.xorg.xset}/bin/xset m 1/1 0
46+
'';
4147
};
48+
4249
sshd.enable = true;
4350
};
4451

@@ -108,7 +115,7 @@
108115
filezilla
109116
firefox-devedition-bin
110117
git
111-
haskell.compiler.ghc881
118+
haskell.compiler.ghc882
112119
haskellPackages.cabal-install
113120
haskellPackages.hlint
114121
haskellPackages.stack
@@ -125,10 +132,9 @@
125132
networkmanager
126133
nitrogen
127134
nix-bash-completions
128-
nomacs
135+
# nomacs
129136
ntfs3g
130137
optipng
131-
p7zip
132138
pavucontrol
133139
psmisc
134140
racket

desktop.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@
1818
};
1919
};
2020
services = {
21+
xserver.resolutions = [
22+
{x=1920; y=1080;}
23+
{x=1920; y=1080;}
24+
{x=1920; y=1080;}
25+
];
2126
xserver.xrandrHeads = [
2227
"DVI-0"
2328
{ output="HDMI-3"; primary=true;}
2429
{ output="DisplayPort-4";
2530
monitorConfig=''
26-
Option "Rotate" "Right"
31+
Option "Rotate" "Left"
2732
Option "Position" "3840 -420"
2833
Option "Mode" "1920x1080"
2934
'';

0 commit comments

Comments
 (0)