trimmed a lot of fat from sway config, working on styling bar

This commit is contained in:
spinach 2023-12-05 12:39:41 -05:00
parent 280f657a1a
commit e17b45eebb
5 changed files with 83 additions and 62 deletions

View File

@ -20,30 +20,27 @@ gaps inner 10
smart_gaps on smart_gaps on
# setup screens # setup screens
exec --no-startup-id kanshi exec_always killall kanshi; kanshi
# background
exec_always wallpaper.sh
# waybar
exec_always killall waybar; waybar
workspace 1 output DP-2 workspace 1 output DP-2
workspace 2 output DP-3 workspace 2 output DP-3
# exec --no-startup-id dex --autostart --environment i3
# loading layout # loading layout
assign [class="st-256color"] 1 assign [class="st-256color"] 1
assign [class="Brave-browser"] 2 assign [class="Brave-browser"] 2
exec --no-startup-id st -e tmux # launching default apps
exec --no-startup-id brave exec st -e tmux
exec brave
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod floating_modifier $mod
# start a terminal # open term
bindsym $mod+Return exec st bindsym $mod+Return exec st
# setup idling # setup idling
@ -59,13 +56,8 @@ bindsym $mod+q exec sleep 1 && killall -SIGUSR1 swayidle
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # start rofi (a program launcher)
bindsym $mod+d exec --no-startup-id rofi-launcher bindsym $mod+d exec rofi-launcher
# exec --no-startup-id st -n todo -e nvim ~/vimwiki/todo/index.md
# exec --no-startup-id st -n cal -e calcurse
# bindsym $mod+s [instance="todo"] scratchpad show
# bindsym $mod+c [instance="cal"] scratchpad show
for_window [instance="todo"] move window to scratchpad for_window [instance="todo"] move window to scratchpad
for_window [instance="cal"] move window to scratchpad for_window [instance="cal"] move window to scratchpad
@ -78,35 +70,18 @@ bindsym $mod+c exec i3-scratchpad.sh cal st -n cal -e calcurse
bindsym $mod+m exec i3-scratchpad.sh spotify spotify bindsym $mod+m exec i3-scratchpad.sh spotify spotify
bindsym $mod+w exec i3-scratchpad.sh wiki st -n wiki -e nvim ~/vimwiki/index.md bindsym $mod+w exec i3-scratchpad.sh wiki st -n wiki -e nvim ~/vimwiki/index.md
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus # change focus
bindsym $mod+h focus left bindsym $mod+h focus left
bindsym $mod+j focus down bindsym $mod+j focus down
bindsym $mod+k focus up bindsym $mod+k focus up
bindsym $mod+l focus right bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window # move focused window
bindsym $mod+Shift+j move left bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation # split in horizontal orientation
#bindsym $mod+h split h #bindsym $mod+h split h
@ -203,7 +178,3 @@ mode "resize" {
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
# background
exec_always --no-startup-id wallpaper.sh
# waybar
exec_always --no-startup-id killall -q waybar; waybar

View File

@ -1,14 +1,27 @@
{ {
"layer": "top", "layer": "top",
"modules-left": ["sway/workspaces", "sway/window"], "modules-left": ["sway/workspaces", "sway/window", "pulseaudio/slider"],
"modules-center": ["weather"], "modules-center": ["custom/weather"],
"modules-right": ["cpu", "memory", "network", "privacy", "custom/date"], "modules-right": ["cpu", "memory", "network", "custom/bg", "custom/date"],
"sway/workspaces": { "sway/workspaces": {
"all-outputs": true "all-outputs": true
}, },
"sway/window": { "sway/window": {
"all-outputs": true, "all-outputs": true,
"max-length": 30 "max-length": 20
},
"pulseaudio/slider": {
"min": 0,
"max": 100
},
"custom/spotify-scroll": {
},
"custom/weather": {
"exec": "weather -pd",
"on-click": "i3-scratchpad.sh scratch st -n scratch -e weather -f",
"on-click-right": "weather -r",
"on-click-midde": "i3-scratchpad.sh scratch st -n scratch -e weather -pf"
}, },
"cpu": { "cpu": {
"format": "CPU: {usage}%" "format": "CPU: {usage}%"
@ -23,6 +36,11 @@
"format-wifi": "WLAN: {ssid}", "format-wifi": "WLAN: {ssid}",
"tooltip-format": "DOWN: {bandwidthDownBits} UP: {bandwidthUpBits} IP: {ipaddr}" "tooltip-format": "DOWN: {bandwidthDownBits} UP: {bandwidthUpBits} IP: {ipaddr}"
}, },
"custom/bg": {
"exec": "echo -e '\uf1c5'",
"interval": "once",
"on-click": "wallpaper.sh -s"
},
"custom/date": { "custom/date": {
"exec": "date +'%A, %b %d %l:%M %P'", "exec": "date +'%A, %b %d %l:%M %P'",
"interval": 10 "interval": 10

View File

@ -2,33 +2,31 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
font-family: Hack Nerd Font, Roboto, Helvetica, Arial, sans-serif; font-family: Hack Nerd Font, Roboto, Helvetica, Arial, sans-serif;
font-size: 13pt;
min-height: 0; min-height: 0;
} }
window.DP-3 * {
font-size: 13pt;
}
window.DP-2 * {
font-size: 17pt;
}
window#waybar { window#waybar {
background-color: rgba(43, 48, 59, 1); background-color: transparent;
color: #ffffff; background-color: transparent;
transition-property: background-color; color: #ddd;
transition-duration: .5s;
} }
window#waybar.empty { window#waybar.empty {
color: rgba(0,0,0,0); color: rgba(0,0,0,0);
} }
.topbar {
border-bottom: 3px solid rgba(100, 114, 125, 1);
}
.bottombar {
border-top: 3px solid rgba(100, 114, 125, 1);
}
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 5px;
background-color: transparent; color: #ddd;
color: #ffffff; background-color: rgba(29, 31, 21, 0.8);
} }
#workspaces button:hover { #workspaces button:hover {
@ -66,13 +64,47 @@ window#waybar.empty {
#network.wifi, #network.wifi,
#network.ethernet, #network.ethernet,
#network.disconnected, #network.disconnected,
#custom-date,
#sway-window,
#sway-workspaces,
#pulseaudio, #pulseaudio,
#custom-weather,
#taskbar, #taskbar,
#temperature, #temperature,
#tray { #tray {
padding: 0 6px; padding: 0 5px;
margin: 0 0px; margin: 2px;
color: #ffffff; color: #ddd;
border-radius: 7px;
background-color: rgba(29, 31, 21, 0.6);
}
#custom-bg {
padding: 0 10px 0px 5px;
margin: 2px;
color: #ddd;
border-radius: 7px;
background-color: rgba(29, 31, 21, 0.6);
}
#pulseaudio-slider slider {
min-height: 0px;
min-width: 0px;
opacity: 0;
background-image: none;
border: none;
box-shadow: none;
}
#pulseaudio-slider trough {
min-height: 10px;
min-width: 80px;
border-radius: 5px;
background-color: black;
}
#pulseaudio-slider highlight {
min-width: 5px;
border-radius: 5px;
background-color: green;
} }
@keyframes blink { @keyframes blink {

Binary file not shown.

Binary file not shown.