updates waybar, zsh and tmux config

This commit is contained in:
koehr 2024-01-02 14:13:23 +01:00
parent eacf797ad8
commit 2c6be4a822
4 changed files with 179 additions and 33 deletions

89
dot.config/tmux/config Normal file
View file

@ -0,0 +1,89 @@
set -g default-terminal "st-256color"
set -ga terminal-overrides ",st-256color:Tc"
set -g escape-time 0
set -g mouse on
unbind C-b
unbind C-a
unbind Space
unbind C-Space
unbind r
unbind Tab
set -g prefix C-a
bind C-a send-prefix
bind-key C-a last-window
bind-key Space next-window
bind-key C-Space previous-window
bind-key Tab select-pane -t :.+ \; swap-pane -U
bind r source-file ~/.tmux.conf
# set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour233'
set -g window-active-style 'fg=colour244,bg=colour234'
set-window-option -g xterm-keys on
# allow set-titles to change the window title under st
# http://opennomad.com/content/goodbye-screen-hello-tmux
# http://stackoverflow.com/questions/15195624
set-option -ga terminal-overrides ',st-256color:smkx=\E='
# status bar
set -g status-style fg=colour208,bg=colour237
# set-option -g status-attr default
set-option -g status-position bottom
set-option -g status-interval 60
set-option -g status-bg default
set-option -g status-fg white
# Left side of status bar
set-option -g status-left-length 10
#set-option -g status-left "#[fg=brightwhite,bg=colour234] #S #[fg=default,bg=default] "
set-option -g status-left '#{?client_prefix,#[bg=colour33]  ,#[bg=colour234] #S }#[fg=default,bg=default] '
# Window status
set-option -g window-status-format "#[fg=white,bg=colour234] #I #[fg=white,bg=colour234] #W "
set-option -g window-status-current-format "#[fg=brightwhite,bg=colour33] #I #[fg=brightwhite,bg=colour234] #W "
set-option -g window-status-separator " "
set-option -g status-justify left
# Right side of status bar
set-option -g status-right-length 80
WEATHER='#(curl -s wttr.in/Berlin\?format\="%%t+%%C+%%w+%%m")'
set-option -g status-right "#[fg=brightwhite,bg=colour33]🌡 BER #[fg=brightwhite,bg=colour234] $WEATHER #[fg=brightwhite,bg=colour33]  #[fg=brightwhite,bg=colour234] #(whoami)@#h "
# pane border
set -g pane-border-style fg=colour238,bg=colour235
set -g pane-active-border-style fg=colour33,bg=colour236
# Pane number indicator
set-option -g display-panes-colour colour234
set-option -g display-panes-active-colour brightwhite
# Clock mode
# set-option -g clock-mode-colour white
# set-option -g clock-mode-style 24
# Message
set -g message-style fg=default,bg=default
# Activity
set-option -g monitor-activity on
set-option -g monitor-silence 0
set-option -g monitor-bell on
set-option -g activity-action other
set-option -g visual-activity on
# Window numbering
set-option -g base-index 1
set-option -g pane-base-index 1
set-option -g renumber-windows on
# select default layout
set-option -g main-pane-width 65
set-option -g main-pane-height 65
bind Enter select-layout main-vertical

View file

@ -2,10 +2,19 @@
"output": "eDP-1",
"layer": "bottom",
"mode": "dock",
"spacing": 16,
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
"modules-center": ["sway/window"],
"modules-right": ["privacy", "wlr/taskbar"],
"spacing": 0,
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad", "custom/suffix"],
"modules-center": ["custom/prefix", "sway/window", "custom/suffix"],
"modules-right": ["custom/prefix", "privacy", "wlr/taskbar"],
"custom/suffix": {
"format": "",
"tooltip": false
},
"custom/prefix": {
"format": "",
"tooltip": false
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
@ -26,13 +35,47 @@
},
"sway/window": {
"icon": false,
"format": "{title} ({app_id}) ",
"format": "{title} ({app_id})",
},
"privacy": {
"icon-spacing": 4,
"icon-size": 24,
"transition-duration": 350,
},
"group/power": {
"orientation": "inherit",
"drawer": {
"transition-duration": 500,
"children-class": "not-power",
"transition-left-to-right": false,
},
"modules": [
"custom/power", // First element is the "group leader" and won't ever be hidden
"custom/quit",
"custom/lock",
"custom/reboot",
]
},
"custom/quit": {
"format": "󰗼",
"tooltip": false,
"on-click": "swaymsg exit"
},
"custom/lock": {
"format": "󰍁",
"tooltip": false,
"on-click": "swaylock"
},
"custom/reboot": {
"format": "󰜉",
"tooltip": false,
"on-click": "reboot"
},
"custom/power": {
"format": "",
"tooltip": false,
"on-click": "shutdown now"
}
}, {
"output": "DP-1",
"layer": "top",

View file

@ -8,11 +8,11 @@ window#waybar {
color: #ffffff;
}
window#waybar.eDP-1 {
background-color: rgba(0, 0, 0, 0.7);
background-color: rgba(42, 42, 42, 0.8);
border: none;
}
window#waybar.DP-1 {
background-color: rgba(42, 42, 42, 0.7);
background-color: rgba(42, 42, 42, 0.8);
border-bottom: 3px solid rgba(115, 115, 115, 0.5);
transition-property: background-color;
transition-duration: .5s;
@ -33,17 +33,15 @@ button {
/* 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;
box-shadow: inset 0 -3px white;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
background: #FABD2F;
}
#workspaces button.focused {
@ -53,7 +51,32 @@ button:hover {
}
#workspaces button.urgent {
background-color: #eb4d4b;
background-color: #EB4D4B;
}
#workspaces,
#sway-mode,
#sway-scratchpad,
#window,
#privacy,
#taskbar,
#power {
background-color: black;
}
#window {
padding-left: 1em;
padding-right: 1em;
}
#custom-suffix,
#custom-prefix {
background-color: transparent;
color: black;
font-size: 2.2em;
}
#custom-prefix {
margin-right: .5em;
}
/* If workspaces is the leftmost module, omit left margin */
@ -66,13 +89,7 @@ button:hover {
margin-right: 0;
}
/* If window-title is the rightmost module, give it some extra right margin */
#sway-window {
margin-right: 1em;
color: green;
}
#privacy {
color: white;
background-color: #eb4d4b;
background-color: #EB4D4B;
}

