From b7b8a3ded26149b92f0a55ce2a9099b22422040c Mon Sep 17 00:00:00 2001 From: david bernet <david.bernet@student.uni-halle.de> Date: Fri, 6 Dec 2024 14:48:07 +0100 Subject: [PATCH] Neu mit sway und waybar nun yay --- kitty/kitty.conf | 2 +- rofi/config.rasi | 4 ++ waybar/config.jsonc | 65 ++++++++++++------- waybar/mon_1.jsonc | 149 +++++++++++++++++++++++++++++++++++++++++++ waybar/style.css | 100 ++++++++++++++++++----------- waybar/style.css.map | 1 + waybar/style.scss | 34 ++++++---- 7 files changed, 280 insertions(+), 75 deletions(-) create mode 100644 waybar/mon_1.jsonc create mode 100644 waybar/style.css.map diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 4344539..e89feb4 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -27,7 +27,7 @@ bold_italic_font auto #: italic_font Operator Mono Book Italic #: bold_italic_font Operator Mono Medium Italic -font_size 14.0 +font_size 12.0 #: Font size (in pts) diff --git a/rofi/config.rasi b/rofi/config.rasi index 7665bd7..53df77f 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -1,2 +1,6 @@ @theme "/usr/share/rofi/themes/gruvbox-dark-soft.rasi" +configuration { + show-icons: true; + me-select-entry: "MousePrimary"; +} diff --git a/waybar/config.jsonc b/waybar/config.jsonc index caf9fc8..88e209c 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -7,44 +7,57 @@ "spacing": 0, // Gaps between modules (4px) // Choose the order of the modules "modules-left": [ - "hyprland/workspaces", + "sway/workspaces" // "wlr/taskbar", - "hyprland/window" + // "sway/window", + // "custom/workspaces" ], "modules-center": [ "clock" ], "modules-right": [ + "tray", "pulseaudio", "network", "power-profiles-daemon", "backlight", "battery", "battery#bat2", - "tray", "custom/power" ], - "hyprland/workspaces": { - "on-click": "activate", - "format": "{windows}", + // "custom/workspaces": { + // "exec": "sh /home/hexe/.config/sway/workspace_overview.sh", + // "format": "TEst {}", + // "signal": 5 + // }, + "sway/workspaces": { + "disable-scroll": false, + "format": "{index}", "format-icons": { - "active": "", - "default": "", - "empty": "" + "urgent": "U", + "focused": "⦁︎", + "default": "D", + "persistent": "⚪︎", + "high-priority-named": ["hp1", "hp2"] }, - "window-rewrite-default": "", - "window-rewrite": { - "title<.*Mullvad.*>": "", // Windows whose titles contain "youtube" - "class<firefox>": "", // Windows whose classes are "firefox" - "class<kitty>": "", // Windows that contain "foot" in either class or title. For optimization reasons, it will only match against a title if at least one other window explicitly matches against a title. - "class<steam>": "", - "code": "", - "class<nemo>": "", - "class<vlc>": "", - "class<discord>": "", - "title<.*Minecraft.*>": "" + "persistent-workspaces": { + "1": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "2": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "3": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "5": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "11": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "12": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "13": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "14": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "15": ["HDMI-A-1"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists }, - "format-window-separator": " " + "window-rewrite-default": "{name}", + "window-format": "<span color='#e0e0e0'>{name}</span>" + }, + "sway/window": { + "format": "{title}", + "max-length": 50 }, "tray": { // "icon-size": 21, @@ -82,7 +95,7 @@ // "format-full": "", "format-icons": ["", "", "", "", ""], "full-at": 96, - "design-capacity": true, + "design-capacity": true }, "battery#bat2": { "bat": "BAT2" @@ -100,12 +113,12 @@ }, "network": { // "interface": "wlp2*", // (Optional) To force the use of this interface + "on-click": "sh /home/hexe/Dokumente/dotfiles/rofi/rofi-scripts/wifi-manager.sh", "format-wifi": " {essid} ({signalStrength}%)", "format-ethernet": " {ipaddr}/{cidr}", - "tooltip-format": "{gwaddr}", + "tooltip-format": "Gateway: {gwaddr}\nIP: {ipaddr}", "format-linked": "{ifname} (No IP)", "format-disconnected": " Disconnected", - "format-alt": " {ipaddr}" }, "pulseaudio": { // "scroll-step": 1, // %, can be a float @@ -127,6 +140,10 @@ "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", "on-click-right": "pavucontrol" + }, + "custom/power": { + "format": "", + "on-click": "sh /home/hexe/Dokumente/dotfiles/rofi/rofi-scripts/powermenu.sh" } } diff --git a/waybar/mon_1.jsonc b/waybar/mon_1.jsonc new file mode 100644 index 0000000..86d1978 --- /dev/null +++ b/waybar/mon_1.jsonc @@ -0,0 +1,149 @@ +// -*- mode: jsonc -*- +{ + // "layer": "top", // Waybar at top layer + // "position": "bottom", // Waybar position (top|bottom|left|right) + "height": 30, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 0, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "sway/workspaces", +// "wlr/taskbar", + // "sway/window", + "custom/workspaces" + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "tray", + "pulseaudio", + "network", + "power-profiles-daemon", + "backlight", + "battery", + "battery#bat2", + "custom/power" + ], + "custom/workspaces": { + "exec": "sh /home/hexe/.config/sway/workspace_overview.sh", + "format": "TEst {}", + "signal": 5 + }, + "sway/workspaces": { + "disable-scroll": false, + "format": "{windows}", + "format-icons": { + "urgent": "U", + "focused": "⦁︎", + "default": "D", + "persistent": "⚪︎", + "high-priority-named": ["hp1", "hp2"] + }, + "persistent-workspaces": { + "1": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "2": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "3": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "5": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "11": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "12": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "13": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "14": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + "15": ["HDMI-A-1"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + }, + "window-rewrite-default": "{name}", + "window-format": "<span color='#e0e0e0'>{name}</span>" + }, + "sway/window": { + "format": "{title}", + "max-length": 50 + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "interval": 1, + "format": "{:%H:%M:%S}", + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", + "format-alt": "{:%Y-%m-%d}" + }, + "backlight": { + "device": "intel_backlight", + "format": " {percent}%", + "on-scroll-up": "light -A 5", + "on-scroll-down": "light -U 5", + "on-click": "light -S 50" + }, + "battery": { + "interval": 20, + "states": { + "good": 85, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}% {time}", + "tooltip-format": "Zeit Verbleibend: {time}", + "tooltip": true, + "format-time": "{H}:{m}", + "format-discharging-warning": " {icon} {capacity}% {time}", + "format-charging": " {icon} {capacity}% {time}", + "format-plugged": " {icon} {capacity}%", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""], + "full-at": 96, + "design-capacity": true + }, + "battery#bat2": { + "bat": "BAT2" + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "on-click": "sh /home/hexe/Dokumente/dotfiles/rofi/rofi-scripts/wifi-manager.sh", + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ipaddr}/{cidr}", + "tooltip-format": "Gateway: {gwaddr}\nIP: {ipaddr}", + "format-linked": "{ifname} (No IP)", + "format-disconnected": " Disconnected", + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{icon} {volume}% {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": " {volume}%", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-click-right": "pavucontrol" + + }, + "custom/power": { + "format": "", + "on-click": "sh /home/hexe/Dokumente/dotfiles/rofi/rofi-scripts/powermenu.sh" + } +} + diff --git a/waybar/style.css b/waybar/style.css index caf0d6d..ce55b44 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,60 +1,76 @@ * { /* `otf-font-awesome` is required to be installed for icons */ font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; - font-size: 14px; } + font-size: 14px; +} window#waybar { background-color: black; - color: white; } + color: white; +} #clock { color: black; - background-color: white; } + background-color: white; +} /* you can set a style on hover for any module like this */ #pulseaudio { background-color: white; - color: black; } - #pulseaudio:hover { - background-color: lightgray; } - #pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; } + color: black; +} +#pulseaudio:hover { + background-color: lightgray; +} +#pulseaudio.muted { + background-color: #90b1b1; + color: #2a5c45; +} #network { background-color: white; - color: black; } + color: black; +} /* Using steps() instead of linear as a timing function to limit cpu usage */ #battery { background-color: white; - color: black; } - #battery.warning:not(.charging) { - background-color: red; - color: #ffffff; } + color: black; +} +#battery.warning:not(.charging) { + background-color: red; + color: #ffffff; +} #backlight { color: black; - background-color: white; } + background-color: white; +} #tray { + background-color: black; +} + +#custom-power { background-color: white; - color: black; } + color: black; +} #workspaces button { - opacity: 1; - margin: 0 2px; + border-bottom: 4px solid white; + border-radius: 0px; + margin: 0 5px; + padding: 0px; +} +#workspaces button.empty { + background-color: black; + border-bottom: 4px solid black; +} +#workspaces button.focused { + background-color: white; color: black; - background-color: lightgray; - border-radius: 0px; } - #workspaces button:hover { - color: black; } - #workspaces button.empty { - background-color: gray; } - #workspaces button.active { - background-color: white; } - #workspaces button.urgent { - background-color: #eb4d4b; } + border-bottom: 4px solid white; +} #clock, #battery, @@ -72,36 +88,46 @@ window#waybar { #idle_inhibitor, #scratchpad, #power-profiles-daemon, +#custom-power, #mpd { padding: 0 10px; - margin: 0 2px; } + margin: 0 2px; +} #window, #workspaces { - margin: 0 4px; } + margin: 0 4px; +} /* If workspaces is the leftmost module, omit left margin */ .modules-left > widget:first-child > #workspaces { - margin-left: 0; } + margin-left: 0; +} /* If workspaces is the rightmost module, omit right margin */ .modules-right > widget:last-child > #workspaces { - margin-right: 0; } + margin-right: 0; +} #power-profiles-daemon { - padding-right: 15px; } + padding-right: 15px; +} #power-profiles-daemon.performance { background-color: #f53c3c; - color: #ffffff; } + color: #ffffff; +} #power-profiles-daemon.balanced { background-color: #2980b9; - color: #ffffff; } + color: #ffffff; +} #power-profiles-daemon.power-saver { background-color: #2ecc71; - color: #000000; } + color: #000000; +} label:focus { - background-color: #000000; } + background-color: #000000; +}/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/waybar/style.css.map b/waybar/style.css.map new file mode 100644 index 0000000..555c83d --- /dev/null +++ b/waybar/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAGA;EACI,6DAAA;EACA,8DAAA;EACA,eAAA;ACFJ;;ADKA;EACI,uBATS;EAUT,YAXS;ACSb;;ADKA;EACI,YAdS;EAeT,uBAhBS;ACcb;;ADKA,0DAAA;AACA;EACE,uBArBW;EAsBX,YArBW;ACmBb;ADIE;EACE,2BAAA;ACFJ;ADKE;EACE,yBAAA;EACA,cAAA;ACHJ;;ADQA;EACI,uBApCS;EAqCT,YApCS;AC+Bb;;ADQA,4EAAA;AACA;EACE,uBA1CW;EA2CX,YA1CW;ACqCb;ADME;EACE,qBAAA;EACA,cAAA;ACJJ;;ADQA;EACE,YAlDW;EAmDX,uBApDW;AC+Cb;;ADQA;EACI,uBAvDS;ACkDb;;ADQA;EACI,uBA5DS;EA6DT,YA5DS;ACuDb;;ADSE;EACE,8BAAA;EACA,kBAAA;EACA,aAAA;EACA,YAAA;ACNJ;ADaI;EACE,uBA5EO;EA6EP,8BAAA;ACXN;ADcI;EACE,uBAlFO;EAmFP,YAlFO;EAmFP,8BAAA;ACZN;;ADqBA;;;;;;;;;;;;;;;;;;EAkBI,eAAA;EACA,aAAA;AClBJ;;ADoBA;;EAEI,aAAA;ACjBJ;;ADoBA,2DAAA;AACA;EACI,cAAA;ACjBJ;;ADoBA,6DAAA;AACA;EACI,eAAA;ACjBJ;;ADmBA;EACI,mBAAA;AChBJ;;ADmBA;EACI,yBAAA;EACA,cAAA;AChBJ;;ADmBA;EACI,yBAAA;EACA,cAAA;AChBJ;;ADmBA;EACI,yBAAA;EACA,cAAA;AChBJ;;ADmBA;EACI,yBAAA;AChBJ","file":"style.css"} \ No newline at end of file diff --git a/waybar/style.scss b/waybar/style.scss index aaf64a8..1b1a91c 100644 --- a/waybar/style.scss +++ b/waybar/style.scss @@ -54,33 +54,40 @@ window#waybar { } #tray { + background-color: $foreground; +} + +#custom-power { background-color: $background; color: $foreground; } #workspaces { button { - margin: 0 2px; - color: $foreground; - background-color: lightgray; + border-bottom: 4px solid $background; border-radius: 0px; - cursor: pointer; - - &:hover { - color: $foreground; - } + margin: 0 5px; + padding: 0px; + // margin: 0px; + // padding: 0px; + // color: $background; + // background-color: lightgray; + // border-radius: 0px; &.empty { - background-color: gray; + background-color: $foreground; + border-bottom: 4px solid $foreground; } - &.active { + &.focused { background-color: $background; + color: $foreground; + border-bottom: 4px solid $background; } - &.urgent { - background-color: #eb4d4b; - } + // &.urgent { + // background-color: #eb4d4b; + // } } } @@ -100,6 +107,7 @@ window#waybar { #idle_inhibitor, #scratchpad, #power-profiles-daemon, +#custom-power, #mpd { padding: 0 10px; margin: 0 2px; -- GitLab