sway: updates

This commit is contained in:
2024-09-22 18:48:50 +02:00
parent 17e8714b03
commit e78db5fb06
6 changed files with 96 additions and 108 deletions

View File

@@ -24,20 +24,21 @@ $ gsettings set org.gnome.desktop.wm.preferences button-layout ''
- Keyring provided by GNOME and startet in `sway(1)` - Keyring provided by GNOME and startet in `sway(1)`
- `keepassxc(1)` should use `/run/user/1000/keyring/ssh` as SSH Auth Socket - `keepassxc(1)` should use `/run/user/1000/keyring/ssh` as SSH Auth Socket
- Env Vars exported via `systemd` in `files/environment/.config/environment.d/envvars.conf` - Env Vars exported via `systemd` in `files/environment/.config/environment.d/envvars.conf`
- `%wheel ALL=(ALL) NOPASSWD: /usr/bin/tee /sys/bus/platform/drivers/ideapad_acpi/VPC????\:??/conservation_mode`
``` ```
sudo dnf install \ sudo dnf install \
kitty git vim tmux ripgrep fd-find fzf stow \ kitty git vim tmux ripgrep fd-find fzf stow \
brave \ brave \
sway waybar wofi \ sway waybar \
brightnessctl wireplumber pasystray \ brightnessctl wireplumber pasystray blueman \
network-manager network-manager-applet \ network-manager network-manager-applet \
fcitx5 fcitx5-configtool fcitx5-anthy fcitx5-* \ fcitx5 fcitx5-configtool fcitx5-anthy fcitx5-* \
nextcloud keepassxc nextcloud keepassxc
``` ```
- application launcher: https://github.com/philj56/tofi
- notification daemon + popup: https://github.com/ErikReider/SwayNotificationCenter - notification daemon + popup: https://github.com/ErikReider/SwayNotificationCenter
- screenshot: https://github.com/moverest/sway-interactive-screenshot (checked in as `files/sway/.config/sway/screenshot`) - screenshot: https://github.com/moverest/sway-interactive-screenshot (checked in as `files/sway/.config/sway/screenshot`)
- weather info in bar: https://github.com/bjesus/wttrbar
- screen mirror for live presentations: https://github.com/Ferdi265/wl-mirror - screen mirror for live presentations: https://github.com/Ferdi265/wl-mirror
- vpn: https://netbird.io/ - vpn: https://netbird.io/

View File

@@ -3,7 +3,8 @@
floating_modifier $mod normal floating_modifier $mod normal
### Output configuration (swaymsg -t get_output) ### Output configuration (swaymsg -t get_output)
output * bg ~/cloud/images/wallpaper/wallpaper.png fill # output * bg ~/cloud/images/wallpaper/wallpaper.png fill
output * bg ~/downloads/wallpaper.png fill
# output eDP-1 scale 2 # output eDP-1 scale 2
# disable laptop when closed # disable laptop when closed
@@ -11,11 +12,12 @@
bindswitch --reload --locked lid:on output $laptop disable bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable bindswitch --reload --locked lid:off output $laptop enable
workspace_layout tabbed workspace_layout default
smart_borders on
set $lock swaylock -f -c 3D484D # exec_always --no-startup-id convert -scale 10% -blur 0x2.5 -resize 1000% ~/cloud/images/wallpaper/wallpaper.png ~/cloud/images/wallpaper/lock.png
exec swayidle -w \ # set $lock swaylock -f -i ~/cloud/images/wallpaper/lock.png
set $lock swaylock -f -i ~/cloud/images/wallpaper/win_lock.png -u
exec_always pkill swayidle; swayidle -w \
timeout 600 '$lock' \ timeout 600 '$lock' \
timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
timeout 1200 'systemctl suspend' \ timeout 1200 'systemctl suspend' \
@@ -50,20 +52,20 @@ bindgesture swipe:4:left focus left
bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2 bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2
bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2 bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2
bindsym $mod+Control+BackSpace exec $lock bindsym $mod+BackSpace exec $lock
bindsym $mod+Control+Shift+BackSpace exec systemctl suspend bindsym $mod+Control+BackSpace exec systemctl suspend
bindsym $mod+Shift+s exec ~/.config/sway/screenshot -s region bindsym $mod+Shift+s exec ~/.config/sway/screenshot -s region
bindsym $mod+Shift+c reload bindsym $mod+Ctrl+c reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Ctrl+r exec swaymsg output DP-3 mode 2560x1440@143.856Hz
bindsym $mod+Ctrl+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# Run applications # Run applications
bindsym $mod+Return exec kitty bindsym $mod+Return exec kitty
#bindsym $mod+d exec wofi --show drun -I -i -a
bindsym $mod+d exec tofi-drun | xargs swaymsg exec -- bindsym $mod+d exec tofi-drun | xargs swaymsg exec --
#bindsym $mod+Shift+d exec wofi --show run -i -a
bindsym $mod+Shift+d exec tofi-run | xargs swaymsg exec -- bindsym $mod+Shift+d exec tofi-run | xargs swaymsg exec --
bindsym $mod+e exec nautilus bindsym $mod+e exec nautilus
@@ -113,16 +115,14 @@ bindgesture swipe:4:left focus left
# Layout stuff # Layout stuff
bindsym $mod+f fullscreen bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle, border normal 2 bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
# Scratchpad
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
### Theming ### Theming
font pango: JetBrainsMono Nerd Font Mono 10 font pango: JetBrainsMono Nerd Font Mono 10
for_window [title="."] title_format "%app_id"
default_border none
default_floating_border none
bar { bar {
swaybar_command waybar swaybar_command waybar
} }
@@ -137,8 +137,8 @@ bindgesture swipe:4:left focus left
### Autostart ### Autostart
# SSH # SSH
exec eval $(gnome-keyring-daemon --start)
# SSH_AUTH_SOCK must also be exported as env separately later # SSH_AUTH_SOCK must also be exported as env separately later
exec eval $(gnome-keyring-daemon --start)
exec export SSH_AUTH_SOCK exec export SSH_AUTH_SOCK
# Programs # Programs

