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_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 = kanshi
exec-once = dex -a -e kypr
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'
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'
exec-once = waybar
exec-once = swaybg -i ~/.config/hypr/bg.png -m fill
exec-once = udiskie &
# start applications
exec-once = telegram-desktop
exec-once = slack
# exec-once = telegram-desktop
# exec-once = slack
# Source a file (multi-file configs)
@ -67,9 +63,24 @@ general {
gaps_in = 5
gaps_out = 10
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
border_size = 3
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
# 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
}
@ -86,7 +97,15 @@ decoration {
drop_shadow = yes
shadow_range = 4
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 {

View File

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

View File

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

View File

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

View File

@ -32,19 +32,6 @@ function envf {
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 {
echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)"
}