Compare commits
4 commits
6a1e43ffa5
...
26a6a1aaee
Author | SHA1 | Date | |
---|---|---|---|
26a6a1aaee | |||
d991318870 | |||
6e1fd12bf4 | |||
69194eed3c |
7 changed files with 263 additions and 40 deletions
|
@ -201,32 +201,13 @@ mode "resize" {
|
||||||
}
|
}
|
||||||
bindsym $mod+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
#
|
|
||||||
# Status Bar:
|
|
||||||
#
|
|
||||||
bar {
|
|
||||||
position top
|
|
||||||
|
|
||||||
status_command ~/.config/sway/i3status-wrapper
|
|
||||||
|
|
||||||
status_edge_padding 6
|
|
||||||
status_padding 0
|
|
||||||
separator_symbol " "
|
|
||||||
workspace_min_width 30
|
|
||||||
|
|
||||||
colors {
|
|
||||||
statusline $foreground
|
|
||||||
background $background
|
|
||||||
focused_workspace $foreground $foreground $background
|
|
||||||
active_workspace $accentish $accentish $background
|
|
||||||
inactive_workspace $background $background $foreground
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
client.focused #0353A4 #0353A4 #eeeeee #3799FB
|
client.focused #0353A4 #0353A4 #eeeeee #3799FB
|
||||||
client.focused_inactive $muted $muted $background
|
client.focused_inactive $muted $muted $background
|
||||||
client.unfocused $backgroundish $backgroundish $foreground
|
client.unfocused $backgroundish $backgroundish $foreground
|
||||||
|
# https://git.sr.ht/~troels/dotfiles/tree/master/item/.config/sway/config#L181
|
||||||
titlebar_border_thickness 1
|
titlebar_border_thickness 1
|
||||||
|
titlebar_padding 15 5
|
||||||
|
title_align center
|
||||||
|
|
||||||
bindsym $mod+z exec swaync-client --close-latest
|
bindsym $mod+z exec swaync-client --close-latest
|
||||||
bindsym $mod+x exec swaync-client -t
|
bindsym $mod+x exec swaync-client -t
|
||||||
|
@ -275,4 +256,6 @@ exec "foot --server"
|
||||||
exec "wlsunset -l -34.61315 -L -58.37723"
|
exec "wlsunset -l -34.61315 -L -58.37723"
|
||||||
exec swaync
|
exec swaync
|
||||||
exec kanshi
|
exec kanshi
|
||||||
exec poweralertd
|
exec waybar
|
||||||
|
exec "nm-applet --indicator"
|
||||||
|
exec "~/.local/bin/watch-dconf"
|
||||||
|
|
99
.config/waybar/config
Normal file
99
.config/waybar/config
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
{
|
||||||
|
// "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"],
|
||||||
|
"modules-center": [],
|
||||||
|
"modules-right": ["custom/zeit", "idle_inhibitor", "pulseaudio", "battery", "clock", "tray"],
|
||||||
|
// Modules configuration
|
||||||
|
// "sway/workspaces": {
|
||||||
|
// "disable-scroll": true,
|
||||||
|
// "all-outputs": true,
|
||||||
|
// "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": "<span style=\"italic\">{}</span>"
|
||||||
|
},
|
||||||
|
"sway/scratchpad": {
|
||||||
|
"format": "{icon} {count}",
|
||||||
|
"show-empty": false,
|
||||||
|
"format-icons": ["", ""],
|
||||||
|
"tooltip": true,
|
||||||
|
"tooltip-format": "{app}: {title}"
|
||||||
|
},
|
||||||
|
"idle_inhibitor": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"activated": "",
|
||||||
|
"deactivated": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
// "icon-size": 21,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
// "good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
// "scroll-step": 1, // %, can be a float
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||||
|
"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
|
"format-muted": " {format_source}",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"custom/zeit": {
|
||||||
|
"exec": "$HOME/.config/waybar/zeit.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
128
.config/waybar/style.css
Normal file
128
.config/waybar/style.css
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
* {
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: Inter, FontAwesome;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: rgba(43, 48, 59, 1);
|
||||||
|
/*border-bottom: 3px solid rgba(100, 114, 125, 0.5);*/
|
||||||
|
color: #ffffff;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 button {
|
||||||
|
padding: 0 10px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: #64727d;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #64727d;
|
||||||
|
border-bottom: 3px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#wireplumber,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#scratchpad,
|
||||||
|
#mpd,
|
||||||
|
#custom-zeit {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
16
.config/waybar/zeit.sh
Executable file
16
.config/waybar/zeit.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. ~/.profile
|
||||||
|
|
||||||
|
update_zeit() {
|
||||||
|
zeit tracking --no-colors
|
||||||
|
}
|
||||||
|
update_zeit
|
||||||
|
|
||||||
|
(busybox inotifyd - "$ZEIT_DB":c | while read -r; do
|
||||||
|
update_zeit
|
||||||
|
done) &
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
sleep 30
|
||||||
|
update_zeit
|
||||||
|
done
|
|
@ -2,7 +2,6 @@
|
||||||
. ~/.profile
|
. ~/.profile
|
||||||
|
|
||||||
dconf_color_path=/org/gnome/desktop/interface/color-scheme
|
dconf_color_path=/org/gnome/desktop/interface/color-scheme
|
||||||
dconf_message_path=/org/gnome/shell/extensions/simple-message/message
|
|
||||||
|
|
||||||
switch_helix() {
|
switch_helix() {
|
||||||
sed -i 's/theme = ".*"/theme = "'$1'"/' ~/.config/helix/config.toml
|
sed -i 's/theme = ".*"/theme = "'$1'"/' ~/.config/helix/config.toml
|
||||||
|
@ -28,23 +27,9 @@ switch_from_dconf() {
|
||||||
|
|
||||||
switch_from_dconf "$(dconf read "$dconf_color_path")"
|
switch_from_dconf "$(dconf read "$dconf_color_path")"
|
||||||
|
|
||||||
(dconf watch "$dconf_color_path" | while read -r line; do
|
dconf watch "$dconf_color_path" | while read -r line; do
|
||||||
theme="$(echo "$line" | grep -E "'.*'" | sed "s/'//g")"
|
theme="$(echo "$line" | grep -E "'.*'" | sed "s/'//g")"
|
||||||
test -z "$theme" && continue
|
test -z "$theme" && continue
|
||||||
switch_from_dconf "$theme"
|
switch_from_dconf "$theme"
|
||||||
done) &
|
|
||||||
|
|
||||||
update_zeit() {
|
|
||||||
dconf write "$dconf_message_path" "'$(zeit tracking --no-colors)'"
|
|
||||||
echo updated zeit
|
|
||||||
}
|
|
||||||
update_zeit
|
|
||||||
|
|
||||||
(busybox inotifyd - "$ZEIT_DB":c | while read -r; do
|
|
||||||
update_zeit
|
|
||||||
done) &
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
sleep 30
|
|
||||||
update_zeit
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
6
.local/share/applications/switch-to-dark.desktop
Normal file
6
.local/share/applications/switch-to-dark.desktop
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=switch to dark
|
||||||
|
Exec=dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
6
.local/share/applications/switch-to-light.desktop
Normal file
6
.local/share/applications/switch-to-light.desktop
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=switch to light
|
||||||
|
Exec=dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
Loading…
Reference in a new issue