improved waybar and new music player

This commit is contained in:
2024-05-11 00:30:24 +01:00
parent af1e260dc2
commit 9612bdf24f
6 changed files with 35 additions and 32 deletions

View File

@@ -99,6 +99,7 @@ alias ll='ls -lhi'
alias ta='tmux attach'
alias t='tmux'
alias v='nvim'
alias mp='ncmpcpp' #Music Player
set completion-ignore-case On

View File

@@ -9,7 +9,7 @@
"margin-left": 5,
"margin-bottom": 0,
// Choose the order of the modules
"modules-left": ["clock", "backlight", "battery", "tray"],
"modules-left": ["clock", "backlight", "battery", "sway/scratchpad", "mpd", "tray"],
"modules-center": ["sway/workspaces"],
"modules-right": ["wireplumber", "network", "cpu", "memory", "temperature"],
// Modules configuration
@@ -48,7 +48,7 @@
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
@@ -126,7 +126,7 @@
// "thermal-zone": 2,
"hwmon-path": "/sys/class/hwmon/hwmon3/temp1_input",
"critical-threshold": 80,
"format-critical": "{temperatureC}°C 󰈸",
"format-critical": "{temperatureC}°C 󰈸",
"format": "{temperatureC}°C {icon}",
"format-icons": ["󱃃", "󰔏"],
"interval": 1

View File

@@ -186,11 +186,11 @@ label:focus {
}
#backlight {
color: @pink;
color: @yellow;
}
#network {
color: @cyan;
color: @pink;
}
#network.disconnected {
@@ -198,7 +198,7 @@ label:focus {
}
#pulseaudio {
color: @green;
color: @cyan;
}
#pulseaudio.muted {
@@ -206,7 +206,7 @@ label:focus {
}
#wireplumber {
color: @pink;
color: @cyan;
}
#wireplumber.muted {
@@ -264,20 +264,21 @@ label:focus {
}
#mpd {
background-color: #66cc99;
color: @purple;
}
#mpd.disconnected {
background-color: #f53c3c;
background-color: @red;
color: @base;
box-shadow: inset 0px 0px 0px 3px @base;
}
#mpd.stopped {
background-color: #90b1b1;
color: @red;
}
#mpd.paused {
background-color: #51a37a;
color: @yellow;
}
#language {
@@ -299,9 +300,9 @@ label:focus {
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
color: @yellow;
}
#scratchpad.empty {
background-color: transparent;
color: @cyan;
}

View File

@@ -53,9 +53,8 @@ static const Layout layouts[] = {
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
static const MonitorRule monrules[] = {
/* name mfact nmaster scale layout rotate/reflect x y */
/* example of a HiDPI laptop monitor:
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
*/
/* example of a HiDPI monitor: */
{ "DP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
/* defaults */
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
};
@@ -67,6 +66,7 @@ static const struct xkb_rule_names xkb_rules = {
.options = "ctrl:nocaps",
*/
.options = NULL,
.layout = "pt",
};
static const int repeat_rate = 25;
@@ -76,7 +76,7 @@ static const int repeat_delay = 600;
static const int tap_to_click = 1;
static const int tap_and_drag = 1;
static const int drag_lock = 1;
static const int natural_scrolling = 1;
static const int natural_scrolling = 0;
static const int disable_while_typing = 1;
static const int left_handed = 0;
static const int middle_button_emulation = 1;
@@ -136,8 +136,8 @@ static const Key keys[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* modifier key function argument */
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_q, spawn, {.v = lockcmd} },
{ MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} },
{ MODKEY, XKB_KEY_q, spawn, {.v = lockcmd} },
{ MODKEY, XKB_KEY_b, togglebar, {0} },
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
@@ -145,16 +145,16 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
{ MODKEY, XKB_KEY_Return, zoom, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY, XKB_KEY_g, togglegaps, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
{ MODKEY, XKB_KEY_c, killclient, {0} },
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XKB_KEY_space, setlayout, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },

View File

@@ -53,9 +53,8 @@ static const Layout layouts[] = {
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
static const MonitorRule monrules[] = {
/* name mfact nmaster scale layout rotate/reflect x y */
/* example of a HiDPI laptop monitor:
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
*/
/* example of a HiDPI monitor: */
{ "DP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
/* defaults */
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
};
@@ -67,6 +66,7 @@ static const struct xkb_rule_names xkb_rules = {
.options = "ctrl:nocaps",
*/
.options = NULL,
.layout = "pt",
};
static const int repeat_rate = 25;
@@ -76,7 +76,7 @@ static const int repeat_delay = 600;
static const int tap_to_click = 1;
static const int tap_and_drag = 1;
static const int drag_lock = 1;
static const int natural_scrolling = 1;
static const int natural_scrolling = 0;
static const int disable_while_typing = 1;
static const int left_handed = 0;
static const int middle_button_emulation = 1;
@@ -136,8 +136,8 @@ static const Key keys[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* modifier key function argument */
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_q, spawn, {.v = lockcmd} },
{ MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} },
{ MODKEY, XKB_KEY_q, spawn, {.v = lockcmd} },
{ MODKEY, XKB_KEY_b, togglebar, {0} },
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
@@ -145,16 +145,16 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
{ MODKEY, XKB_KEY_Return, zoom, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY, XKB_KEY_g, togglegaps, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
{ MODKEY, XKB_KEY_c, killclient, {0} },
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XKB_KEY_space, setlayout, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },

View File

@@ -15,7 +15,8 @@ fi
paru -Sy curl git stow bat fzf less nextcloud-client
# Install DE
paru -Sy dunst xdg-desktop-portal-wlr xdg-desktop-portal swaybg swaylock waybar wofi foot grim slurp wl-clipboard wlroots wayland-protocols xorg-xwayland
paru -Sy mpd ncmpcpp dunst xdg-desktop-portal-wlr xdg-desktop-portal swaybg swaylock waybar wofi foot grim slurp wl-clipboard wlroots wayland-protocols xorg-xwayland
sudo systemctl enable mpd
cd dwl
sudo make clean install
cd ..