Updated config

This commit is contained in:
Eduard Urbach 2024-03-05 13:28:48 +01:00
parent 307d253d9e
commit eca02857ec
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
11 changed files with 150 additions and 78 deletions

View File

@ -33,6 +33,7 @@ alias pu "sudo pacman -Syu"
alias pl "pacman -Q" alias pl "pacman -Q"
alias po "pacman -Qo" alias po "pacman -Qo"
alias pc "sudo pacman -Sc" alias pc "sudo pacman -Sc"
alias paur "pacman -Qm"
alias porphan "pacman -Qtdq" alias porphan "pacman -Qtdq"
# Tmux # Tmux

View File

@ -5,7 +5,7 @@ SETUVAR fish_color_autosuggestion:707A8C
SETUVAR fish_color_cancel:\x2d\x2dreverse SETUVAR fish_color_cancel:\x2d\x2dreverse
SETUVAR fish_color_command:00ff00 SETUVAR fish_color_command:00ff00
SETUVAR fish_color_comment:5C6773 SETUVAR fish_color_comment:5C6773
SETUVAR fish_color_cwd:73D0FF SETUVAR fish_color_cwd:66D9EF
SETUVAR fish_color_cwd_root:red SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:F29E74 SETUVAR fish_color_end:F29E74
SETUVAR fish_color_error:FF3333 SETUVAR fish_color_error:FF3333

View File

@ -0,0 +1,12 @@
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 2, myBezier
animation = windowsOut, 1, 2, default, popin 80%
animation = border, 1, 5, default
animation = borderangle, 1, 3, default
animation = fade, 1, 2, default
animation = workspaces, 1, 1, default
}

View File

@ -1,8 +1,3 @@
# https://github.com/hyprwm/Hyprland/issues/2591
$XDG_DATA_HOME=$HOME/.local/share
$XDG_CONFIG_HOME=$HOME/.config
$XDG_STATE_HOME=$HOME/.local/state
$XDG_CACHE_HOME=$HOME/.cache
# Firefox # Firefox
env = MOZ_ENABLE_WAYLAND,1 env = MOZ_ENABLE_WAYLAND,1
@ -32,6 +27,17 @@ env = GDK_BACKEND,wayland
env = WLR_NO_HARDWARE_CURSORS,1 env = WLR_NO_HARDWARE_CURSORS,1
env = WLR_RENDERER,vulkan env = WLR_RENDERER,vulkan
# https://github.com/hyprwm/Hyprland/issues/2591
$XDG_DATA_HOME=$HOME/.local/share
$XDG_CONFIG_HOME=$HOME/.config
$XDG_STATE_HOME=$HOME/.local/state
$XDG_CACHE_HOME=$HOME/.cache
env = XDG_DATA_HOME,$XDG_DATA_HOME
env = XDG_CONFIG_HOME,$XDG_CONFIG_HOME
env = XDG_STATE_HOME,$XDG_STATE_HOME
env = XDG_CACHE_HOME,$XDG_CACHE_HOME
# Config directories # Config directories
env = HISTFILE,$XDG_STATE_HOME/bash/history env = HISTFILE,$XDG_STATE_HOME/bash/history
env = CARGO_HOME,$XDG_DATA_HOME/cargo env = CARGO_HOME,$XDG_DATA_HOME/cargo

View File

