Xmonad安装及入门配置
https://github.com/evan886/myxmonad/tree/master/4bsd
目录
依然存在的问题
1.xmobar 会被其它窗口盖住 以前是不会的 ,现在加了 -d 参数,但是启动后reload才行,但是tray又没了 难道要stanltray才行么 这里学习一下 实在不行就 dzen2
2. trye 托盘也是老是不见
https://wiki.archlinux.org/index.php/Xmobar
pre
一直想找个好用的平铺式的桌面 ,今天终于找到了,用了一个多小时安装,配置和学习,总算可以用在办公了 这是在dovo记下的话 my repository
Here are some tools we've found work well with xmonad:
dmenu, a program dzen, an extensible status bar
xmobar, an extensible status bar
rxvt-unicode, a better terminal
freebsd12
常用快捷
Once you changed your config file you should compile it and restart XMonad. user $xmonad --recompile user $xmonad --restart --recompile #这个非常用用 man xmonad --mod+p , ((myModMask, xK_p), spawn "synapse") -- evan 2019 mod+d , ((myModMask, xK_d), spawn "dmenu_run") mod+mouse 可以移动窗口 启动 gmrun: mod-Shift-p
xmobar
https://wiki.archlinux.org/index.php/Xmobar
https://beginners-guide-to-xmonad.readthedocs.io/configure_xmobar.html
wallpaper
https://hackage.haskell.org/package/xmonad-wallpaper
screeen
-- 2019 记住 变量 = 之间不能和空格 -- The command to lock the screen or show the screensaver. myscreensaver="/usr/local/bin/xscreensaver-command -l" -- myScreensaver = "/usr/local/bin/xscreensaver-command -l" , ((myModMask, xK_p), spawn myscreensaver) auto 的直接打开 直接配置 下面这些是尝试不成功的,但是有帮忙 , ((myModMask, xK_s), spawn "xscreensaver-command -lock") --,((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock" --, ("M-S-l", spawn "xscreensaver-command -lock") 为什么win+q locker了 还有 能自动locker么
https://github.com/vicfryzel/xmonad-config/blob/master/xmonad.hs 就是这个给了帮忙 自己加测试
redshift
https://wiki.archlinux.org/index.php/Redshift
桌面背景
/usr/local/bin/feh --bg-fill /home/evan/wallpaper/Mallnitz_Stappitz_Ankogel-Panorama_01.jpg
pkg installl
stalonetray
me
居然以前的配置可以用了
2019年 9月22日 星期日 22时36分21秒 CST 搞了好几天 ,今天换了一下 https://github.com/sw2wolf/qachina/tree/master/db/doc/freebsd/xmonad 这个的主配置, 因为key 不习惯 再换回我在dovo的配置 居然就全好了 厉害 厉害
launcher deskutils/launchy
https://beginners-guide-to-xmonad.readthedocs.io/intro.html
https://wiki.haskell.org/Xmonad/Config_archive/John_Goerzen's_Configuration
https://github.com/sw2wolf/qachina/tree/master/db/doc/freebsd/xmonad
http://hometown.scau.edu.cn/bbs/forum.php?mod=viewthread&tid=663621
https://beginners-guide-to-xmonad.readthedocs.io/configure_stalonetray.html
see also
https://wiki.haskell.org/Xmonad/Config_archive/adamvo's_xmonad.hs
https://en.wikipedia.org/wiki/Xmonad
https://wiki.gentoo.org/wiki/Xmonad
第一 下载
到自己的 repository 下载
git clone https://github.com/davidbrewer/xmonad-ubuntu-conf.git
第二 安装
mv xmonad-ubuntu-conf/ .xmonad echo "Installing required packages..." sudo apt-get install xmonad trayer libghc-xmonad-dev libghc-xmonad-contrib-dev xmobar xcompmgr nitrogen stalonetray moreutils kupfer #synapse ssh-askpass-gnome thunar terminator remmina echo “Creating xmonad xsession configuration…” #sudo mv /usr/share/xsessions/xmonad.desktop /usr/share/xsessions/xmonad.desktop.original #sudo cp ~/.xmonad/xmonad.desktop /usr/share/xsessions #sudo cp ~/.xmonad/images/custom_xmonad_badge.png /usr/share/unity-greeter echo “Linking to customized gnome 2 configuration…” #mv ~/.gtkrc-2.0 ~/gtkrc-2.0.original #ln -s .xmonad/.gtkrc-2.0 ~/.gtkrc-2.0 apt install trayer # apt install trayer Set up an icon tray add to startup-hook trayer --edge top --align right --SetDockType true --SetPartialStrut true \ --expand true --width 5 --transparent true --tint 0x191970 --height 26 & open startup-hook add # Use synapse as our app launcher. (-s: don't display until requested) if [ -z "$(pgrep kupfer)" ] ; then kupfer & fi Installing_xmonad on Debian
usage
对了,这是一个几乎没有panel的桌面,所以快捷键就非常多了,下面是我常用的 xfce-terminal tab 之间是 alt+1 or 2 etc no. mod-enter #突出当前窗口,并提升到左边主screen mod-shift-NUMBER: move a window to a workspace using its number #去到另一个当前窗口 mod-j mod-h mod-l mod-z mod-a mod-shift-c #closing mod-shift-q: quits xmonad, returning to the login screen apt-get install dmenu http://stackoverflow.com/questions/11718196/how-to-start-using-xmonad-on-ubuntu-12-04-lts using the “super” key as the mod key, which on many keyboards is the windows logo key #去到另一个当前窗口 mod-j or mod-shift-tab moves your focus to the previous window #变小 mod-l and mod-h will grow or shrink the size of the master pane. mod-a and mod-z will grow or shrink the size of the currently focused window.
my xmonad 常用快捷键
Launching software When you start xmonad for the first time, you’re not looking at much. You will see a status bar near the top of your screen, and that’s about it. There are no menus for selecting programs to run. Everything is launched in one of two ways: mod-shift-enter: launches a terminal window (Terminator). You can run other programs from the terminal. ctrl-space:(已被我改了) launches a Synapse prompt. You can run any program by starting to type its name, and then hitting enter once Synapse has found the program you want. ***************** Changing layouts mod-space: cycle through the available layouts` mod-shift-space: jump to the default layout ************ Focusing windows (#去到另一个当前窗口 写代码时,这个特别有用) mod-j or mod-shift-tab moves your focus to the previous window mod-k or mod-tab moves your focus to the next window mod-m moves your focus to the master pane (see next section) or, you can focus a window by moving your mouse cursor over it *********** You can manipulate the contents of the master pane as follows: mod-enter will swap the currently focused window with the contents of the master pane, making it the new master. mod-comma will make the master pane contain more windows, if the current layout supports this. mod-period will make the master pane contain fewer contains, if the current layout supports this. ********************* Resizing windows mod-l and mod-h will grow or shrink the size of the master pane. mod-a and mod-z will grow or shrink the size of the currently focused window. ************ Closing windows You can use mod-shift-c to close the focused window if you are done with it. *********** Quitting or restarting xmonad The following commands involve quitting or restarting xmonad: mod-shift-q: quits xmonad, returning to the login screen. mod-q: restarts and recompiles xmonad. Does not require restarting any other programs you may be running, and happens very quickly. Very useful while experimenting with changes to your xmonad.hs file!
xmonad 显示托盘
# startup-hook or # TRAY ICON SOFTWARE on bsd #要先配置文件 哦 在bsd上 cat ~/.stalonetrayrc decorations none transparent false dockapp_mode none geometry 5x1-40+0 max_geometry 5x1-325-10 background "#FFFFFF" kludges force_icons_size grow_gravity NE icon_gravity NE icon_size 24 sticky true #window_strut none window_type dock window_layer bottom #no_shrink false skip_taskbar true 然后再启动 stalonetray stalonetray \ --icon-gravity E \ --geometry 5x1-0+0 \ --max-geometry 5x1-0+0 \ --background '#000000' \ --skip-taskbar \ --icon-size 24 \ --kludges force_icons_size \ --window-strut none \ # 这个在bsd上会被全屏盖住 # apt install trayer Set up an icon tray 2016-09-07pm # trayer --edge top --align right --SetDockType true --SetPartialStrut true \ # --expand true --width 4 --transparent true --tint 0x191970 --height 26 & 新公司要用到VPN 于是 找半天 才发现 上次升级后 xmonad的配置有些少了 apt install trayer # apt install trayer Set up an icon tray add to startup-hook # TRAY ICON SOFTWARE # apt install trayer Set up an icon tray trayer --edge top --align right --SetDockType true --SetPartialStrut true \ --expand true --width 9 --transparent true --tint 0x191970 --height 26 &
多显示器
troubleshooting
现在上面的bar会在全屏化不见了 不方便
xmobar显示中文乱码 原来是字体问题
font = "xft:Ubuntu Mono-12", --font = "xft:Bitstream Vera Sans Mono:size=14:bold:antialias=true" #这个导致乱码
other
参考
xmonad a guided tour http://xmonad.org/tour.html
https://wiki.archlinux.org/index.php/Xmonad_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
我的 xmonad 配置
https://zlb.me/2011/07/15/my-xmonad-config/
XMonad Starter Kit 平铺窗口管理器配置分享 https://ruby-china.org/topics/2357
http://lastavenger.github.io/2015/07/20/configure-of-archlinux.html
http://lastavenger.github.io/2016/03/11/thinkpad-l450.html
http://blog.csdn.net/ooaven/article/details/9002302
https://maskray.me/blog/2011-11-30-xmonad-config
dzwn2
sudo pkg install dzen2
https://github.com/pbrisbin/xmonad-config/blob/master/xmonad.hs