├── README.md
├── alacritty
└── alacritty.yml
├── dotfiles-manage
└── install.sh
├── fish
├── config.fish
└── fish_variables
├── helix
├── config.toml
└── languages.toml
├── hypr
├── hyprland.conf
├── hyprpaper.conf
└── wallpaper.jpg
├── rofi
└── config.rasi
└── waybar
├── config.jsonc
└── style.css
/README.md:
--------------------------------------------------------------------------------
1 | # Dotfiles
2 | Linux下Hyprland桌面环境配置文件
3 | ## 使用
4 | ### 一键脚本(Arch系pacman包管理)
5 | ```sh
6 | git clone https://github.com/sgj123456/dotfiles.git $HOME/dotfiles
7 | chmod 777 $HOME/dotfiles/dotfiles-manage/install.sh
8 | sh $HOME/dotfiles//dotfiles-manage/install.sh
9 | ```
10 | ### 手动安装
11 | #### 前置条件
12 | + Arch Linux
13 | 1. 字体
14 | ```sh
15 | pacman -S nerd-fonts-jetbrains-mono --noconfirm
16 | ```
17 | 2. 程序
18 | ```sh
19 | pacman -S fish starship waybar rofi hyprland hyprpaper alacritty zoxide fzf grim dunst helix eza atuin --noconfirm
20 | ```
21 | + Other Linux
22 | 请自行安装所需应用
23 | #### 载入配置
24 | 1. 放置配置文件
25 | ```sh
26 | mkdir $HOME/Pictures
27 | git clone https://github.com/sgj123456/dotfiles.git $HOME/dotfiles
28 | cp -r $HOME/dotfiles/* $HOME/.config/
29 | ```
30 | ## 配置
31 | ### Hyprland
32 | + Win q 打开新终端(Alacritty)
33 | + Win c 杀死窗口
34 | + Win r 打开应用选择器(rofi -show drun)
35 | + Win w 显示/隐藏横条(waybar)
36 | + Win s 区域截图(默认保存到$HOME/Pictures文件夹)
37 | + ...
38 | ### Alacritty
39 | + Ctrl Shift N 打开新窗口(当前目录)
40 | + ...
41 | ### Zoxide
42 | + `z [路径] ` Tab 查找目录
43 | + ...
44 | ### The Fuck
45 | `fuck` 为上一条未成功执行的命令纠错
46 | + Enter 执行纠错命令
47 | + Ctrl c 取消纠错命令
48 | ### eza
49 | + `eza`
50 | + `eza -a`
51 | + `eza -l`
52 | + `eza --tree --level=[数字]` 以树状显示`[数字]`层目录
53 | ### Helix
54 | + ...
55 | ## Package
56 | + [Helix](https://github.com/helix-editor/helix/) 文本编辑器
57 | + [fish](https://fishshell.com/) Shell
58 | + [Starship](https://starship.rs/) 终端美化工具
59 | + [waybar](https://github.com/Alexays/Waybar/) 窗口Bar
60 | + [rofi](https://davatorium.github.io/rofi/) 窗口切换器
61 | + [Hyprland](https://hyprland.org/) 窗口管理器
62 | + [Dunst](https://dunst-project.org/) 通知管理器
63 | + [eza](https://github.com/eza-community/eza) ls命令升级版
64 | + [atuin](https://atuin.sh/) 历史命令查询
65 | + ...
66 |
--------------------------------------------------------------------------------
/alacritty/alacritty.yml:
--------------------------------------------------------------------------------
1 | window:
2 | opacity: 0.5
3 | scrolling:
4 | history: 15000
5 | font:
6 | normal:
7 | family: jetbrains mono nerd font
8 | bold:
9 | family: jetbrains mono nerd font
10 | style: Bold
11 | size: 12
12 | glyph_offset:
13 | x: 0
14 | y: 0
15 | colors:
16 | primary:
17 | foreground: '0xabcdef'
18 | background: '0x000000'
19 | selection:
20 | text: CellForeground
21 | background: '0x3e4452'
22 | normal:
23 | black: '0x2c323c'
24 | red: '0xe06c75'
25 | green: '0x98c379'
26 | yellow: '0xe5c07b'
27 | blue: '0x61afef'
28 | magenta: '0xc678dd'
29 | cyan: '0x56b6c2'
30 | white: '0x5c6370'
31 | bright:
32 | black: '0x3e4452'
33 | red: '0xe06c75'
34 | green: '0x98c379'
35 | yellow: '0xe5c07b'
36 | blue: '0x61afef'
37 | magenta: '0xc678dd'
38 | cyan: '0x56b6c2'
39 | white: '0xabb2bf'
40 | cursor:
41 | style:
42 | shape: Block
43 | blinking: Always
44 | key_bindings:
45 | - { key: N, mods: Control|Shift, action: SpawnNewInstance }
46 |
--------------------------------------------------------------------------------
/dotfiles-manage/install.sh:
--------------------------------------------------------------------------------
1 | echo "脚本启动中"
2 | if command -v pacman -Syyu >/dev/null; then
3 | mkdir $HOME/Pictures
4 | hyprland=hyprland
5 | if lspci | grep -iq nvidia; then
6 | echo "检测到Nvidia显卡,自动切换为hyprland-nvidia,请确保已经添加archlinuxcn源!!!"
7 | hyprland=hyprland-nvidia
8 | fi
9 | sudo pacman -S nerd-fonts-jetbrains-mono fish starship waybar rofi $hyprland hyprpaper alacritty zoxide fzf grim dunst eza helix atuin --noconfirm
10 | cp -r $HOME/dotfiles/* $HOME/.config/
11 | echo "安装Helix代码高亮"
12 | helix --grammar fetch
13 | helix --grammar build
14 | else
15 | echo "脚本暂不支持此系统,请自行安装应用"
16 | fi
17 |
--------------------------------------------------------------------------------
/fish/config.fish:
--------------------------------------------------------------------------------
1 | if status is-interactive
2 | # Commands to run in interactive sessions can go here
3 | set -gx fish_greeting
4 | set -gx EDITOR helix
5 | abbr ls eza
6 | abbr la eza -a
7 | abbr ll eza -l
8 | abbr lt eza -T
9 | zoxide init fish | source
10 | starship init fish | source
11 | atuin init fish | source
12 | end
13 |
--------------------------------------------------------------------------------
/fish/fish_variables:
--------------------------------------------------------------------------------
1 | # This file contains fish universal variable definitions.
2 | # VERSION: 3.0
3 | SETUVAR __fish_initialized:3400
4 | SETUVAR fish_color_autosuggestion:555\x1ebrblack
5 | SETUVAR fish_color_cancel:\x2dr
6 | SETUVAR fish_color_command:blue
7 | SETUVAR fish_color_comment:red
8 | SETUVAR fish_color_cwd:green
9 | SETUVAR fish_color_cwd_root:red
10 | SETUVAR fish_color_end:green
11 | SETUVAR fish_color_error:brred
12 | SETUVAR fish_color_escape:brcyan
13 | SETUVAR fish_color_history_current:\x2d\x2dbold
14 | SETUVAR fish_color_host:normal
15 | SETUVAR fish_color_host_remote:yellow
16 | SETUVAR fish_color_normal:normal
17 | SETUVAR fish_color_operator:brcyan
18 | SETUVAR fish_color_param:cyan
19 | SETUVAR fish_color_quote:yellow
20 | SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
21 | SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
22 | SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
23 | SETUVAR fish_color_status:red
24 | SETUVAR fish_color_user:brgreen
25 | SETUVAR fish_color_valid_path:\x2d\x2dunderline
26 | SETUVAR fish_key_bindings:fish_default_key_bindings
27 | SETUVAR fish_pager_color_completion:normal
28 | SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di
29 | SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
30 | SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
31 | SETUVAR fish_pager_color_selected_background:\x2dr
32 |
--------------------------------------------------------------------------------
/helix/config.toml:
--------------------------------------------------------------------------------
1 |
2 | theme = "base16_transparent"
3 | [editor]
4 | line-number = "absolute"
5 | mouse = false
6 | cursorline = true
7 | cursorcolumn = false
8 | auto-info = true
9 | bufferline = "multiple"
10 | idle-timeout = 0
11 | completion-trigger-len = 1
12 | color-modes = true
13 | [editor.statusline]
14 | left = ["mode", "spinner"]
15 | center = ["file-name"]
16 | right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
17 | separator = "│"
18 | mode.normal = "NORMAL"
19 | mode.insert = "INSERT"
20 | mode.select = "SELECT"
21 | [editor.file-picker]
22 | hidden = true
23 | [editor.cursor-shape]
24 | insert = "bar"
25 | normal = "block"
26 | select = "underline"
27 | [editor.whitespace.render]
28 | space = "all"
29 | tab = "all"
30 | newline = "none"
31 | [editor.whitespace.characters]
32 | space = "·"
33 | nbsp = "⍽"
34 | tab = "→"
35 | newline = "⏎"
36 | tabpad = "·"
37 | [editor.lsp]
38 | display-messages = true
39 | display-inlay-hints = true
40 | auto-signature-help = true
41 | display-signature-help-docs = true
42 | [editor.indent-guides]
43 | render = true
44 | character = "▏" # Some characters that work well: "▏", "┆", "┊", "⸽"
45 | skip-levels = 1
46 |
--------------------------------------------------------------------------------
/helix/languages.toml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/hypr/hyprland.conf:
--------------------------------------------------------------------------------
1 | # This is an example Hyprland config file.
2 | #
3 | # Refer to the wiki for more information.
4 |
5 | #
6 | # Please note not all available settings / options are set here.
7 | # For a full list, see the wiki
8 | #
9 |
10 | # See https://wiki.hyprland.org/Configuring/Monitors/
11 | monitor=,preferred,auto,auto
12 |
13 |
14 | # See https://wiki.hyprland.org/Configuring/Keywords/ for more
15 |
16 | # Execute your favorite apps at launch
17 | exec-once = waybar & hyprpaper & fcitx5 & dunst
18 |
19 | # Source a file (multi-file configs)
20 | # source = ~/.config/hypr/myColors.conf
21 |
22 | # Some default env vars.
23 | env = XCURSOR_SIZE,24
24 |
25 | # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
26 | input {
27 | kb_layout = us
28 | kb_variant =
29 | kb_model =
30 | kb_options =
31 | kb_rules =
32 |
33 | follow_mouse = 1
34 |
35 | touchpad {
36 | natural_scroll = false
37 | }
38 |
39 | sensitivity = 1 # -1.0 - 1.0, 0 means no modification.
40 |
41 | repeat_rate = 40
42 | repeat_delay = 300
43 | }
44 |
45 | general {
46 | # See https://wiki.hyprland.org/Configuring/Variables/ for more
47 |
48 | gaps_in = 0
49 | gaps_out = 2
50 | border_size = 2
51 | col.active_border = rgba(66ccffaa) rgba(66ccffee) 50deg
52 | col.inactive_border = rgba(112233aa)
53 |
54 | layout = dwindle
55 | }
56 |
57 | decoration {
58 | # See https://wiki.hyprland.org/Configuring/Variables/ for more
59 |
60 | rounding = 2.5
61 |
62 | drop_shadow = true
63 | shadow_range = 10
64 | shadow_render_power = 1
65 | col.shadow = rgba(ee1a1a1a)
66 |
67 | active_opacity = 1
68 | inactive_opacity = 0.95
69 |
70 | blur {
71 | size = 0
72 | passes = 1
73 | ignore_opacity = true
74 | }
75 | }
76 |
77 | animations {
78 | enabled = true
79 |
80 | # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
81 |
82 | bezier = wind, 0.05, 0.9, 0.1, 1.05
83 | bezier = winIn, 0.1, 1.1, 0.1, 1.1
84 | bezier = winOut, 0.3, -0.3, 0, 1
85 | bezier = liner, 1, 1, 1, 1
86 |
87 | animation = windows, 1, 6, wind, slide
88 | animation = windowsIn, 1, 6, winIn, slide
89 | animation = windowsOut, 1, 5, winOut, slide
90 | animation = windowsMove, 1, 5, wind, slide
91 | animation = border, 1, 1, liner
92 | animation = borderangle, 1, 30, liner, loop
93 | animation = fade, 1, 10, default
94 | animation = workspaces, 1, 5, wind
95 | }
96 |
97 | dwindle {
98 | # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
99 | pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
100 | preserve_split = true # you probably want this
101 | }
102 |
103 | master {
104 | # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
105 | new_is_master = true
106 | }
107 |
108 | gestures {
109 | # See https://wiki.hyprland.org/Configuring/Variables/ for more
110 | workspace_swipe = false
111 | }
112 |
113 | # Example per-device config
114 | # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
115 | device:epic-mouse-v1 {
116 | sensitivity = -0.5
117 | }
118 |
119 | # Example windowrule v1
120 | # windowrule = float, ^(kitty)$
121 | # Example windowrule v2
122 | # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
123 | # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
124 | windowrulev2 = pin,class:^(showmethekey-gtk)$
125 |
126 | # See https://wiki.hyprland.org/Configuring/Keywords/ for more
127 | $mainMod = SUPER
128 |
129 | # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
130 | bind = $mainMod, Q, exec, alacritty
131 | bind = $mainMod, C, killactive,
132 | bind = $mainMod, M, exit,
133 | bind = $mainMod, E, exec, dolphin
134 | bind = $mainMod, V, togglefloating,
135 | bind = $mainMod, R, exec, rofi -show drun
136 | bind = $mainMod, P, pseudo, # dwindle
137 | bind = $mainMod, J, togglesplit, # dwindle
138 | bind = $mainMod, S, exec, grim -g "$(slurp)" - | tee "$HOME/Pictures/$(date +%H:%M:%S@%m-%d).png" | cliphist store
139 | bind = $mainMod, W, exec, killall -SIGUSR1 waybar
140 |
141 | # Move focus with mainMod + arrow keys
142 | bind = $mainMod, left, movefocus, l
143 | bind = $mainMod, right, movefocus, r
144 | bind = $mainMod, up, movefocus, u
145 | bind = $mainMod, down, movefocus, d
146 |
147 | # Switch workspaces with mainMod + [0-9]
148 | bind = $mainMod, 1, workspace, 1
149 | bind = $mainMod, 2, workspace, 2
150 | bind = $mainMod, 3, workspace, 3
151 | bind = $mainMod, 4, workspace, 4
152 | bind = $mainMod, 5, workspace, 5
153 | bind = $mainMod, 6, workspace, 6
154 | bind = $mainMod, 7, workspace, 7
155 | bind = $mainMod, 8, workspace, 8
156 | bind = $mainMod, 9, workspace, 9
157 | bind = $mainMod, 0, workspace, 10
158 |
159 | # Move active window to a workspace with mainMod + SHIFT + [0-9]
160 | bind = $mainMod SHIFT, 1, movetoworkspace, 1
161 | bind = $mainMod SHIFT, 2, movetoworkspace, 2
162 | bind = $mainMod SHIFT, 3, movetoworkspace, 3
163 | bind = $mainMod SHIFT, 4, movetoworkspace, 4
164 | bind = $mainMod SHIFT, 5, movetoworkspace, 5
165 | bind = $mainMod SHIFT, 6, movetoworkspace, 6
166 | bind = $mainMod SHIFT, 7, movetoworkspace, 7
167 | bind = $mainMod SHIFT, 8, movetoworkspace, 8
168 | bind = $mainMod SHIFT, 9, movetoworkspace, 9
169 | bind = $mainMod SHIFT, 0, movetoworkspace, 10
170 |
171 | # Scroll through existing workspaces with mainMod + scroll
172 | bind = $mainMod, mouse_down, workspace, e+1
173 | bind = $mainMod, mouse_up, workspace, e-1
174 |
175 | # Move/resize windows with mainMod + LMB/RMB and dragging
176 | bindm = $mainMod, mouse:272, movewindow
177 | bindm = $mainMod, mouse:273, resizewindow
178 |
--------------------------------------------------------------------------------
/hypr/hyprpaper.conf:
--------------------------------------------------------------------------------
1 | preload = ~/.config/hypr/wallpaper.jpg
2 |
3 | wallpaper = HDMI-A-1,~/.config/hypr/wallpaper.jpg
4 |
--------------------------------------------------------------------------------
/hypr/wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sgj123456/dotfiles/cd3e18176d350c4c01458e63f594609a40537c55/hypr/wallpaper.jpg
--------------------------------------------------------------------------------
/rofi/config.rasi:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/waybar/config.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "layer": "top",
3 | "position": "top",
4 | "margin": "5",
5 | "mod": "dock",
6 | "exclusive": true,
7 | "passthrough": false,
8 | "gtk-layer-shell": true,
9 | "height": 35,
10 | "modules-left": [
11 | "clock",
12 | "wlr/workspaces"
13 | ],
14 | "modules-center": [
15 | "hyprland/window"
16 | ],
17 | "modules-right": [
18 | "network",
19 | "temperature",
20 | "cpu",
21 | "tray"
22 | ],
23 | "include": [],
24 | "hyprland/window": {
25 | "format": "{}"
26 | },
27 | "wlr/workspaces": {
28 | "disable-scroll": true,
29 | "all-outputs": true,
30 | "on-click": "activate",
31 | "persistent_workspaces": {
32 | "1": [],
33 | "2": [],
34 | "3": [],
35 | "4": [],
36 | "5": [],
37 | "6": [],
38 | "7": [],
39 | "8": [],
40 | "9": [],
41 | "10": []
42 | }
43 | },
44 | "tray": {
45 | "icon-size": 18,
46 | "spacing": 10
47 | },
48 | "clock": {
49 | "format": "{: %R %a, %m月%e日}",
50 | "tooltip-format": "{:%Y %B}\n{calendar}"
51 | },
52 | "temperature": {
53 | "thermal-zone": 1,
54 | "format": " {temperatureC}°C",
55 | "critical-threshold": 80,
56 | "format-critical": "{temperatureC}°C "
57 | },
58 | "network": {
59 | // "interface": "wlp2*", // (Optional) To force the use of this interface
60 | "format-wifi": " {signalStrength}%",
61 | "format-ethernet": "{ipaddr}/{cidr}",
62 | "tooltip-format": "{essid} - {ifname} via {gwaddr}",
63 | "format-linked": "{ifname} (No IP)",
64 | "format-disconnected": "Disconnected ⚠",
65 | "format-alt": "{ifname}:{essid} {ipaddr}/{cidr}"
66 | },
67 | "bluetooth": {
68 | "format": " {status}",
69 | "format-disabled": " off",
70 | "format-connected": " {num_connections}",
71 | "tooltip-format": "{device_alias}",
72 | "tooltip-format-connected": " {device_enumerate}",
73 | "tooltip-format-enumerate-connected": "{device_alias}",
74 | "on-click": "~/.config/waybar/scripts/bluetooth"
75 | },
76 | "cpu": {
77 | "format": " {usage}%"
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/waybar/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | border: none;
3 | border-radius: 0;
4 | font-family: "JetBrainsMono Nerd Font";
5 | font-weight: bold;
6 | font-size: 16px;
7 | min-height: 0;
8 | }
9 |
10 | window#waybar {
11 | border-radius: 5px;
12 | background: rgba(0, 0, 0, 0.70);
13 | color: #cdd6f4;
14 | }
15 |
16 | tooltip {
17 | background: #010409;
18 | border-radius: 10px;
19 | }
20 |
21 | #workspaces button {
22 | padding: 5px;
23 | color: #313244;
24 | margin-right: 5px;
25 | }
26 |
27 | #workspaces button.active {
28 | color: #a6adc8;
29 | }
30 |
31 | #workspaces button.focused {
32 | color: #a6adc8;
33 | background: #010409;
34 | }
35 |
36 | #workspaces button.urgent {
37 | color: #11111b;
38 | background: #010409;
39 | }
40 |
41 | #workspaces button:hover {
42 | background: #010409;
43 | color: #cdd6f4;
44 | }
45 |
46 | #window,
47 | #clock,
48 | #battery,
49 | #pulseaudio,
50 | #network,
51 | #bluetooth,
52 | #temperature,
53 | #workspaces,
54 | #tray,
55 | #backlight {
56 | padding: 0px 10px;
57 | }
58 |
59 | /*close to the right */
60 | #bluetooth {
61 | margin-right: 10px;
62 | }
63 |
64 | #temperature.critical {
65 | color: #eba0ac;
66 | }
67 |
68 | #tray {
69 | margin-right: 10px;
70 | }
71 |
72 | #workspaces {
73 | margin-left: 10px;
74 | padding-right: 0px;
75 | padding-left: 5px;
76 | }
77 |
78 | #window {
79 | margin-left: 60px;
80 | margin-right: 60px;
81 | }
82 |
83 | #clock {
84 | margin-left: 5px;
85 | color: #fab387;
86 | }
87 |
88 | #network {
89 | color: #f9e2af;
90 | }
91 |
92 | #bluetooth {
93 | color: #89b4fa;
94 | margin-right: 10px
95 | }
96 |
97 | #pulseaudio {
98 | color: #89b4fa;
99 | }
100 |
101 | #pulseaudio.microphone {
102 | color: #cba6f7;
103 | margin-right: 10px;
104 | }
105 |
106 | #battery {
107 | color: #a6e3a1;
108 | margin-right: 10px;
109 | }
110 |
--------------------------------------------------------------------------------