@ -1,8 +1,9 @@
general { general {
gaps_in = 5 gaps_in = 4
gaps_out = 10 gaps_out = 6
border_size = 0
border_size = 2
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)
@ -24,35 +25,29 @@ input {
natural_scroll = no natural_scroll = no
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. sensitivity = 0
accel_profile = flat
} }
decoration { decoration {
rounding = 3 rounding = 10
blur { blur {
enabled = true enabled = true
size = 3 size = 4
passes = 1 passes = 4
new_optimizations = on
ignore_opacity = on
xray = false
} }
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)
}
animations { #active_opacity = 1.0
enabled = yes #inactive_opacity = 0.75
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 2, myBezier
animation = windowsOut, 1, 2, default, popin 80%
animation = border, 1, 5, default
animation = borderangle, 1, 3, default
animation = fade, 1, 2, default
animation = workspaces, 1, 1, default
} }
dwindle { dwindle {

View File

@ -3,5 +3,6 @@ source = programs.conf
source = environment.conf source = environment.conf
source = autostart.conf source = autostart.conf
source = general.conf source = general.conf
source = animations.conf
source = rules.conf source = rules.conf
source = keys.conf source = keys.conf

View File

@ -33,8 +33,9 @@ on({ "VimEnter" }, {
callback = function() callback = function()
-- Change file to its directory if needed -- Change file to its directory if needed
local name = vim.api.nvim_buf_get_name(0) local name = vim.api.nvim_buf_get_name(0)
local is_directory = vim.fn.isdirectory(name)
if vim.fn.isdirectory(name) == 0 then if is_directory == 0 then
name = vim.fs.dirname(name) name = vim.fs.dirname(name)
end end
@ -50,18 +51,22 @@ on({ "VimEnter" }, {
else else
vim.api.nvim_set_current_dir(name) vim.api.nvim_set_current_dir(name)
end end
end,
})
on({ "VimEnter" }, { if is_directory ~= 0 then
desc = "Open file explorer if there is enough horizontal space", require("telescope.builtin").find_files()
group = group,
callback = function()
local files = require("nvim-tree.api")
local width = vim.go.columns
if width > 120 then
files.tree.toggle({ focus = false })
end end
end, end,
}) })
-- on({ "VimEnter" }, {
-- desc = "Open file explorer if there is enough horizontal space",
-- group = group,
-- callback = function()
-- local files = require("nvim-tree.api")
-- local width = vim.go.columns
--
-- if width > 120 then
-- files.tree.toggle({ focus = false })
-- end
-- end,
-- })

View File

@ -4,13 +4,12 @@ end
-- Basics -- Basics
map("n", ";", ":", "Command mode") map("n", ";", ":", "Command mode")
map("n", "U", "<cmd>redo<cr>", "Redo")
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", "Clear search") map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
map({"n", "v"}, "<leader>q", "<cmd>qa!<cr>", "Quit all") map({"n", "v"}, "<leader>q", "<cmd>qa!<cr>", "Quit all")
-- Buffer management -- Buffer management
map("n", "<C-n>", "<cmd>enew<cr>", "New file") map("n", "<C-n>", "<cmd>enew<cr>", "New file")
map({ "i", "n", "s", "v" }, "<C-s>", "<cmd>w<cr><esc>", "Save file") map({ "i", "n", "s", "v" }, "<C-s>", "<cmd>w<cr>", "Save file")
map("n", "<C-q>", "<cmd>bd<cr>", "Delete buffer") map("n", "<C-q>", "<cmd>bd<cr>", "Delete buffer")
-- Copy and paste -- Copy and paste
@ -35,6 +34,10 @@ map("v", "<C-d>", "y/<C-r>\"<cr>N", "Search selection")
map("n", "<C-r>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor") map("n", "<C-r>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor")
map("v", "<C-r>", "y/<C-r>\"<cr>N:%s//<C-r>\"/g<left><left>", "Replace selection") map("v", "<C-r>", "y/<C-r>\"<cr>N:%s//<C-r>\"/g<left><left>", "Replace selection")
-- Editing words
map("n", "<C-w>", "ciw", "Rewrite word")
map("n", "<Bslash>", "<cmd>ToggleWord<cr>", "Toggle word")
-- Indenting -- Indenting
map("n", "<Tab>", "V>gv<esc>") map("n", "<Tab>", "V>gv<esc>")
map("n", "<S-Tab>", "V<gv<esc>") map("n", "<S-Tab>", "V<gv<esc>")
@ -46,11 +49,13 @@ map("n", "+", "<C-a>", "Increase number")
map("n", "-", "<C-x>", "Decrease number") map("n", "-", "<C-x>", "Decrease number")
map("n", "<kPlus>", "<C-a>", "Increase number") map("n", "<kPlus>", "<C-a>", "Increase number")
map("n", "<kMinus>", "<C-x>", "Decrease number") map("n", "<kMinus>", "<C-x>", "Decrease number")
map("n", "<Bslash>", "<cmd>ToggleWord<cr>", "Toggle word")
-- Package manager -- Package manager
map("n", "<leader>l", "<cmd>Lazy<cr>", "Lazy") map("n", "<leader>l", "<cmd>Lazy<cr>", "Lazy")
-- Redo
map("n", "U", "<cmd>redo<cr>", "Redo")
-- Shift arrow selection -- Shift arrow selection
map("n", "<S-Up>", "v<Up>") map("n", "<S-Up>", "v<Up>")
map("n", "<S-Down>", "v<Down>") map("n", "<S-Down>", "v<Down>")

View File

@ -0,0 +1,21 @@
{
"layer": "top",
"position": "bottom",
"modules-left": [
"hyprland/workspaces",
"hyprland/window",
],
"modules-center": [],
"modules-right": [
"custom/updates",
"cpu",
"custom/gpu",
"memory",
"disk",
"network#up",
"network#down",
"wireplumber",
"clock",
],
"include": "~/.config/waybar/modules.jsonc",
}

View File

@ -1,12 +1,7 @@
{ {
"layer": "top",
"position": "bottom",
"modules-left": ["custom/os","hyprland/workspaces"],
"modules-center": ["clock"],
"modules-right": ["cpu","custom/gpu","memory","disk","network","custom/power"],
"clock": { "clock": {
"interval": 60, "interval": 60,
"format": "{:%H : %M}", "format": "<span color='#ffffff7f'></span> {:%H : %M}",
"tooltip-format": "{:%A, %Y-%m-%d}", "tooltip-format": "{:%A, %Y-%m-%d}",
"on-click": "gnome-clocks", "on-click": "gnome-clocks",
"on-click-right": "date -u +'%Y-%m-%dT%H:%M:%SZ' | wl-copy", "on-click-right": "date -u +'%Y-%m-%dT%H:%M:%SZ' | wl-copy",
@ -18,12 +13,20 @@
"max-length": 10, "max-length": 10,
"on-click": "$TERMINAL -e btop", "on-click": "$TERMINAL -e btop",
}, },
"custom/updates": {
"interval": 300,
"format": "<span color='#ffffff7f'>󰏖 </span> {}",
"exec": "~/.bin/updates",
"return-type": "json",
"on-click": "$TERMINAL -e yay",
},
"custom/gpu": { "custom/gpu": {
"interval": 2,
"exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits", "exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits",
"format": "<span color='#ffffff7f'> </span> {}%", "format": "<span color='#ffffff7f'> </span> {}%",
"return-type": "", "return-type": "",
"interval": 2,
"on-click": "$TERMINAL -e nvtop", "on-click": "$TERMINAL -e nvtop",
"max-length": 10,
}, },
"memory": { "memory": {
"interval": 2, "interval": 2,
@ -31,28 +34,30 @@
"max-length": 10, "max-length": 10,
"on-click": "$TERMINAL -e btop", "on-click": "$TERMINAL -e btop",
}, },
"network": { "network#up": {
"interval": 2, "interval": 2,
"format": " {ifname}", "format": "<span color='#ffffff7f'> </span>{bandwidthUpBits}",
"format-wifi": " {essid}", "tooltip-format": " {ifname} upload",
"format-ethernet": "<span color='#ffffff7f'> </span>{bandwidthUpBits} <span color='#ffffff7f'> </span>{bandwidthDownBits}", "max-length": 10,
"format-disconnected": "", "on-click": "$TERMINAL -e nethogs",
"tooltip-format": "{ifname} via {gwaddr}", },
"tooltip-format-wifi": " {essid} ({signalStrength}%)", "network#down": {
"tooltip-format-ethernet": " {ifname}", "interval": 2,
"tooltip-format-disconnected": "", "format": "<span color='#ffffff7f'> </span>{bandwidthDownBits}",
"max-length": 50, "tooltip-format": " {ifname} download",
"max-length": 10,
"on-click": "$TERMINAL -e nethogs", "on-click": "$TERMINAL -e nethogs",
}, },
"disk": { "disk": {
"interval": 30, "interval": 30,
"format": "<span color='#ffffff7f'>󰋊 </span>{used}", "format": "<span color='#ffffff7f'>󰋊 </span>{used}",
"path": "/", "path": "/",
"max-length": 10,
"on-click": "$TERMINAL -e dua i", "on-click": "$TERMINAL -e dua i",
}, },
"mpris": { "mpris": {
"format": "{player_icon} {title}", "format": "<span color='#ffffff7f'>{player_icon}</span> {title}",
"format-paused": "{status_icon} {title}", "format-paused": "<span color='#ffffff7f'>{status_icon}</span> {title}",
"player-icons": { "player-icons": {
"default": "󰝚", "default": "󰝚",
"mpv": "󰝚" "mpv": "󰝚"
@ -66,12 +71,16 @@
"format": "<span color='#ffffff7f'>{icon}</span> {volume}%", "format": "<span color='#ffffff7f'>{icon}</span> {volume}%",
"format-muted": "", "format-muted": "",
"scroll-step": 5, "scroll-step": 5,
"on-click": "helvum",
"format-icons": ["", "", ""], "format-icons": ["", "", ""],
"max-length": 10,
"on-click": "helvum",
},
"hyprland/window": {
"format": "󰘔 {initialTitle}",
"separate-outputs": true
}, },
"hyprland/workspaces": { "hyprland/workspaces": {
"format": "{icon}", "format": "{icon}",
"on-click": "activate",
"persistent-workspaces": { "persistent-workspaces": {
"*": 9 "*": 9
}, },
@ -82,6 +91,7 @@
"urgent": "", "urgent": "",
}, },
"sort-by-number": true, "sort-by-number": true,
"on-click": "activate",
}, },
"custom/os":{ "custom/os":{
"format": "", "format": "",

View File

@ -1,58 +1,74 @@
* { * {
border: none; border: none;
font-family: "Ubuntu Nerd Font"; font-family: "Ubuntu Nerd Font";
font-size: 11px; font-size: 12px;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
window#waybar { #waybar {
color: #F8F8F2; background: transparent;
background: #272822;
/* border: 2px solid rgba(255, 255, 255, 0.1); */
/* border-radius: 3px; */
/* border-bottom: 1px solid rgba(255, 255, 255, 0.25); */
} }
window#waybar.hidden { #waybar.hidden {
opacity: 0.2; opacity: 0.2;
} }
#waybar #window {
opacity: 1;
transition: opacity 200ms ease;
}
#waybar.empty #window {
opacity: 0;
}
#clock, #clock,
#cpu, #cpu,
#disk, #disk,
#memory, #memory,
#mpris, #mpris,
#network, #network,
#window,
#wireplumber, #wireplumber,
#workspaces, #workspaces,
#custom-os, #custom-os,
#custom-gpu { #custom-gpu,
margin: 0 8px; #custom-updates {
background: rgb(38, 41, 44);
border-radius: 10px;
padding: 4px 8px;
margin: 0px 4px;
margin-bottom: 4px;
} }
#workspaces {} #custom-updates.disabled {
opacity: 0;
}
#workspaces button { #workspaces button {
padding: 0px 5px; padding: 0px 5px;
color: rgba(255, 255, 255, 0.4); opacity: 0.8;
background: transparent; background: transparent;
text-shadow: none; text-shadow: none;
border-radius: 0; border-radius: 0;
} }
#workspaces button.empty { #workspaces button.empty {
color: rgba(255, 255, 255, 0.2); opacity: 0.2;
} }
#workspaces button.active {
opacity: 1.0;
}
#workspaces button.visible {} #workspaces button.visible {}
#workspaces button.urgent {} #workspaces button.urgent {}
#workspaces button.persistent {} #workspaces button.persistent {}
#workspaces button.hidden {} #workspaces button.hidden {}
#workspaces button.active {
color: rgba(255, 255, 255, 1.0);
}
#custom-os { #custom-os {
font-size: 150%;
color: rgb(137, 220, 235); color: rgb(137, 220, 235);
background: transparent;
} }