all repos

dotfiles @ 993945b

i use rach linux btw
3 files changed, 124 insertions(+), 125 deletions(-)
refactor(waybar): move modules to sep files
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2023-11-15 14:56:43 +0200
Parent: c5b3d5b
M config/waybar/config
···
        1
        
        -// vim: ft=jsonc

      
        2
        1
         {

      
        3
        
        -    "position": "top",

      
        4
        
        -    "layer": "top",

      
        5
        
        -    "height": 14,

      
        6
        
        -    "margin-top": 0,

      
        7
        
        -    "margin-bottom": 0,

      
        8
        
        -    "margin-left": 0,

      
        9
        
        -    "margin-right": 0,

      
        10
        
        -    "modules-left": [

      
        11
        
        -        "hyprland/workspaces",

      
        12
        
        -        "hyprland/window"

      
        13
        
        -    ],

      
        14
        
        -    "modules-center": [

      
        15
        
        -        "clock",

      
        16
        
        -        "cpu"

      
        17
        
        -    ],

      
        18
        
        -    "modules-right": [

      
        19
        
        -        "memory",

      
        20
        
        -        "tray",

      
        21
        
        -        "hyprland/language",

      
        22
        
        -        "backlight",

      
        23
        
        -        "battery",

      
        24
        
        -        "pulseaudio",

      
        25
        
        -        "network"

      
        26
        
        -    ],

      
        
        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,

      
        27
        9
         

      
        28
        
        -    // modules

      
        29
        
        -    "clock": {

      
        30
        
        -        "format": "  {:%a, %d %b %H:%M}",

      
        31
        
        -        "tooltip": "true",

      
        32
        
        -        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",

      
        33
        
        -        "on-click": "morgen"

      
        34
        
        -    },

      
        
        10
        +  "include": [

      
        
        11
        +    "~/.config/waybar/modules/hypr.json",

      
        
        12
        +    "~/.config/waybar/modules/info.json"

      
        
        13
        +  ],

      
        35
        14
         

      
        36
        
        -    "hyprland/workspaces": {

      
        37
        
        -        "active-only": false,

      
        38
        
        -        "all-outputs": true,

      
        39
        
        -        "disable-scroll": false,

      
        40
        
        -        "on-scroll-up": "hyprctl dispatch workspace -1",

      
        41
        
        -        "on-scroll-down": "hyprctl dispatch workspace +1",

      
        42
        
        -        "format": "{icon}",

      
        43
        
        -        "on-click": "activate",

      
        44
        
        -        "sort-by-number": true,

      
        45
        
        -        "persistent_workspaces": { "*": 9 },

      
        46
        
        -        "format-icons": {

      
        47
        
        -            "urgent": "",

      
        48
        
        -            "default": "",

      
        49
        
        -            "1": "󰅨",

      
        50
        
        -            "2": "󰖟",

      
        51
        
        -            "3": "",

      
        52
        
        -            "4": "󰠮",

      
        53
        
        -            "5": "",

      
        54
        
        -            "6": "󰅨",

      
        55
        
        -            "7": "󰎄"

      
        56
        
        -        }

      
        57
        
        -    },

      
        58
        
        -

      
        59
        
        -    "hyprland/window": {

      
        60
        
        -        "max-length": "40"

      
        61
        
        -    },

      
        62
        
        -

      
        63
        
        -    "battery": {

      
        64
        
        -        "format":"{icon}  {capacity}%",

      
        65
        
        -        "format-charging":"{icon}  {capacity}%",

      
        66
        
        -        "format-plugged": "{capacity}%  ",

      
        67
        
        -        "format-alt": "{icon}  {time}",

      
        68
        
        -        "format-icons": ["", "", "", "", ""],

      
        69
        
        -        "tooltip": false,

      
        70
        
        -        "states": {

      
        71
        
        -            "good": 95,

      
        72
        
        -            "warning": 30,

      
        73
        
        -            "critical": 15

      
        74
        
        -        }

      
        75
        
        -    },

      
        76
        
        -

      
        77
        
        -    "memory": {

      
        78
        
        -        "format": "󰍛  {used}%",

      
        79
        
        -        "interval": 5

      
        80
        
        -    },

      
        81
        
        -

      
        82
        
        -    "cpu": {

      
        83
        
        -        "format": "󰻠  {usage}%",

      
        84
        
        -        "format-alt": "󰻠  {avg_frequency} GHz",

      
        85
        
        -        "interval": 5

      
        86
        
        -    },

      
        87
        
        -

      
        88
        
        -    "network": {

      
        89
        
        -        "format-wifi": "󰤨  {essid}",

      
        90
        
        -        "format-linked": " {ifname} (No IP)",

      
        91
        
        -        "format-disconnected": "󰤭",

      
        92
        
        -        "format-alt": "󰤨 {ifname}: {ipaddr}/{cidr}",

      
        93
        
        -        "tooltip-format": "{essid}",

      
        94
        
        -        "on-click-right": "nm-connection-editor",

      
        95
        
        -        "tooltip": false

      
        96
        
        -    },

      
        97
        
        -

      
        98
        
        -    "tray": {

      
        99
        
        -        "icon-size": 16,

      
        100
        
        -        "spacing": 5

      
        101
        
        -    },

      
        102
        
        -

      
        103
        
        -    "backlight": {

      
        104
        
        -        "format": "{icon}  {percent}%",

      
        105
        
        -        "format-icons": ["", "", "", "", "", "", "", "", ""],

      
        106
        
        -        "on-scroll-up": "brightnessctl set +10%",

      
        107
        
        -        "on-scroll-down": "brightnessctl set 10%-",

      
        108
        
        -        "tooltip": false

      
        109
        
        -    },

      
        110
        
        -

      
        111
        
        -    "pulseaudio": {

      
        112
        
        -        "format": "{icon}  {volume}%",

      
        113
        
        -        "format-muted": "󰝟",

      
        114
        
        -        "format-icons": {

      
        115
        
        -            "default": ["󰕿", "󰖀", "󰕾"],

      
        116
        
        -            "headphone": ""

      
        117
        
        -        },

      
        118
        
        -        "on-click": "pavucontrol",

      
        119
        
        -        "tooltip": false,

      
        120
        
        -        "on-scroll-up": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+",

      
        121
        
        -        "on-scroll-down": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"

      
        122
        
        -    },

      
        123
        
        -

      
        124
        
        -    "hyprland/language": {

      
        125
        
        -        "format": "󰌌  {}",

      
        126
        
        -        "format-uk": "укр",

      
        127
        
        -        "format-en": "eng"

      
        128
        
        -    }

      
        
        15
        +  "modules-left": ["hyprland/workspaces", "hyprland/window"],

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

      
        
        17
        +  "modules-right": [

      
        
        18
        +    "memory",

      
        
        19
        +    "tray",

      
        
        20
        +    "hyprland/language",

      
        
        21
        +    "backlight",

      
        
        22
        +    "battery",

      
        
        23
        +    "pulseaudio",

      
        
        24
        +    "network"

      
        
        25
        +  ]

      
        129
        26
         }

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

      
        
        2
        +  "hyprland/window": {

      
        
        3
        +    "max-length": "40"

      
        
        4
        +  },

      
        
        5
        +

      
        
        6
        +  "hyprland/workspaces": {

      
        
        7
        +    "active-only": false,

      
        
        8
        +    "all-outputs": true,

      
        
        9
        +    "disable-scroll": false,

      
        
        10
        +    "on-scroll-up": "hyprctl dispatch workspace -1",

      
        
        11
        +    "on-scroll-down": "hyprctl dispatch workspace +1",

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

      
        
        13
        +    "on-click": "activate",

      
        
        14
        +    "sort-by-number": true,

      
        
        15
        +    "persistent_workspaces": { "*": 9 },

      
        
        16
        +    "format-icons": {

      
        
        17
        +      "urgent": "",

      
        
        18
        +      "default": "",

      
        
        19
        +      "1": "󰅨",

      
        
        20
        +      "2": "󰖟",

      
        
        21
        +      "3": "",

      
        
        22
        +      "4": "󰠮",

      
        
        23
        +      "5": "",

      
        
        24
        +      "6": "󰅨",

      
        
        25
        +      "7": "󰎄"

      
        
        26
        +    }

      
        
        27
        +  },

      
        
        28
        +

      
        
        29
        +  "hyprland/language": {

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

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

      
        
        32
        +    "format-en": "eng"

      
        
        33
        +  }

      
        
        34
        +}

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

      
        
        2
        +  "tray": {

      
        
        3
        +    "icon-size": 16,

      
        
        4
        +    "spacing": 10

      
        
        5
        +  },

      
        
        6
        +    "clock": {

      
        
        7
        +        "format": "  {:%a, %d %b %H:%M}",

      
        
        8
        +        "tooltip": "true",

      
        
        9
        +        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",

      
        
        10
        +        "on-click": "morgen"

      
        
        11
        +    },

      
        
        12
        +

      
        
        13
        +  "battery": {

      
        
        14
        +    "format": "{icon}  {capacity}%",

      
        
        15
        +    "format-charging": "{icon}  {capacity}%",

      
        
        16
        +    "format-plugged": "{capacity}%  ",

      
        
        17
        +    "format-alt": "{icon}  {time}",

      
        
        18
        +    "format-icons": ["", "", "", "", ""],

      
        
        19
        +    "tooltip": false,

      
        
        20
        +    "states": {

      
        
        21
        +      "good": 95,

      
        
        22
        +      "warning": 30,

      
        
        23
        +      "critical": 15

      
        
        24
        +    }

      
        
        25
        +  },

      
        
        26
        +

      
        
        27
        +  "memory": {

      
        
        28
        +    "format": "󰍛  {used}%",

      
        
        29
        +    "interval": 5

      
        
        30
        +  },

      
        
        31
        +

      
        
        32
        +  "cpu": {

      
        
        33
        +    "format": "󰻠  {usage}%",

      
        
        34
        +    "format-alt": "󰻠  {avg_frequency} GHz",

      
        
        35
        +    "interval": 5

      
        
        36
        +  },

      
        
        37
        +

      
        
        38
        +  "network": {

      
        
        39
        +    "format-wifi": "󰤨  {essid}",

      
        
        40
        +    "format-linked": " {ifname} (No IP)",

      
        
        41
        +    "format-disconnected": "󰤭",

      
        
        42
        +    "format-alt": "󰤨 {ifname}: {ipaddr}/{cidr}",

      
        
        43
        +    "tooltip-format": "{essid}",

      
        
        44
        +    "on-click-right": "nm-connection-editor",

      
        
        45
        +    "tooltip": false

      
        
        46
        +  },

      
        
        47
        +

      
        
        48
        +  "backlight": {

      
        
        49
        +    "format": "{icon}  {percent}%",

      
        
        50
        +    "format-icons": ["", "", "", "", "", "", "", "", ""],

      
        
        51
        +    "on-scroll-up": "brightnessctl set +10%",

      
        
        52
        +    "on-scroll-down": "brightnessctl set 10%-",

      
        
        53
        +    "tooltip": false

      
        
        54
        +  },

      
        
        55
        +

      
        
        56
        +  "pulseaudio": {

      
        
        57
        +    "format": "{icon}  {volume}%",

      
        
        58
        +    "format-muted": "󰝟",

      
        
        59
        +    "format-icons": {

      
        
        60
        +      "default": ["󰕿", "󰖀", "󰕾"],

      
        
        61
        +      "headphone": ""

      
        
        62
        +    },

      
        
        63
        +    "on-click": "pavucontrol",

      
        
        64
        +    "tooltip": false,

      
        
        65
        +    "on-scroll-up": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%+",

      
        
        66
        +    "on-scroll-down": "wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 5%-"

      
        
        67
        +  }

      
        
        68
        +}