Dwm

来自linuxsa wiki
跳转到导航 跳转到搜索

note

不要在 .xprofile 里写 exec dwm,因为 LightDM 会自己调用 dwm。

dwm 的默认行为:focusmon() 只搬焦点,不搬光标。要让它跟过去,得自己加一句 XWarpPointer。

Usage

layout

| 符号 | 布局 | 说明 | | ----- | ---------------- | ------------ | | `[]=` | **tile(平铺)** | 标准左右分割布局 | | `><>` | **floating(浮动)** | 自由拖动窗口 | | `[M]` | **monocle(单窗口)** | 只显示一个窗口,其他隐藏 |


move

| 快捷键               | 功能              |
| ----------------- | --------------- |
| `Alt + ,`         | 焦点移到**上一个**显示器  |
| `Alt + .`         | 焦点移到**下一个**显示器  |
| `Alt + Shift + ,` | 把窗口移到**上一个**显示器 |
| `Alt + Shift + .` | 把窗口移到**下一个**显示器 |


Alt+Shift+Enter
    打开xterm
Alt+Shift+C
    关闭窗口
Alt+t
    切换到窗口平铺模式
Alt+m
    切换到单窗口模式
Alt+f
    切换到浮动窗口模式
Alt+b
    显示/隐藏屏幕上方的那条“工具栏”
Alt+p 回车就返回,安装上我是直接 apt
    打开dmenu(dmenu要自己安装,安装方法同dwm,也是下载源码,编译,安装)
Alt+[数字]
    切换到第[数字]各标签,标签类似于多个桌面
Alt+Shift+Q
    注销

auotstart


cat ~/.xprofile 
#!/bin/bash

# ═══ 输入法环境变量(必须!)═══
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

# ═══ 启动 fcitx5(后台运行)═══
fcitx5 &

# ═══ 其他 dwm 常用自启程序(可选)═══
picom &                    # 窗口合成器(透明/阴影效果)
slstatus &                 # dwm 状态栏
# nitrogen --restore &     # 壁纸恢复(如使用 nitrogen)
# dunst &                    # 通知守护进程

chmod +x ~/.xprofile

configure

cursor

sudo apt install breeze-cursor-theme

vi ~/.xprofile
export XCURSOR_THEME=breeze_cursors   #  BLACK
export XCURSOR_SIZE=32             # default is 24, 32 is bigger, 48 is large


# Remove the broken default link
rm -rf ~/.icons/default

# Create correct symlink to black cursor
mkdir -p ~/.icons
ln -s /usr/share/icons/breeze_cursors ~/.icons/default


see also

dwm的使用

Dwm (简体中文)

ArchLinux dwm的安装和配置

Window manager

我选择 dwm 作为窗口管理器的 4 大理由

dwm: A Minimalist Tiling Window Manager For Linux