From d386db6bee0bd31df90e4ce06f58c2e9280f4d03 Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Fri, 29 Sep 2023 16:16:41 +0200 Subject: [PATCH] wayland configs added --- .config/kitty/kitty.conf | 82 +++++++++++ .config/sway/config | 117 +++++++++++++++ .config/waybar/config | 173 ++++++++++++++++++++++ .config/waybar/frappe.css | 37 +++++ .config/waybar/style.css | 301 ++++++++++++++++++++++++++++++++++++++ home/.zshrc | 1 + 6 files changed, 711 insertions(+) create mode 100644 .config/kitty/kitty.conf create mode 100644 .config/sway/config create mode 100644 .config/waybar/config create mode 100644 .config/waybar/frappe.css create mode 100644 .config/waybar/style.css diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..4ee02ee --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,82 @@ +font_family Fira Code + +# vim:ft=kitty + +## name: Catppuccin Kitty Frappe +## author: Catppuccin Org +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/themes/frappe.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #C6D0F5 +background #303446 +selection_foreground #303446 +selection_background #F2D5CF + +# Cursor colors +cursor #F2D5CF +cursor_text_color #303446 + +# URL underline color when hovering with mouse +url_color #F2D5CF + +# Kitty window border colors +active_border_color #BABBF1 +inactive_border_color #737994 +bell_border_color #E5C890 + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #232634 +active_tab_background #CA9EE6 +inactive_tab_foreground #C6D0F5 +inactive_tab_background #292C3C +tab_bar_background #232634 + +# Colors for marks (marked text in the terminal) +mark1_foreground #303446 +mark1_background #BABBF1 +mark2_foreground #303446 +mark2_background #CA9EE6 +mark3_foreground #303446 +mark3_background #85C1DC + +# The 16 terminal colors + +# black +color0 #51576D +color8 #626880 + +# red +color1 #E78284 +color9 #E78284 + +# green +color2 #A6D189 +color10 #A6D189 + +# yellow +color3 #E5C890 +color11 #E5C890 + +# blue +color4 #8CAAEE +color12 #8CAAEE + +# magenta +color5 #F4B8E4 +color13 #F4B8E4 + +# cyan +color6 #81C8BE +color14 #81C8BE + +# white +color7 #B5BFE2 +color15 #A5ADCE diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..958de19 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,117 @@ +set $mod Mod4 +set $term kitty +set $menu kickoff +set $lock swaylock + +# scale internal display +output eDP-1 scale 1.75 + +focus_follows_mouse no + +default_border pixel 2 +default_floating_border pixel 2 +gaps inner 10 +gaps outer 5 +smart_borders on + +exec dbus-update-activation-environment --all +exec eval $(gnome-keyring-daemon --start) +exec export SSH_AUTH_SOCK + +exec swayidle -w \ + timeout 300 '$lock -f' \ + timeout 310 'swaymsg "output * power off"'\ + resume 'swaymsg "output * power on"' \ + before-sleep $lock + +bindsym $mod+Shift+Ctrl+l exec $lock +exec swaybg -c#000000 -m solid_color + +bindsym $mod+Return exec $term +bindsym $mod+d exec $menu + +bindsym $mod+Shift+r restart +bindsym $mod+Shift+c reload +bindsym $mod+Shift+q kill + +mode "$mode_exit" { + bindsym l exec --no-startup-id $locker, mode "default" + bindsym o exec --no-startup-id i3-msg exit, mode "default" + bindsym r exec --no-startup-id reboot, mode "default" + bindsym s exec --no-startup-id systemctl poweroff -i, mode "default" + bindsym Escape mode "default" + bindsym Return mode "default" +} +bindsym $mod+Shift+e mode "$mode_exit" + +mode "$mode_resize" { + bindsym { + h resize shrink width + j resize grow height + k reisze shrink height + l resize grow width + Escape mode "default" + } +} +bindsym $mod+r mode "$mode_resize" + +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +bindsym $mod+Ctrl+h move workspace to output left +bindsym $mod+Ctrl+j move workspace to output down +bindsym $mod+Ctrl+k move workspace to output up +bindsym $mod+Ctrl+l move workspace to output right + +bindsym $mod+Space floating toggle + +bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl s 10%- +bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl s +10% + +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle + +bindsym $mod+v split h +bindsym $mod+s split v +bindsym $mod+a focus parent +bindsym $mod+f fullscreen toggle + +bar { + position top + swaybar_command waybar +} + +input type:touchpad { + tap enabled + natural_scroll enabled +} diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..0070f8f --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,173 @@ +// vim:ft=json +{ + // "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": 4, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad", "custom/media"], + "modules-center": ["sway/window"], + "modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "battery#bat2", "clock", "tray"], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "warp-on-scroll": false, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "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 ", + "unknown-tag": "N/A", + "interval": 2, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "custom/clock": { + "exec": "echo ' '$(date +'%H:%M')' '", + "format": "{}", + "interval": 5 + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + "thermal-zone": 7, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": [""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {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": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + } +} + diff --git a/.config/waybar/frappe.css b/.config/waybar/frappe.css new file mode 100644 index 0000000..18520fb --- /dev/null +++ b/.config/waybar/frappe.css @@ -0,0 +1,37 @@ +/* +* +* Catppuccin Frappe palette +* Maintainer: rubyowo +* +*/ + +@define-color base #303446; +@define-color mantle #292c3c; +@define-color crust #232634; + +@define-color text #c6d0f5; +@define-color subtext0 #a5adce; +@define-color subtext1 #b5bfe2; + +@define-color surface0 #414559; +@define-color surface1 #51576d; +@define-color surface2 #626880; + +@define-color overlay0 #737994; +@define-color overlay1 #838ba7; +@define-color overlay2 #949cbb; + +@define-color blue #8caaee; +@define-color lavender #babbf1; +@define-color sapphire #85c1dc; +@define-color sky #99d1db; +@define-color teal #81c8be; +@define-color green #a6d189; +@define-color yellow #e5c890; +@define-color peach #ef9f76; +@define-color maroon #ea999c; +@define-color red #e78284; +@define-color mauve #ca9ee6; +@define-color pink #f4b8e4; +@define-color flamingo #eebebe; +@define-color rosewater #f2d5cf; diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..d24a96e --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,301 @@ +@import "frappe.css"; +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; + font-size: 16px; +} + +window#waybar { + background-color: @base; + color: @text; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces { + background: @crust; + border-radius: 5px; +} + +#workspaces button:first-child { + border-radius: 5px 0px 0px 5px; +} +#workspaces button:last-child { + border-radius: 0 5px 5px 0; +} + +#workspaces button { + padding: 0 10px; + background-color: transparent; + color: @blue; +} + +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); +} + +#workspaces button.focused { + background: alpha(@lavender, 0.1); + color: @green; + box-shadow: inset 0 -3px @mauve; +} + +#workspaces button.urgent { + background-color: @red; +} + +#mode { + background-color: @crust; + border-bottom: 3px solid @mauve; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#mpd { + padding: 0 10px; + color: #ffffff; +} + +#window, +#workspaces { + margin: 0 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +#clock { + background-color: @crust; + color: @text; +} + +#battery { + background-color: @crust; + color: @yellow; +} + +#battery.charging, #battery.plugged { + color: @blue; + background-color: @crust; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: @yellow; + color: @blue; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +label:focus { + background-color: @crust; +} + +#cpu { + background-color: @crust; + color: @mauve; +} + +#memory { + background-color: @crust; + color: @mauve; +} + +#disk { + background-color: @crust; + color: @mauve; +} + +#backlight { + background-color: @crust; + color: @mauve; +} + +#network { + background-color: @crust; + color: @mauve; +} + +#network.disconnected { + background-color: @base; + color: @text; +} + +#pulseaudio { + background-color: @crust; + color: @mauve; +} + +#pulseaudio.muted { + background-color: @crust; + color: @maroon; +} + +#wireplumber { + background-color: @crust; + color: @mauve; +} + +#wireplumber.muted { + background-color: @crust; + color: @maroon; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: @crust; + color: @mauve; +} + +#temperature.critical { + background-color: #eb4d4b; +} + +#tray { + background-color: @base; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @crust; +} + +#idle_inhibitor { + background-color: @crust; + color: @mauve; +} + +#idle_inhibitor.activated { + background-color: @crust; + color: @maroon; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: @crust; + color: @mauve; + padding: 0 5px; + min-width: 16px; +} + +#keyboard-state { + background: @crust; + color: @mauve; + padding: 0 0px; + min-width: 16px; +} + +#keyboard-state > label { + padding: 0 5px; +} + +#keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad.empty { + background-color: transparent; +} + diff --git a/home/.zshrc b/home/.zshrc index 18f65f6..e36ec0a 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -99,3 +99,4 @@ alias mount-lehre='kinit -kt "$HOME/keytabs/cta1233.keytab" cta1233@KERBEROS.TU- alias rosterm='docker exec -it ros2-vim zsh' alias git-delete-merged="git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d" +export MOZ_ENABLE_WAYLAND=1