This commit is contained in:
jay 2023-04-26 14:01:54 +08:00
parent fbcdaa4c0e
commit 26df51eb9d
6 changed files with 250 additions and 133 deletions

View File

@ -872,3 +872,56 @@ live_config_reload: true
# Print all received window events. # Print all received window events.
#print_events: false #print_events: false
colors:
primary:
background: '#282a36'
foreground: '#f8f8f2'
bright_foreground: '#ffffff'
cursor:
text: CellBackground
cursor: CellForeground
vi_mode_cursor:
text: CellBackground
cursor: CellForeground
search:
matches:
foreground: '#44475a'
background: '#50fa7b'
focused_match:
foreground: '#44475a'
background: '#ffb86c'
footer_bar:
background: '#282a36'
foreground: '#f8f8f2'
hints:
start:
foreground: '#282a36'
background: '#f1fa8c'
end:
foreground: '#f1fa8c'
background: '#282a36'
line_indicator:
foreground: None
background: None
selection:
text: CellForeground
background: '#5e68ab'
# background: '#44475a'
normal:
black: '#21222c'
red: '#ff5555'
green: '#50fa7b'
yellow: '#f1fa8c'
blue: '#bd93f9'
magenta: '#ff79c6'
cyan: '#8be9fd'
white: '#f8f8f2'
bright:
black: '#6272a4'
red: '#ff6e6e'
green: '#69ff94'
yellow: '#ffffa5'
blue: '#d6acff'
magenta: '#ff92df'
cyan: '#a4ffff'
white: '#ffffff'

View File

