all repos

dotfiles @ d25692c

i use rach linux btw
4 files changed, 251 insertions(+), 0 deletions(-)
add niri setup
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2025-06-09 17:00:58 +0300
Parent: 6df9c0e
A config/niri/config.kdl
···
                
                1
                +// vim: foldmethod=marker ts=2 sw=2

              
                
                2
                +// auto start {{{

              
                
                3
                +spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1";

              
                
                4
                +spawn-at-startup "~/.config/niri/waybar"

              
                
                5
                +spawn-at-startup "dunst";

              
                
                6
                +spawn-at-startup "wlsunset" "-S" "9:00" "-s" "21:00";

              
                
                7
                +// }}}

              
                
                8
                +// env {{{

              
                
                9
                +environment {

              
                
                10
                +  DISPLAY ":0"

              
                
                11
                +  QT_QPA_PLATFORM "wayland;xcb"

              
                
                12
                +  QT_WAYLAND_DISABLE_WINDOWDECORATION "1"

              
                
                13
                +}

              
                
                14
                +// }}}

              
                
                15
                +// inputs {{{

              
                
                16
                +// https://github.com/YaLTeR/niri/wiki/Configuration:-Input

              
                
                17
                +input {

              
                
                18
                +  keyboard {

              
                
                19
                +    numlock

              
                
                20
                +    xkb {

              
                
                21
                +      layout "us,ua"

              
                
                22
                +      options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"

              
                
                23
                +    }

              
                
                24
                +  }

              
                
                25
                +  focus-follows-mouse

              
                
                26
                +  touchpad {

              
                
                27
                +    tap

              
                
                28
                +    dwt

              
                
                29
                +    // dwtp

              
                
                30
                +    // drag false

              
                
                31
                +    // drag-lock

              
                
                32
                +    // natural-scroll

              
                
                33
                +    accel-speed 0.1

              
                
                34
                +    accel-profile "adaptive"

              
                
                35
                +    scroll-method "two-finger"

              
                
                36
                +    // disabled-on-external-mouse

              
                
                37
                +  }

              
                
                38
                +  mouse {

              
                
                39
                +    accel-speed 0.0

              
                
                40
                +    accel-profile "flat"

              
                
                41
                +  }

              
                
                42
                +}

              
                
                43
                +/// }}}

              
                
                44
                +// Monitors {{{

              
                
                45
                +// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs

              
                
                46
                +output "HDMI-A-1" {

              
                
                47
                +  focus-at-startup

              
                
                48
                +  mode "1920x1080@100.00"

              
                
                49
                +  scale 1

              
                
                50
                +  transform "normal"

              
                
                51
                +  position x=0 y=0

              
                
                52
                +}

              
                
                53
                +

              
                
                54
                +output "eDP-1" {

              
                
                55
                +  mode "1920x1080@60.001"

              
                
                56
                +  scale 1

              
                
                57
                +  transform "normal"

              
                
                58
                +  position x=1920 y=144

              
                
                59
                +}

              
                
                60
                +/// }}}

              
                
                61
                +// Layout {{{

              
                
                62
                +// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout

              
                
                63
                +layout {

              
                
                64
                +  gaps 0

              
                
                65
                +  center-focused-column "never"

              
                
                66
                +  default-column-width { proportion 0.5; }

              
                
                67
                +  border { off; }

              
                
                68
                +  preset-column-widths {

              
                
                69
                +    proportion 0.33333

              
                
                70
                +    proportion 0.5

              
                
                71
                +    proportion 0.66667

              
                
                72
                +  }

              
                
                73
                +  focus-ring {

              
                
                74
                +    width 2

              
                
                75
                +    active-color "#7aa2f7"

              
                
                76
                +    inactive-color "#292e42"

              
                
                77
                +  }

              
                
                78
                +}

              
                
                79
                +// }}}

              
                
                80
                +// general {{{

              
                
                81
                +// disables client-side decorrations if possible

              
                
                82
                +prefer-no-csd

              
                
                83
                +

              
                
                84
                +// set to null if u want disable saving to disk behavior

              
                
                85
                +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"

              
                
                86
                +

              
                
                87
                +// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations

              
                
                88
                +animations {

              
                
                89
                +  // off

              
                
                90
                +  slowdown 1.0

              
                
                91
                +}

              
                
                92
                +// }}}

              
                
                93
                +// window/workspace rules {{{

              
                
                94
                +// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules

              
                
                95
                +// https://github.com/YaLTeR/niri/wiki/Configuration:-move-column-to-workspace

              
                
                96
                +

              
                
                97
                +workspace "tools"

              
                
                98
                +workspace "web"

              
                
                99
                +workspace "dev"

              
                
                100
                +workspace "media"

              
                
                101
                +workspace "laptop" { open-on-output "eDP-1"; }

              
                
                102
                +

              
                
                103
                +window-rule {

              
                
                104
                +  match app-id=r#"anki$"#

              
                
                105
                +  match app-id=r#"obsidian$"#

              
                
                106
                +  match app-id=r#"^org\.keepassxc\.KeePassXC$"#

              
                
                107
                +

              
                
                108
                +  open-on-workspace "tools"

              
                
                109
                +}

              
                
                110
                +

              
                
                111
                +window-rule {

              
                
                112
                +  match app-id=r#"zen$"#

              
                
                113
                +  match app-id=r#"brave$"#

              
                
                114
                +

              
                
                115
                +  open-on-workspace "web"

              
                
                116
                +}

              
                
                117
                +

              
                
                118
                +window-rule { // zen browser's picture in picture

              
                
                119
                +  match app-id=r#"zen$"# title="^Picture-in-Picture$"

              
                
                120
                +  open-floating true

              
                
                121
                +}

              
                
                122
                +

              
                
                123
                +window-rule {

              
                
                124
                +  match app-id=r#"^org\.keepassxc\.KeePassXC$"#

              
                
                125
                +  block-out-from "screen-capture"

              
                
                126
                +}

              
                
                127
                +// }}}

              
                
                128
                +// keybinds {{{

              
                
                129
                +binds {

              
                
                130
                +  Mod+Q { close-window; }

              
                
                131
                +  Mod+Return { spawn "kitty"; }

              
                
                132
                +  Mod+Shift+Return { spawn "wofi" "--show" "drun"; }

              
                
                133
                +  Mod+Shift+Escape { spawn "~/bin/wofi-power-menu"; }

              
                
                134
                +  Super+Alt+L { spawn "swaylock"; } // TODO: change to hyprlock

              
                
                135
                +

              
                
                136
                +  // programs {{{

              
                
                137
                +  Mod+Shift+a { spawn "anki"; }

              
                
                138
                +  Mod+Shift+d { spawn "obsidian"; }

              
                
                139
                +  // Mod+Shift+f { spawn "newsflash"; } // TODO: fix conflict

              
                
                140
                +  Mod+Shift+s { spawn "spotify"; }

              
                
                141
                +  Mod+Shift+t { spawn "telegram-desktop"; }

              
                
                142
                +  Mod+Shift+w { spawn "zen-browser"; }

              
                
                143
                +  // }}}

              
                
                144
                +  // func keys {{{

              
                
                145
                +  // audio

              
                
                146
                +  XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+"; }

              
                
                147
                +  XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"; }

              
                
                148
                +  XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }

              
                
                149
                +  XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }

              
                
                150
                +  XF86AudioPlay        allow-when-locked=true { spawn "playerctl" "play-pause"; }

              
                
                151
                +  XF86AudioNext        allow-when-locked=true { spawn "playerctl" "next"; }

              
                
                152
                +  XF86AudioPrev        allow-when-locked=true { spawn "playerctl" "prev"; }

              
                
                153
                +  // brighthness

              
                
                154
                +  XF86MonBrightnessUp   allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }

              
                
                155
                +  XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }

              
                
                156
                +  // screen shots

              
                
                157
                +  Print { screenshot; }

              
                
                158
                +  Ctrl+Print { screenshot-screen; }

              
                
                159
                +  Alt+Print { screenshot-window; }

              
                
                160
                +  // }}}

              
                
                161
                +  // wm {{{

              
                
                162
                +  Mod+O repeat=false { toggle-overview; }

              
                
                163
                +  Alt+Tab { focus-window-previous; }

              
                
                164
                +

              
                
                165
                +  // window management {{{

              
                
                166
                +  Mod+r { switch-preset-column-width; }

              
                
                167
                +  Mod+t { maximize-column; }

              
                
                168
                +  Mod+f { fullscreen-window; }

              
                
                169
                +

              
                
                170
                +  Mod+Ctrl+f       { toggle-window-floating; }

              
                
                171
                +

              
                
                172
                +  Mod+h { focus-column-left; }

              
                
                173
                +  Mod+j { focus-window-down; }

              
                
                174
                +  Mod+k { focus-window-up; }

              
                
                175
                +  Mod+l { focus-column-right; }

              
                
                176
                +  Mod+Shift+h { move-column-left; }

              
                
                177
                +  Mod+Shift+j { move-window-down; }

              
                
                178
                +  Mod+Shift+k { move-window-up; }

              
                
                179
                +  Mod+Shift+l { move-column-right; }

              
                
                180
                +

              
                
                181
                +  Mod+Minus { set-column-width "-10%"; }

              
                
                182
                +  Mod+Equal { set-column-width "+10%"; }

              
                
                183
                +  // }}}

              
                
                184
                +  // monitor navigation {{{

              
                
                185
                +  Mod+m { focus-monitor-left; }

              
                
                186
                +  Mod+Comma { focus-monitor-right; }

              
                
                187
                +  Mod+Shift+m { move-column-to-monitor-left; }

              
                
                188
                +  Mod+Shift+Comma { move-column-to-monitor-right; }

              
                
                189
                +  // }}}

              
                
                190
                +  // workspaces {{{

              
                
                191
                +  Mod+1 { focus-workspace 1; }

              
                
                192
                +  Mod+2 { focus-workspace 2; }

              
                
                193
                +  Mod+3 { focus-workspace 3; }

              
                
                194
                +  Mod+4 { focus-workspace 4; }

              
                
                195
                +  Mod+5 { focus-workspace 5; }

              
                
                196
                +  Mod+Shift+1 { move-column-to-workspace 1; }

              
                
                197
                +  Mod+Shift+2 { move-column-to-workspace 2; }

              
                
                198
                +  Mod+Shift+3 { move-column-to-workspace 3; }

              
                
                199
                +  Mod+Shift+4 { move-column-to-workspace 4; }

              
                
                200
                +  Mod+Shift+5 { move-column-to-workspace 5; }

              
                
                201
                +

              
                
                202
                +  Mod+WheelScrollDown      cooldown-ms=150 { focus-workspace-down; }

              
                
                203
                +  Mod+WheelScrollUp        cooldown-ms=150 { focus-workspace-up; }

              
                
                204
                +  // }}}

              
                
                205
                +  // }}}

              
                
                206
                +}

              
                
                207
                +// }}}

              
