fix: sway config
This commit is contained in:
parent
d4811e4597
commit
4d2e4fff14
@ -1,4 +1,3 @@
|
||||
# Config for sway
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
include "config.d/*.conf
|
||||
|
||||
# vim: ft=swayconfig
|
||||
|
@ -5,7 +5,7 @@ set $down k
|
||||
set $up j
|
||||
set $right l
|
||||
|
||||
set $menu dmenu_run | xargs swaymsg exec --
|
||||
set $menu dmenu_path | dmenu | xargs swaymsg exec --
|
||||
set $term alacritty
|
||||
set $browser firefox
|
||||
set $private_browser firefox --private-window
|
||||
@ -15,6 +15,7 @@ set $lock swaylock -F -f -i $wallpapers/lock.png
|
||||
set $screenshot flameshot full -c
|
||||
set $screenshot_rect flameshot gui
|
||||
|
||||
# 1: to fix order
|
||||
set $ws1 1:TTY
|
||||
set $ws2 2:WEB
|
||||
set $ws3 3:DEV
|
||||
@ -30,3 +31,5 @@ client.focused #4c7899 #285577 #ffffff #2e9ef4 #e00000
|
||||
default_border pixel
|
||||
|
||||
set $screen_timeout 600
|
||||
|
||||
# vim: ft=swayconfig
|
||||
|
@ -15,7 +15,8 @@ input type:touchpad {
|
||||
|
||||
output {
|
||||
eDP-1 position 0 0
|
||||
DP-3 position 1920 0
|
||||
DP-2 position 3840 0
|
||||
DP-2 position 1920 0
|
||||
* bg $wallpapers/mount_cook.jpg fill
|
||||
}
|
||||
|
||||
# vim: ft=swayconfig
|
||||
|
@ -11,10 +11,12 @@ exec swayidle -w \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep "$lock"
|
||||
|
||||
bar swaybar_command waybar
|
||||
#bar swaybar_command waybar
|
||||
|
||||
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # arch
|
||||
#exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 # debian
|
||||
#exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # arch
|
||||
exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 # debian
|
||||
#exec /usr/libexec/polkit-gnome-authentication-agent-1 & # fedora
|
||||
|
||||
exec gammastep
|
||||
|
||||
# vim: ft=swayconfig
|
||||
|
@ -81,3 +81,5 @@
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+space floating toggle
|
||||
|
||||
# vim: ft=swayconfig
|
||||
|
7
.config/sway/config.d/50-bar.conf
Normal file
7
.config/sway/config.d/50-bar.conf
Normal file
@ -0,0 +1,7 @@
|
||||
bar {
|
||||
position top
|
||||
strip_workspace_numbers yes
|
||||
status_command sbar
|
||||
}
|
||||
|
||||
# vim: ft=swayconfig
|
@ -1,80 +0,0 @@
|
||||
{
|
||||
"modules-left": ["sway/workspaces"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-right": ["custom/crypto", "pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "tray", "clock"],
|
||||
"backlight": {
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["", ""],
|
||||
"on-scroll-up": "set-light +10",
|
||||
"on-scroll-down": "set-light -10",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15,
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-icons": ["", "", "", "", ""],
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a %b %d, %R}",
|
||||
"tooltip-format": "<tt>{calendar}</tt>",
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": "",
|
||||
},
|
||||
},
|
||||
"memory": {
|
||||
"format": "{}% ",
|
||||
},
|
||||
"pulseaudio": {
|
||||
"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",
|
||||
"on-scroll-up": "set-vol +5",
|
||||
"on-scroll-down": "set-vol -5",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"temperature": {
|
||||
"critical-threshold": 80,
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": ["", "", ""],
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 21,
|
||||
"spacing": 10,
|
||||
},
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"format": "{name}",
|
||||
},
|
||||
"custom/crypto": {
|
||||
"exec": "crypto",
|
||||
"interval": 3600,
|
||||
}
|
||||
}
|
||||
|
||||
// vim: ft=json
|
@ -1,261 +0,0 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif, "Font Awesome 5 Free";
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.5);
|
||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
color: #ffffff;
|
||||
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;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
border-bottom: 3px solid #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#custom-crypto
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
margin: 0 4px;
|
||||
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: #64727D;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #9b59b6;
|
||||
}
|
||||
|
||||
#disk {
|
||||
background-color: #964B00;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#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: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
background: #97e1ad;
|
||||
color: #000000;
|
||||
padding: 0 0px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state > label {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#keyboard-state > label.locked {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#custom-crypto {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
if [ "$XDG_VTNR" = 1 ]; then
|
||||
GUILOG="$HOME/.local/share/xorg/gui.log"
|
||||
GUILOG="$HOME/.local/share/gui.log"
|
||||
|
||||
mkdir -p "$(dirname "$GUILOG")"
|
||||
mv "$GUILOG" "$GUILOG.old" 2> /dev/null
|
||||
exec startx > "$GUILOG" 2>&1
|
||||
#export XDG_CURRENT_DESKTOP=sway && exec sway > "$HOME/.gui.log" 2>&1
|
||||
|
||||
#export XDG_CURRENT_DESKTOP=Unity && exec startx > "$GUILOG" 2>&1
|
||||
export XDG_CURRENT_DESKTOP=sway && exec sway > "$GUILOG" 2>&1
|
||||
fi
|
||||
|
||||
# vim: ft=zsh
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ab8bac01e2a90e1cd749d4936e4decbdba3c2727
|
||||
Subproject commit 20323d6f8cd267805a793dafc840d22330653867
|
@ -1 +1 @@
|
||||
Subproject commit c0e811c90df387eca4223c7d4dbb3f2d32a684c7
|
||||
Subproject commit 8cbe98469d9862d37d43ca4229dc8e915ec377a9
|
2
.zshenv
2
.zshenv
@ -19,5 +19,5 @@ path=("$HOME/bin" "$HOME/.local/bin" $path)
|
||||
export EDITOR='nvim'
|
||||
export MAKEFLAGS='-j'
|
||||
|
||||
export XDG_CURRENT_DESKTOP=Unity
|
||||
export QT_STYLE_OVERRIDE=Materia-dark
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
|
8
bin/sbar
8
bin/sbar
@ -70,7 +70,7 @@ reload_bar() {
|
||||
}
|
||||
|
||||
display() {
|
||||
xsetroot -name "$crypto | $cpu | $memory | $vol | $wlp | $bat | $time"
|
||||
${DISPLAYCMD[@]} "$crypto | $cpu | $memory | $vol | $wlp | $bat | $time"
|
||||
}
|
||||
|
||||
# SIGNALING
|
||||
@ -82,6 +82,12 @@ trap 'update_crypto;display' 'RTMIN+2'
|
||||
## kill -m "$(cat ~/.cache/pidofbar)"
|
||||
# where m = 34 + n
|
||||
|
||||
if [ "$XDG_SESSION_TYPE" = wayland ]; then
|
||||
DISPLAYCMD=(echo)
|
||||
else
|
||||
DISPLAYCMD=(xsetroot -name)
|
||||
fi
|
||||
|
||||
sec=0
|
||||
while true; do
|
||||
[ "$((sec % 300))" = 0 ] && update_crypto
|
||||
|
Loading…
Reference in New Issue
Block a user