@ -22,18 +22,14 @@ monitor=eDP-1,preferred,auto,1
exec-once = dbus-update-activation-environment --all exec-once = dbus-update-activation-environment --all
exec-once = kanshi exec-once = kanshi
exec-once = dex -a -e kypr exec-once = dex -a -e kypr
exec-once = swayidle -w \ exec-once = swayidle -w timeout 300 'swaylock -f -i ~/.config/swaylock/bg.png -s fill' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -i ~/.config/swaylock/bg.png -s fill'
timeout 300 'swaylock -f -i ~/.config/swaylock/bg.png -s fill' \
timeout 600 'hyprctl dispatch dpms off' \
resume 'hyprctl dispatch dpms on' \
before-sleep 'swaylock -f -i ~/.config/swaylock/bg.png -s fill'
exec-once = waybar exec-once = waybar
exec-once = swaybg -i ~/.config/hypr/bg.png -m fill exec-once = swaybg -i ~/.config/hypr/bg.png -m fill
exec-once = udiskie & exec-once = udiskie &
# start applications # start applications
exec-once = telegram-desktop # exec-once = telegram-desktop
exec-once = slack # exec-once = slack
# Source a file (multi-file configs) # Source a file (multi-file configs)
@ -67,9 +63,24 @@ general {
gaps_in = 5 gaps_in = 5
gaps_out = 10 gaps_out = 10
border_size = 2 border_size = 3
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa) # col.inactive_border = rgba(595959aa)
# col.active_border = rgb(44475a) rgb(bd93f9) 90deg
# col.inactive_border = rgba(44475aaa)
# col.group_border = rgba(282a36dd)
# col.group_border_active = rgb(bd93f9) rgb(44475a) 90deg
# non-gradient alternative
col.active_border = rgb(bd93f9)
col.inactive_border = rgba(44475aaa)
col.group_border = rgba(282a36dd)
col.group_border_active = rgb(bd93f9)
# darker alternative
#col.active_border = rgb(44475a) # or rgb(6272a4)
#col.inactive_border = rgb(282a36)
#col.group_border = rgb(282a36)
#col.group_border_active = rgb(44475a) # or rgb(6272a4)
layout = dwindle layout = dwindle
} }
@ -86,7 +97,15 @@ decoration {
drop_shadow = yes drop_shadow = yes
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = rgba(1a1a1aee) # col.shadow = rgba(1a1a1aee)
col.shadow = rgba(1E202966)
# suggested shadow setting
drop_shadow = yes
shadow_range = 60
shadow_offset = 1 2
shadow_render_power = 3
shadow_scale = 0.97
} }
animations { animations {

View File

@ -79,6 +79,8 @@ Plug 'codota/tabnine-nvim', { 'do': './dl_binaries.sh' }
Plug 'folke/tokyonight.nvim', { 'branch': 'main' } Plug 'folke/tokyonight.nvim', { 'branch': 'main' }
Plug 'norcalli/nvim-colorizer.lua'
" temp plugin " temp plugin
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
Plug 'buoto/gotests-vim' Plug 'buoto/gotests-vim'
@ -436,7 +438,7 @@ require('tabnine').setup({
}) })
vim.opt.list = true vim.opt.list = true
vim.opt.listchars:append "eol:↴" -- vim.opt.listchars:append "eol:↴"
require("indent_blankline").setup { require("indent_blankline").setup {
show_end_of_line = true, show_end_of_line = true,
@ -444,6 +446,8 @@ require("indent_blankline").setup {
show_current_context_start = true, show_current_context_start = true,
} }
require'colorizer'.setup()
local nvlsp = require'lspconfig' local nvlsp = require'lspconfig'
local lspSig = require'lsp_signature' local lspSig = require'lsp_signature'

View File

@ -2,34 +2,25 @@
{ {
"layer": "top", // Waybar at top layer "layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right) "position": "top", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height) // "height": 30, // Waybar height (to be removed for auto height)
"margin": "3 3 0 3",
// "width": 1280, // Waybar width // "width": 1280, // Waybar width
"spacing": 2, // Gaps between modules (4px) // "spacing": 1, // Gaps between modules (4px)
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["wlr/workspaces", "hyprland/submap", "hyprland/window"], "modules-left": ["wlr/workspaces", "custom/sep", "hyprland/window", "hyprland/submap"],
// "modules-left": ["sway/workspaces", "sway/mode", "sway/window"], // "modules-left": ["sway/workspaces", "sway/mode", "sway/window"],
"modules-center": [], "modules-center": ["clock"],
"modules-right": [ "modules-right": [
"idle_inhibitor", "idle_inhibitor",
"custom/sep", "custom/sep",
"custom/pipewire",
"custom/sep",
"network", "network",
"custom/sep", "custom/sep",
"custom/pipewire",
"cpu", "cpu",
"custom/sep",
"memory", "memory",
"custom/sep",
"disk",
"custom/sep",
"temperature",
"custom/sep",
"backlight", "backlight",
"custom/sep",
"battery", "battery",
"custom/sep", "custom/sep",
"clock",
"custom/sep",
"tray" "tray"
], ],
// Modules configuration // Modules configuration
@ -38,14 +29,10 @@
"interval": "once", "interval": "once",
"tooltip": false "tooltip": false
}, },
"sway/window": {
"max-length": 40
},
"wlr/workspaces": { "wlr/workspaces": {
"format": "{name}", "format": "{name}",
"on-click": "activate", "on-click": "activate",
"on-scroll-up": "hyprctl dispatch workspace e+1", "disable-scroll": true
"on-scroll-down": "hyprctl dispatch workspace e-1"
}, },
"custom/pipewire": { "custom/pipewire": {
"exec": "/home/jay/bin/get-volume.sh", "exec": "/home/jay/bin/get-volume.sh",
@ -59,6 +46,13 @@
}, },
"on-click": "pavucontrol" "on-click": "pavucontrol"
}, },
"hyprland/window": {
"max-length": 30
},
"hyprland/submap": {
"format": "{}",
"tooltip": false
},
"idle_inhibitor": { "idle_inhibitor": {
"format": "{icon}", "format": "{icon}",
"format-icons": { "format-icons": {
@ -74,7 +68,7 @@
"clock": { "clock": {
// "timezone": "America/New_York", // "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %H:%M:%S}", "format": "{:%Y-%m-%d %H:%M:%S %a}",
"format-alt": "{:%Y-%m-%d}", "format-alt": "{:%Y-%m-%d}",
"interval": 1 "interval": 1
}, },
@ -85,7 +79,7 @@
}, },
"memory": { "memory": {
"interval": 10, "interval": 10,
"format": " {used}G/{total}G", "format": " {used}G",
"tooltip-format": "{percentage}% used" "tooltip-format": "{percentage}% used"
}, },
"temperature": { "temperature": {
@ -107,10 +101,10 @@
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "{capacity}% {icon}", "format": "{icon} {capacity}%",
"format-charging": "{capacity}%", "format-charging": "{capacity}%",
"format-plugged": "{capacity}%", "format-plugged": "{capacity}%",
"format-alt": "{time} {icon}", "format-alt": "{icon} {time}",
// "format-good": "", // An empty format will hide the module // "format-good": "", // An empty format will hide the module
// "format-full": "", // "format-full": "",
"format-icons": ["", "", "", "", ""] "format-icons": ["", "", "", "", ""]
@ -126,11 +120,6 @@
"format-linked": "{ifname} (No IP) ", "format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠", "format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}" "format-alt": "{ifname}: {ipaddr}/{cidr}"
}, }
"disk": {
"interval": 30,
"path": "/",
"format": " {used}/{total}"
},
} }

View File