A config/niri/waybar
···
                
                1
                +#!/usr/bin/env bash

              
                
                2
                +waybar -c ~/.config/niri/waybar.jsonc

              
A config/niri/waybar.jsonc
···
                
                1
                +{

              
                
                2
                +  "position": "top",

              
                
                3
                +  "layer": "top",

              
                
                4
                +  "height": 14,

              
                
                5
                +  "margin-top": 0,

              
                
                6
                +  "margin-bottom": 0,

              
                
                7
                +  "margin-left": 0,

              
                
                8
                +  "margin-right": 0,

              
                
                9
                +  "include": [

              
                
                10
                +    "~/.config/waybar/modules/info.json",

              
                
                11
                +    "~/.config/waybar/modules/niri.json"

              
                
                12
                +  ],

              
                
                13
                +

              
                
                14
                +  "modules-left": ["niri/workspaces", "niri/window"],

              
                
                15
                +  "modules-center": ["clock", "cpu"],

              
                
                16
                +  "modules-right": [

              
                
                17
                +    "memory",

              
                
                18
                +    "tray",

              
                
                19
                +    "niri/language",

              
                
                20
                +    "backlight",

              
                
                21
                +    "battery",

              
                
                22
                +    "pulseaudio",

              
                
                23
                +    "network"

              
                
                24
                +  ]

              
                
                25
                +}

              
A config/waybar/modules/niri.json
···
                
                1
                +{

              
                
                2
                +  "niri/workspaces": {

              
                
                3
                +    "format": "{icon}",

              
                
                4
                +    "format-icons": {

              
                
                5
                +      "tools": "󰅨",

              
                
                6
                +      "web": "󰖟",

              
                
                7
                +      "dev": "",

              
                
                8
                +      "media": "󰎄",

              
                
                9
                +      "default": ""

              
                
                10
                +    }

              
                
                11
                +  },

              
                
                12
                +  "niri/language": {

              
                
                13
                +    "format": "󰌌  {}",

              
                
                14
                +    "format-uk": "укр",

              
                
                15
                +    "format-en": "eng"

              
                
                16
                +  }

              
                
                17
                +}