View file

@ -33,26 +33,23 @@ _collapsed_path() {
}
CC_ORANGE='208'
CC_BLUE='33'
CC_RED='1'
CC_GREEN='2'
CC_GRAY1='236'
CC_GRAY2='238'
CC_GRAY3='240'
CC_LGRAY='250'
CC_GRAY='237'
CC_BLACK='232'
CC_WHITE='255'
CC_CPROMPT="%k%f%K{$CC_GRAY3}%F{$CC_ORANGE}"
CC_CRPROMPT="%k%f%K{$CC_GRAY3}%F{$CC_ORANGE}"
CC_CGITPROMPT="%k%f%K{$CC_GRAY3}%F{$CC_BLACK}"
CC_CPROMPT="%k%f%K{$CC_GRAY}%F{$CC_WHITE}"
CC_CRPROMPT="%k%f%K{$CC_GRAY}%F{$CC_WHITE}"
CC_CGITPROMPT="%k%f%K{$CC_GRAY}%F{$CC_LGRAY}"
CC_CWARN="%k%f%F{$CC_RED}"
CC_WRITE_IN_RED="%f%F{$CC_RED}"
CC_WRITE_IN_GREEN="%f%F{$CC_GREEN}"
CC_WRITE_IN_GRAY="%f%F{$CC_GRAY3}"
CC_WRITE_IN_GRAY="%f%F{$CC_GRAY}"
CC_DRAW_IN_GRAY="%k%f%F{$CC_GRAY3}"
CC_DRAW_IN_GRAY="%k%f%F{$CC_GRAY}"
CC_DRAW_IN_BLACK="%k%f%F{$CC_BLACK}"
CC_SYMBOL_RIGHT_ARROW=$'\ue0b0'
@ -64,9 +61,9 @@ CC_SYMBOL_RIGHT_LIGHT_BOXES=$'\ue0c4'
CC_SYMBOL_LEFT_BOXES=$'\ue0c7'
CC_SYMBOL_LEFT_LIGHT_BOXES=$'\ue0c5'
CC_SYMBOL_HOME=$'\uf015'
CC_SYMBOL_WORK=$'\uf0f7'
CC_SYMBOL_SERVER=$'\uf233'
CC_SYMBOL_HOME=$' \uf015 '
CC_SYMBOL_WORK=$' \uf0f7 '
CC_SYMBOL_SERVER=$' \uf233 '
ZSH_THEME_GIT_PROMPT_PREFIX="$CC_CGITPROMPT "
ZSH_THEME_GIT_PROMPT_SUFFIX=" $CC_DRAW_IN_BLACK"
@ -88,5 +85,5 @@ if [ "$CC_HOSTNAME" = 'phi' ]; then
CC_HOSTNAME=$CC_SYMBOL_HOME
fi
RPROMPT="%k$CC_WRITE_IN_GRAY$CC_SYMBOL_LEFT_BOXES %K{$CC_GRAY3}"'$(git_prompt_info)'"$CC_CRPROMPT $(_collapsed_path) %{$reset_color%}"
RPROMPT="%k$CC_WRITE_IN_GRAY$CC_SYMBOL_LEFT_BOXES %K{$CC_GRAY}"'$(git_prompt_info)'"$CC_CRPROMPT $(_collapsed_path) %{$reset_color%}"
PROMPT="%(?.$CC_CPROMPT$CC_HOSTNAME .$CC_CWARN·%?·)%k$CC_WRITE_IN_GRAY$CC_SYMBOL_RIGHT_BOXES%f"'%{$reset_color%} ' #$CC_CURRENT_PATH "'$(git_prompt)'" $CC_DRAW_IN_GRAY$CC_SYMBOL_RIGHT_ARROW%f "