@ -1,104 +1,169 @@
* { * {
font-family: "Ubuntu Mono Nerd Font"; border: none;
font-size: 13px; border-radius: 0;
min-height: 0; font-family: 'JetBrainsMono Nerd Font';
font-size: 12px;
} }
window#waybar { window#waybar {
/* background: transparent; */ background: transparent;
/* background: black; */
background: rgba(40, 44, 52, 0.85);
color: white;
border: 1px solid #8fd4ff;
border-radius: 5px;
} }
#window { window#waybar.hidden {
font-family: "Ubuntu Mono"; opacity: 0.1;
padding: 0 5px;
border: 1px solid #8fd4ff;
border-radius: 5px;
} }
window#waybar.empty #window { #custom-sep {
padding: 0px; color: #9399b2;
margin: 0px; background: rgba(17, 17, 27, 0.9);
border: 0px; }
/* background-color: rgba(66,66,66,0.5); */ /* transparent */
background-color: transparent; #workspaces {
padding-left: 5px;
transition: none;
border-radius: 15px 0px 0px 15px;
background: rgba(17, 17, 27, 0.9);
} }
#workspaces button { #workspaces button {
color: gray; transition: ease-out;
/* border: 1px solid #8fd4ff; */ transition-duration: 0.1s;
/* border-radius: 5px; */ color: #6c7086;
background: transparent;
padding-left: 5px;
padding-right: 5px;
} }
/* #workspaces button.focused { */ #workspaces button.persistent {
/* color: white; */ color: #6c7086;
/* border: 1px solid #8fd4ff; */ }
/* border-radius: 5px; */ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
/* } */ #workspaces button:hover {
#workspaces button.active { box-shadow: inherit;
color: white; text-shadow: inherit;
border: 1px solid #8fd4ff; transition: ease-in;
border-radius: 5px; transition-duration: 0.1s;
color: #f5c2e7;
}
#workspaces button.active {
color: #ea76cb;
}
#workspaces button.urgent {
color: #d20f39;
}
#window {
margin-right: 3px;
padding-left: 5px;
padding-right: 10px;
border-radius: 0px 15px 15px 0px;
transition: none;
background: rgba(17, 17, 27, 0.9);
color: #eee;
}
#submap {
padding-left: 5px;
padding-right: 5px;
margin-right: 3px;
border-radius: 15px 15px 15px 15px;
transition: none;
background: #f38ba8;
color: #313244;
}
#clock {
padding-left: 10px;
padding-right: 5px;
border-radius: 15px 15px 15px 15px;
transition: none;
color: #ffffff;
background: rgba(17, 17, 27, 0.9);
}
#custom-pipewire {
padding-left: 10px;
padding-right: 5px;
transition: ease-in;
transition-duration: 0.2s;
color: white;
background: rgba(17, 17, 27, 0.9);
}
#custom-pipewire.muted {
background-color: rgba(17, 17, 27, 0.9);
color: #ffffff;
}
#backlight {
padding-left: 5px;
transition: none;
color: white;
background: rgba(17, 17, 27, 0.9);
}
#idle_inhibitor {
border-radius: 15px 0px 0px 15px;
padding-left: 10px;
padding-right: 5px;
transition: ease-in;
transition-duration: 0.1s;
color: white;
background: rgba(17, 17, 27, 0.9);
}
#idle_inhibitor.activated {
background-color: #ff4879;
} }
#tray,
#custom-japan,
#custom-germany,
#temperature,
#clock,
#battery,
#cpu, #cpu,
#memory, #memory,
#network, #network {
#pulseaudio { padding-left: 5px;
padding: 0 5px; padding-right: 5px;
margin-right: 5px; transition: none;
margin-top: 5px; color: #ffffff;
margin-bottom: 5px; background: rgba(17, 17, 27, 0.9);
} }
#temperature.critical { #battery {
color: #b62d66; padding-left: 10px;
} padding-right: 10px;
transition: none;
#battery icon { color: white;
color: #b62d66; background: rgba(17, 17, 27, 0.9);
} }
#battery.charging { #battery.charging {
border-bottom: 1px dotted #8fd4ff; color: #f38ba8;
}
#battery.warning:not(.charging) {
color: #cba6f7;
} }
@keyframes blink { @keyframes blink {
to { to {
background-color: #8fd4ff; background-color: #11111b;
color: black; color: #f38ba8;
} }
} }
#battery.warning:not(.charging) { #battery.critical:not(.charging) {
color: white; background-color: #f38ba8;
animation-name: blink; color: #313244;
animation-duration: 2s; animation-name: blink;
animation-timing-function: linear; animation-duration: 0.2s;
animation-iteration-count: infinite; animation-timing-function: linear;
animation-direction: alternate; animation-iteration-count: infinite;
border-radius: 5px; animation-direction: alternate;
} }
#tray {
#battery.warning:not(.charging) { padding-left: 5px;
color: white; padding-right: 10px;
animation-name: blink; border-radius: 0px 15px 15px 0px;
animation-duration: 1s; transition: none;
animation-timing-function: linear; color: #ffffff;
animation-iteration-count: infinite; background: rgba(17, 17, 27, 0.9);
animation-direction: alternate;
border-radius: 5px;
}
#network.disconnected {
color: #b62d66;
} }

View File

@ -32,19 +32,6 @@ function envf {
export $(cat $1 | grep -v '^#' | xargs) export $(cat $1 | grep -v '^#' | xargs)
} }
function save-image {
if [ -z "$1" ]; then
echo "usage: save-image <image-name>"
exit 1
fi
imageName=$(echo ${1##*/} | sed 's/:/_/' | xargs -I {} echo "{}.tar")
lima nerdctl pull $1
lima nerdctl image save -o $imageName $1
lima nerdctl image rm $1
}
function ttySize { function ttySize {
echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)" echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)"
} }