diff --git a/desktop/activation-manuelle/xmonad/xmobarrc b/desktop/activation-manuelle/xmonad/xmobarrc new file mode 100644 index 0000000..b3a46ef --- /dev/null +++ b/desktop/activation-manuelle/xmonad/xmobarrc @@ -0,0 +1,32 @@ +Config { font = "xft:Monospace-10:bold" + , additionalFonts = [] + , border = NoBorder + , bgColor = "black" + , fgColor = "white" + , alpha = 255 + , position = Top + --, textOffset = -1 + --, iconOffset = -1 + , lowerOnStart = False + , pickBroadest = False + , persistent = False + , hideOnStart = False + , iconRoot = "." + , allDesktops = True + , overrideRedirect = True + , commands = [ Run DynNetwork ["-L","0","-H","32","--normal","green","--high","red"] 10 + , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 + , Run Memory ["-t","Mem: %"] 10 + , Run Battery ["-t", "Batt: %, W -> "] 10 + , Run Date "%F %H:%M:%S" "date" 10 + --, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 + , Run StdinReader + , Run Brightness [] 10 + , Run Volume "default" "Master" [] 10 + ] + , sepChar = "%" + , alignSep = "}{" + , template = " %StdinReader% }\ + \{ %cpu% | %memory% | %dynnetwork% | %battery% | %bright% | %default:Master% | %date%" + } + diff --git a/desktop/activation-manuelle/xmonad/xmonad.hs b/desktop/activation-manuelle/xmonad/xmonad.hs new file mode 100644 index 0000000..7055c10 --- /dev/null +++ b/desktop/activation-manuelle/xmonad/xmonad.hs @@ -0,0 +1,47 @@ +import Graphics.X11.ExtraTypes.XF86 +import XMonad +import XMonad.Config.Desktop +import XMonad.Config.Azerty +import XMonad.Hooks.DynamicLog +import XMonad.Util.EZConfig + +-- # Ligne principale + +main = xmonad =<< xmobar myConfig +--main = xmonad =<< statusBar myBar myPP toggleStrutsKey myConfig + +-- # Réglages de xmonad + +myConfig = azertyConfig + { terminal = "sakura" + , modMask = mod4Mask + , borderWidth = 2 + , workspaces = myWorkspaces + } `additionalKeys` myKeys `removeKeys` unusefulKeys + +myWorkspaces = ["1:mail","2:chat","3:web","4","5","6","7","8", "9:system"] + +myKeys = [ ((0, xF86XK_MonBrightnessUp), spawn "xbacklight +10") -- +brightness + , ((0, xF86XK_MonBrightnessDown), spawn "xbacklight -10") -- -brightness + , ((0, xF86XK_AudioRaiseVolume), spawn "amixer set Master 3%+") -- +volume + , ((0, xF86XK_AudioLowerVolume), spawn "amixer set Master 3%-") -- -volume + , ((0, xF86XK_AudioMute), spawn "amixer set Master toggle") -- mute volume + , ((0, xF86XK_AudioPlay), spawn "cmus-remote -u") -- cmus play/stop + , ((0, xF86XK_AudioPrev), spawn "cmus-remote -r") -- cmus next + , ((0, xF86XK_AudioNext), spawn "cmus-remote -n") -- cmus previous + ] + +unusefulKeys = [] + +-- # Réglages de xmobar + +myBar = "xmobar" + +-- Custom PP, configure it as you like. It determines what is being written to the bar. +myPP = xmobarPP + { ppCurrent = xmobarColor "black" "yellow" . wrap " " " " + } + +-- Key binding to toggle the gap for the bar. +toggleStrutsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b) + diff --git a/desktop/activation-manuelle/xmonad.nix b/desktop/activation-manuelle/xmonad/xmonad.nix similarity index 100% rename from desktop/activation-manuelle/xmonad.nix rename to desktop/activation-manuelle/xmonad/xmonad.nix diff --git a/desktop/desktop.nix b/desktop/desktop.nix index f2c1ab7..4f1f60b 100644 --- a/desktop/desktop.nix +++ b/desktop/desktop.nix @@ -17,7 +17,7 @@ in ./activation-manuelle/app-jeux.nix # permettant de jouer ;) ./activation-manuelle/app-virtualbox.nix # pour exploiter virtualbox ./activation-manuelle/laptop.nix # appli & configuration adaptée pour un PC portable$ - ./activation-manuelle/xmonad.nix # gestionnaire de fenêtres xmonad + ./activation-manuelle/xmonad/xmonad.nix # gestionnaire de fenêtres xmonad # installées systématiquement ./desktop-minimal.nix ./app-adminsys.nix # pour gérer le système dans son ensemble et les services