Mostrare los pasos para una instalacion en fedora
Los sw que se instalaran son:
xmonad -> escritorio
xmobar -> barra
shutter -> tomar screenshot
gmrun -> lanzador de aplicaciones
feh -> fondo de pantalla
Instalacion:
yum install xmonad xmobar shutter gmrun feh
Anexo configuracion de xmonad:
~/.xmonad/xmonad.hs
--------------------------------------------------------------------------
-- default desktop configuration for Fedora
import System.Posix.Env (getEnv)
import Data.Maybe (maybe)
import XMonad
import XMonad.Hooks.EwmhDesktops
---
import System.Exit
import qualified XMonad.StackSet as W
import qualified Data.Map as M
-- GHC hierarchical libraries
import XMonad.Operations
import XMonad.Config
import XMonad.Util.Run
import System.IO
import Data.Ratio ((%))
--Contribs
import XMonad.Actions.CycleWS
import XMonad.Actions.NoBorders
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.FadeInactive
-- import XMonad.Layout
--librerias necesarias para los diferentes tipos de layouts
import XMonad.Layout.Accordion
import XMonad.Layout.Grid
import XMonad.Layout.IM
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.SimpleFloat
import XMonad.Layout.Spacing
import XMonad.Layout.Tabbed
import XMonad.Layout.Circle
import XMonad.Layout.Dishes
import XMonad.Layout.FixedColumn
import XMonad.Layout.ThreeColumns
---
import XMonad.Config.Desktop
--import XMonad.Config.Gnome
--import XMonad.Config.Kde
--import XMonad.Config.Xfce
import XMonad.Util.EZConfig
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
-- Especificamos la terminal por default
myTerminal = "terminator"
-- Width of the window border in pixels.
-- El tamaño del borde que nos indicara si nuestra pantalla esta activa segun el color que pongamos
myBorderWidth =2
-- 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.
-- tecla de acceso a comandos de xmonad por default super
myModMask = mod4Mask
altMask = mod1Mask
myNumlockMask = mod2Mask
-- The default number of workspaces (virtual screens) and their names.
-- Podemos anexar los espacios de trabajos que requerimos
myWorkspaces = ["web","mail","music","im","code","tex","consola","datos"]
-- Border colors for unfocused and focused windows, respectively.
--Especificamos los colores de vantanas activas e inactivas
-- Ventana inactiva
myNormalBorderColor = "#87ceeb"
-- Ventana activa
myFocusedBorderColor = "#adff2f"
------------------------------------------------------------------------
-- Key bindings. Add, modify or remove key bindings here.
--
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- Lanzar Terminal [ Terminator ]
[ ((modm .|. shiftMask, xK_Return),
spawn $ XMonad.terminal conf)
-- Lanzar menu de apps [ DMENU ]
, ((modm, xK_p ),
--spawn "exe=`dmenu_run | dmenu` && eval \"exec $exe\"")
spawn "exe=`gmrun` && eval \"exec $exe\"")
-- Cerrar Aplicacion
, ((modm .|. shiftMask, xK_c ),
kill)
-- Rota las aplicaciones entre los algoritmos disponibles
, ((modm, xK_space ),
sendMessage NextLayout)
-- Resetea las aplicaciones
, ((modm .|. shiftMask, xK_space ),
setLayout $ XMonad.layoutHook conf)
-- 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 )
-- Reducir el Area maestra
, ((modm, xK_h ),
sendMessage Shrink)
-- Expandir el Area maestra
, ((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 (exitWith ExitSuccess))
-- Restart xmonad
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
]
++
--
-- mod-[1..9], Switch to workspace N
--
-- 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)]]
-- Whether focus follows the mouse pointer.
--
myFocusFollowsMouse :: Bool
--myFocusFollowsMouse = False
myFocusFollowsMouse = True
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)
]
--myLayoutHook =
-- avoidStruts $
--smartBorders $
-- Especificamos los tipos de layouts, podemos hacer las conbinaciones que mas nos acomodemos
myLayout = avoidStruts $ smartBorders $ Mirror tiled ||| Full
--myLayout = avoidStruts $ smartBorders $ simpleFloat ||| Full ||| tabbed shrinkText defaultTheme ||| Mirror tiled ||| Grid ||| Dishes 2 (1/6) ||| Circle ||| ThreeCol 1 (3/100) (1/2)
where
-- default tiling algorithm partitions the screen into two panes
-- Espacio entre las ventanas
tiled = spacing 5 $ Tall nmaster delta ratio
tileds = spacing 5 $ Tall nmaster delta ratio
grids = spacing 5 $ Grid
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 3/100
myLogHook :: X ()
myLogHook = fadeInactiveLogHook fadeAmount
where
--Cantidad de transparencia
fadeAmount = 0.6
myStartupHook = do
-- No olvidar el permiso de ejecucion
-- En este script se puede inciar feh,xcompmgr (para hacer transparentes las ventanas) , stalonetray (bandeja del sistema)
spawn "/home/usuarios/.xmonad/init.sh"
myManagementHooks :: [ManageHook]
myManagementHooks = [
resource =? "stalonetray" --> doIgnore
]
main = do
-- Inicia la barra xmobar
xmproc <- spawnPipe "xmobar"
session <- getEnv "DESKTOP_SESSION"
--xmonad $ maybe desktopConfig desktop session
xmonad $ ewmh defaultConfig {
--xmonad $ withUrgencyHook NoUrgencyHook defaultConfig {
--layoutHook = avoidStruts $ layoutHook defaultConfig,
layoutHook = myLayout,
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
borderWidth = myBorderWidth,
modMask = myModMask,
--numlockMask = myNumlockMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
logHook = myLogHook,
--
manageHook = manageDocks <+> manageHook defaultConfig <+> composeAll myManagementHooks,
--
startupHook = myStartupHook
-- hooks, layouts
--manageHook = myManageHook <+> manageDocks,
--logHook = myLogHook workspaceBarPipe >> fadeInactiveLogHook 0xdddddddd,
-- For use with no panels or just dzen2
--layoutHook = ewmhDesktopsLayout $ avoidStruts $ myLayout
--layoutHook = myLayoutHook
}
--desktop "gnome" = gnomeConfig
--desktop "kde" = kde4Config
--desktop "xfce" = xfceConfig
--desktop "xmonad-mate" = gnomeConfig
desktop _ = desktopConfig
--------------------------------------------------------------------------
Configuracion de xmobar
~/.xmobarrc
--------------------------------------------------------------------------
Config { font = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
--, position = Top
, position = TopW L 95
, lowerOnStart = True
, allDesktops = True
, commands = [ Run Weather "EGPF" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-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
]
, sepChar = "%"
, alignSep = "}{"
, template = "%cpu% | %memory% * %swap% | %eth0% - %eth1% }{ <fc=#ee9a00>%date%</fc>| %EGPF% | %uname%"
}
--------------------------------------------------------------------------
Anexo unos capturas de pantalla
-- Mirror tiled
-- Full
-- Circle con transparencia
-- xmobar
-- Mirror tiled, imagen de fondo, ventanas trasnparentes
Algunos atajos del xmonad:
super
+ space : rotar layouts
+ enter : hacer la ventana actual a principal
+ tab : rotar las ventanas
+ p : Abrir gmrun
Para lograr la transparencia instalar xcompmgr
xcompmgr -I1 -O1 -Ff &
Pueden instalar feh para la imagen de fondo:
feh --randomize --bg-scale ~/Downloads/images/*
Un protector de pantalla xlock:
xlock -mode matrix
Con aportaciones de @cookkie_galleto






No hay comentarios:
Publicar un comentario