View File

@@ -0,0 +1,19 @@
font-size = 12
font = JetBrainsMono NFM
anchor = top
width = 100%
height = 25
horizontal = true
prompt-text = " run: "
outline-width = 0
border-width = 0
background-color = #000000
selection-color = #A7C080
min-input-width = 120
result-spacing = 15
padding-top = 0
padding-bottom = 0
padding-left = 0
padding-right = 0
auto-accept-single = true
physical-keybindings = false

View File

@@ -16,7 +16,7 @@
"position": "top", "position": "top",
// If height property would be not present, it'd be calculated dynamically // If height property would be not present, it'd be calculated dynamically
"height": 30, "height": 25,
"modules-left": [ "modules-left": [
"sway/workspaces", "sway/workspaces",
@@ -26,20 +26,20 @@
"modules-center": [ "modules-center": [
], ],
"modules-right": [ "modules-right": [
"tray",
// "network", // "network",
// "pulseaudio", // "pulseaudio",
// "memory", // "memory",
// "cpu", // "cpu",
// "temperature", // "temperature",
"custom/weather",
"backlight", "backlight",
// "custom/keyboard-layout", // "custom/keyboard-layout",
"battery", "battery",
"custom/conservation", // "custom/conservation",
"custom/power", // "custom/power",
"clock#date", "clock#date",
"clock#time" "clock#time",
"custom/sep",
"tray"
], ],
@@ -54,32 +54,37 @@
"critical": 15 "critical": 15
}, },
// Connected to AC // Connected to AC
// "format": "{capacity}%", // Icon: bolt "format": "{capacity}% 󰂄", // Icon: bolt
"format": "⚡ {capacity}%", // Icon: bolt // "format": "⚡ {capacity}%", // Icon: bolt
// "format": "C {capacity}%", // Icon: bolt
// Not connected to AC // Not connected to AC
// "format-discharging": "{icon} {capacity}%", "format-discharging": "{capacity}% {icon}",
"format-discharging": "🔋 {capacity}%", // "format-discharging": "🔋 {capacity}%",
// "format-discharging": "{capacity}%",
"format-icons": [ "format-icons": [
"", // Icon: battery-full "󰁺", // Icon: battery-empty
"", // Icon: battery-three-quarters "󰁼", // Icon: battery-quarter
"", // Icon: battery-half "󰁾", // Icon: battery-half
"", // Icon: battery-quarter "󰂁", // Icon: battery-three-quarters
"" // Icon: battery-empty "󰁹" // Icon: battery-full
], ],
"tooltip": true "tooltip": true,
"on-click": "~/.config/waybar/conservation-toggle.sh"
}, },
"backlight": { "backlight": {
"device": "intel_backlight", "device": "intel_backligt",
"format": "{icon} {percent}%", "format": "{percent} {icon}",
// "format": "{percent}%", // "format": "{percent}%",
"format-icons": ["🔅", "🔆"] // "format-icons": ["🔅", "🔆"]
"format-icons": ["󰃚", "󰃝", "󰃞", "󰃟", "󰃠"]
}, },
"clock#time": { "clock#time": {
"interval": 1, "interval": 1,
"format": "🕒 {:%H:%M}", // "format": "🕒 {:%H:%M}",
"format": "{:%H:%M}",
"tooltip": false, "tooltip": false,
"on-click": "gnome-clocks" "on-click": "gnome-clocks"
}, },
@@ -87,23 +92,15 @@
"clock#date": { "clock#date": {
"interval": 10, "interval": 10,
// "format": " {:%e %b %Y}", // Icon: calendar-alt // "format": " {:%e %b %Y}", // Icon: calendar-alt
"format": "🗓️ {:%e. %b %Y (%a)}", // Icon: calendar-alt // "format": "🗓️ {:%e. %b %Y (%a)}", // Icon: calendar-alt
"format": "{:%a, %e.%b}", // Icon: calendar-alt
"tooltip-format": "{:%e %B %Y}", "tooltip-format": "{:%e %B %Y}",
"on-click": "gnome-calendar" "on-click": "gnome-calendar"
}, },
// https://github.com/bjesus/wttrbar
"custom/weather": {
"format": "{}°C",
"tooltip": true,
"interval": 3600,
"exec": "wttrbar --location Munich",
"return-type": "json"
},
"cpu": { "cpu": {
"interval": 30, "interval": 30,
"format": "🧮 {usage}% ({load})", // Icon: microchip "format": "🧮 {usage}% ({load})", // Icon: microcip
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
@@ -144,13 +141,15 @@
"sway/window": { "sway/window": {
"format": "{}", "format": "{}",
"max-length": 120 "max-length": 100,
"icon": true,
"icon-size": 18
}, },
"sway/workspaces": { "sway/workspaces": {
"all-outputs": false, "all-outputs": false,
"disable-scroll": true, "disable-scroll": false,
"format": "{icon}", "format": "{name}",
"format-icons": { "format-icons": {
"1": "一", "1": "一",
"2": "二", "2": "二",
@@ -200,8 +199,8 @@
}, },
"tray": { "tray": {
"icon-size": 15, "icon-size": 13,
"spacing": 20 "spacing": 15
}, },
"custom/conservation": { "custom/conservation": {
@@ -214,6 +213,9 @@
"exec": "echo 💻 $(cat /sys/firmware/acpi/platform_profile)", "exec": "echo 💻 $(cat /sys/firmware/acpi/platform_profile)",
"interval": 10, "interval": 10,
"on-click": "kitty -e 'htop'" "on-click": "kitty -e 'htop'"
} },
"custom/sep": {
"format": "|",
},
} }

View File

@@ -16,8 +16,7 @@
} }
to { to {
color: white; color: orange;
background-color: orange;
} }
} }
@@ -27,8 +26,7 @@
} }
to { to {
color: white; color: red;
background-color: red;
} }
} }
@@ -48,10 +46,11 @@
/* The whole bar */ /* The whole bar */
#waybar { #waybar {
background: #2D353B; /* background: #2D353B; */
background: #000000;
color: white; color: white;
/* font-family: Cantarell, Noto Sans, sans-serif; */ /* font-family: Cantarell, Noto Sans, sans-serif; */
font-family: JetBrainsMono Nerd Font Mono; font-family: JetBrainsMono Nerd Font;
font-size: 12px; font-size: 12px;
} }
@@ -107,7 +106,7 @@
} }
#clock { #clock {
font-weight: bold; /* font-weight: bold; */
} }
#cpu { #cpu {
@@ -178,7 +177,7 @@
} }
#window { #window {
font-weight: bold; /* font-weight: bold; */
padding-left: 10px; padding-left: 10px;
} }
@@ -186,8 +185,8 @@
border-top: 2px solid transparent; border-top: 2px solid transparent;
/* To compensate for the top border and still have vertical centering */ /* To compensate for the top border and still have vertical centering */
padding-bottom: 2px; padding-bottom: 2px;
padding-left: 10px; padding-left: 5px;
padding-right: 10px; padding-right: 5px;
color: #888888; color: #888888;
} }
@@ -200,4 +199,11 @@
#workspaces button.urgent { #workspaces button.urgent {
border-color: #c9545d; border-color: #c9545d;
color: #c9545d; color: #c9545d;
}
#workspaces button:hover {
box-shadow: none; /* Remove predefined box-shadow */
text-shadow: none; /* Remove predefined text-shadow */
background: none; /* Remove predefined background color (white) */
transition: none; /* Disable predefined animations */
} }

View File

@@ -1,40 +0,0 @@
window {
margin: 0px;
border: 2px solid #7A8478;
background-color: #1E2326;
border-radius: 10px;
}
#input {
margin: 5px;
border: none;
color: #D3C6AA;
background-color: #272E33;
}
#inner-box {
margin: 5px;
border: none;
background-color: #1E2326;
}
#outer-box {
margin: 5px;
border: none;
background-color: #1E2326;
}
#scroll {
margin: 0px;
border: none;
}
#text {
margin: 5px;
border: none;
color: #D3C6AA;
}
#entry:selected {
background-color: #272E33;
}