Compare commits
No commits in common. "710e8f6395094439be9054539027304d7950df56" and "ef733f10a35d8d17c34705999de30b6b1958598e" have entirely different histories.
710e8f6395
...
ef733f10a3
17 changed files with 202 additions and 517 deletions
|
@ -1,10 +1,7 @@
|
||||||
{ inputs, ... }: {
|
{ ... }: {
|
||||||
config.modules = {
|
config.modules = {
|
||||||
application = {
|
application = {
|
||||||
gnupg = {
|
gnupg.enable = true;
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
};
|
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -14,10 +11,7 @@
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
tmux = {
|
tmux.enable = true;
|
||||||
enable = true;
|
|
||||||
extraConfig = inputs.nix-private.tmux.personal;
|
|
||||||
};
|
|
||||||
utils.enable = true;
|
utils.enable = true;
|
||||||
vifm.enable = true;
|
vifm.enable = true;
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
laptop = true;
|
laptop = true;
|
||||||
gpuThermal.enable = false;
|
gpuThermal.enable = false;
|
||||||
cpuThermal = {
|
cpuThermal = {
|
||||||
thermalZone = 9;
|
hwmonPathAbs = "/sys/devices/platform/coretemp.0/hwmon/";
|
||||||
|
inputFilename = "temp1_input";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xdg.useDistributionPortals = true;
|
xdg.useDistributionPortals = true;
|
||||||
|
|
|
@ -46,6 +46,12 @@ in
|
||||||
noAllowExternalCache = true;
|
noAllowExternalCache = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.sessionVariablesExtra = lib.mkIf cfg.enableSshSupport ''
|
||||||
|
if [[ -z "''${SSH_AUTH_SOCK}" ]]; then
|
||||||
|
export SSH_AUTH_SOCK="$(${config.programs.gpg.package}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
services.ssh-agent.enable = if cfg.enableSshSupport then false else true;
|
services.ssh-agent.enable = if cfg.enableSshSupport then false else true;
|
||||||
programs.password-store = {
|
programs.password-store = {
|
||||||
enable = cfg.pass;
|
enable = cfg.pass;
|
||||||
|
|
|
@ -65,7 +65,7 @@ in
|
||||||
python3Packages.python-lsp-server
|
python3Packages.python-lsp-server
|
||||||
shellcheck
|
shellcheck
|
||||||
|
|
||||||
tofu-ls
|
terraform-lsp
|
||||||
tflint
|
tflint
|
||||||
vscode-langservers-extracted
|
vscode-langservers-extracted
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
|
@ -120,7 +120,7 @@ in
|
||||||
{
|
{
|
||||||
plugin = gitsigns-nvim;
|
plugin = gitsigns-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = (builtins.readFile ./files/plugins/gitsign.lua);
|
config = (builtins.readFile ./files/plugins/luasnip.lua);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = indent-blankline-nvim;
|
plugin = indent-blankline-nvim;
|
||||||
|
@ -205,10 +205,7 @@ in
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ( builtins.readFile ./files/plugins/nvim-k8s-lsp.lua );
|
config = ( builtins.readFile ./files/plugins/nvim-k8s-lsp.lua );
|
||||||
}
|
}
|
||||||
{
|
vim-helm
|
||||||
plugin = helm-ls-nvim;
|
|
||||||
type = "lua";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
local opts = { noremap = true, silent = true}
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>/', ':nohlsearch<CR>', opts)
|
|
||||||
vim.api.nvim_set_keymap('n', '<leader>l', ':set list!<CR>', {silent = true})
|
|
||||||
|
|
||||||
-- clear search
|
-- clear search
|
||||||
vim.keymap.set('n', '<leader>l', ':nohlsearch<CR>', { desc = 'Clear search', remap = true, silent = true })
|
vim.keymap.set('n', '<leader>l', ':nohlsearch<CR>', { desc = 'Clear search', remap = true, silent = true })
|
||||||
|
|
||||||
-- Move tabs with \[ and \]
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>]', ':tabnext<CR>', opts)
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>[', ':tabprev<CR>', opts)
|
|
||||||
|
|
||||||
-- Switch between windows.
|
-- Switch between windows.
|
||||||
vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Move to the left window', remap = true })
|
vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Move to the left window', remap = true })
|
||||||
vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Move to the bottom window', remap = true })
|
vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Move to the bottom window', remap = true })
|
||||||
|
@ -28,3 +19,31 @@ vim.keymap.set('n', '<Leader>tn', ':tabnew<CR>', { desc = "Tab [n]ew", remap = t
|
||||||
|
|
||||||
-- Show all caracters
|
-- Show all caracters
|
||||||
vim.keymap.set('n', '<leader>l', ':set list!<CR>', { desc = "Show a[l]l caraters", remap = true, silent = true})
|
vim.keymap.set('n', '<leader>l', ':set list!<CR>', { desc = "Show a[l]l caraters", remap = true, silent = true})
|
||||||
|
|
||||||
|
-- neotree
|
||||||
|
-- -------
|
||||||
|
vim.keymap.set('n', '<leader>nc', ':Neotree close<cr>', {desc='Neotree [c]lose'})
|
||||||
|
vim.keymap.set('n', '<leader>nf', ':Neotree focus filesystem<cr>', {desc='Neotree [f]ocus'})
|
||||||
|
vim.keymap.set('n', '<leader>nb', ':Neotree focus buffers<cr>', {desc='Neotree Nvim [b]uffers'})
|
||||||
|
vim.keymap.set('n', '<leader>ng', ':Neotree focus git_status<cr>', {desc='Neotree [g]it status'})
|
||||||
|
|
||||||
|
-- fzf-lua
|
||||||
|
-- ------
|
||||||
|
vim.keymap.set('n', '<leader>fb', function() require('fzf-lua').buffers() end, {desc='open [b]uffers'})
|
||||||
|
vim.keymap.set('n', '<leader>ff', function() require('fzf-lua').files() end, {desc='[r]esume last command'})
|
||||||
|
vim.keymap.set('n', '<leader>fr', function() require('fzf-lua').files() end, {desc='[f]iles'})
|
||||||
|
|
||||||
|
-- git related keymaps
|
||||||
|
vim.keymap.set('n', '<leader>fgb', function() require('fzf-lua').git_branches() end, {desc='Git [b]ranches'})
|
||||||
|
vim.keymap.set('n', '<leader>fgc', function() require('fzf-lua').git_commits() end, {desc='Git [c]ommits'})
|
||||||
|
vim.keymap.set('n', '<leader>fgC', function() require('fzf-lua').git_bcommits() end, {desc='Git current buffer [C]ommits'})
|
||||||
|
vim.keymap.set('n', '<leader>fgf', function() require('fzf-lua').git_files() end, {desc='Git [f]iles'})
|
||||||
|
vim.keymap.set('n', '<leader>fgs', function() require('fzf-lua').git_stash() end, {desc='Git [s]tash'})
|
||||||
|
vim.keymap.set('n', '<leader>fgS', function() require('fzf-lua').git_status() end, {desc='Git [S]tash'})
|
||||||
|
|
||||||
|
-- grep related keymaps
|
||||||
|
vim.keymap.set('n', '<leader>fGb', function() require('fzf-lua').grep_curbuf() end, {desc='grep in current [b]uffer'})
|
||||||
|
vim.keymap.set('n', '<leader>fGc', function() require('fzf-lua').grep_cword() end, {desc='grep word under the [c]ursor'})
|
||||||
|
vim.keymap.set('n', '<leader>fGg', function() require('fzf-lua').grep() end, {desc='[g]rep'})
|
||||||
|
vim.keymap.set('n', '<leader>fGl', function() require('fzf-lua').live_grep() end, {desc='[l]ive grep'})
|
||||||
|
vim.keymap.set('n', '<leader>fGr', function() require('fzf-lua').grep_last() end, {desc='[r]erun last grep'})
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
return {
|
return {
|
||||||
cmd = { 'helm_ls', 'serve' },
|
cmd = { 'helm_ls', 'serve' },
|
||||||
filetypes = { 'helm', 'yaml.helm-values' },
|
filetypes = { 'helm' },
|
||||||
single_file_support = true,
|
root_markers = { 'Chart.yaml' },
|
||||||
root_markers = { 'values.yaml', 'Chart.yaml' },
|
|
||||||
capabilities = {
|
capabilities = {
|
||||||
workspace = {
|
workspace = {
|
||||||
didChangeWatchedFiles = {
|
didChangeWatchedFiles = {
|
||||||
|
@ -19,7 +18,9 @@ return {
|
||||||
showdiagnosticsdirectly = false,
|
showdiagnosticsdirectly = false,
|
||||||
path = "yaml-language-server",
|
path = "yaml-language-server",
|
||||||
config = {
|
config = {
|
||||||
schemas = {},
|
schemas = {
|
||||||
|
kubernetes = "template/**",
|
||||||
|
},
|
||||||
completion = true,
|
completion = true,
|
||||||
hover = true,
|
hover = true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { 'tofu-ls', 'serve' },
|
cmd = { 'terraform-ls', 'serve' },
|
||||||
filetypes = { 'terraform', 'terraform-vars' },
|
filetypes = { 'terraform', 'terraform-vars' },
|
||||||
root_markers = { '.terraform', '.git' },
|
root_markers = { '.terraform', '.git' },
|
||||||
}
|
}
|
|
@ -52,7 +52,7 @@ vim.opt.wildmode = 'lastused:full,list' -- enhance menu
|
||||||
vim.opt.pumheight = 10
|
vim.opt.pumheight = 10
|
||||||
vim.opt.pumwidth = 50
|
vim.opt.pumwidth = 50
|
||||||
vim.opt.pumblend = 10
|
vim.opt.pumblend = 10
|
||||||
vim.o.winborder = 'none'
|
|
||||||
-- manage line break smartly
|
-- manage line break smartly
|
||||||
vim.opt.wrap = true
|
vim.opt.wrap = true
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
|
@ -103,13 +103,24 @@ vim.opt.wildignore = {
|
||||||
'*.sw?'
|
'*.sw?'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Key biding
|
||||||
|
-- " ----------
|
||||||
|
local opts = { noremap = true, silent = true}
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>/', ':nohlsearch<CR>', opts)
|
||||||
|
|
||||||
|
-- Move tabs with \[ and \]
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>]', ':tabnext<CR>', opts)
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>[', ':tabprev<CR>', opts)
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>l', ':set list!<CR>', {silent = true})
|
||||||
|
|
||||||
-- disable lsplog
|
-- disable lsplog
|
||||||
-- This is not usefull on a daily basis and should positively impact performance
|
-- This is not usefull on a daily basis and should positively impact performance
|
||||||
vim.lsp.set_log_level("off")
|
vim.lsp.set_log_level("off")
|
||||||
|
|
||||||
-- define a timeout for match parens
|
-- define a timeout for match parens
|
||||||
vim.g.matchparen_timeout = 10
|
vim.g.matchparen_timeout = 2
|
||||||
vim.g.matchparen_insert_timeout = 10
|
vim.g.matchparen_insert_timeout = 2
|
||||||
|
|
||||||
-- activate virtual lines for diagnistics
|
-- activate virtual lines for diagnistics
|
||||||
-- no more plugins needed
|
-- no more plugins needed
|
||||||
|
@ -123,73 +134,3 @@ vim.diagnostic.config({
|
||||||
-- },
|
-- },
|
||||||
signs = { text = { [x.ERROR] = "", [x.WARN] = "", [x.INFO] = "", [x.HINT] = "" } },
|
signs = { text = { [x.ERROR] = "", [x.WARN] = "", [x.INFO] = "", [x.HINT] = "" } },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- LSP
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
|
||||||
callback = function(ev)
|
|
||||||
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
|
||||||
|
|
||||||
local opts = { buffer = ev.buf }
|
|
||||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
|
||||||
local bufnr = ev.buf
|
|
||||||
local function desc(description)
|
|
||||||
return { noremap = true, silent = true, buffer = bufnr, desc = description }
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { buffer = ev.buf, desc = "Go to [D]eclaration" })
|
|
||||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { buffer = ev.buf, desc = "Go to [d]efinition" })
|
|
||||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, { buffer = ev.buf, desc = "Go to [i]mplementation" })
|
|
||||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, { buffer = ev.buf, desc = "Go to [r]eferences" })
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"K",
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.hover
|
|
||||||
{ border = "rounded", max_width = 250 }
|
|
||||||
end,
|
|
||||||
opts)
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"<C-k>",
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.signature_help
|
|
||||||
{ border = "rounded", max_width = 250 }
|
|
||||||
end,
|
|
||||||
{buffer = ev.buf, desc = "Signature help"}
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts)
|
|
||||||
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"<leader>wl",
|
|
||||||
function()
|
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
|
||||||
end,
|
|
||||||
opts
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, { buffer = ev.buf, desc = "Type [D]efinition" })
|
|
||||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, { buffer = ev.buf, desc = "LSP [r]e[n]ame" })
|
|
||||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { buffer = ev.buf, desc = "Show [c]ode [a]ction"})
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
"n",
|
|
||||||
"<leader>F",
|
|
||||||
function()
|
|
||||||
require("conform").format({ bufnr = bufnr })
|
|
||||||
end,
|
|
||||||
{ buffer = ev.buf, desc = "[F]ormat file" }
|
|
||||||
)
|
|
||||||
|
|
||||||
if client.server_capabilities.inlayHintProvider then
|
|
||||||
vim.keymap.set("n", "<space>h", function()
|
|
||||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
|
||||||
end, desc("LSP toggle inlay [h]ints"))
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
|
@ -18,8 +18,3 @@ neotree.setup({
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>nc', ':Neotree close<cr>', {desc='Neotree [c]lose'})
|
|
||||||
vim.keymap.set('n', '<leader>nf', ':Neotree focus filesystem<cr>', {desc='Neotree [f]ocus'})
|
|
||||||
vim.keymap.set('n', '<leader>nb', ':Neotree focus buffers<cr>', {desc='Neotree Nvim [b]uffers'})
|
|
||||||
vim.keymap.set('n', '<leader>ng', ':Neotree focus git_status<cr>', {desc='Neotree [g]it status'})
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require("nvim-k8s-lsp").setup({
|
require("nvim-k8s-lsp").setup({
|
||||||
kubernetes_version = "v1.32.8",
|
kubernetes_version = "v1.32.2",
|
||||||
integrations = {
|
integrations = {
|
||||||
lualine = true,
|
lualine = false,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -46,24 +46,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
default = pkgs.papirus-icon-theme;
|
|
||||||
description = ''Icon theme package to use'';
|
|
||||||
};
|
|
||||||
|
|
||||||
iconThemeName = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "Papirus Dark";
|
|
||||||
description = ''Icon theme variant to use'';
|
|
||||||
};
|
|
||||||
|
|
||||||
iconThemePathname = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "Papirus-Dark";
|
|
||||||
description = ''Icon theme variant to use'';
|
|
||||||
};
|
|
||||||
|
|
||||||
waybar = {
|
waybar = {
|
||||||
laptop = mkOption {
|
laptop = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -74,8 +56,8 @@ in
|
||||||
cpuThermal = {
|
cpuThermal = {
|
||||||
|
|
||||||
thermalZone = mkOption {
|
thermalZone = mkOption {
|
||||||
type = types.int or null;
|
type = types.str;
|
||||||
default = null;
|
default = "";
|
||||||
description = "CPU thermal hwmon thermal Zone";
|
description = "CPU thermal hwmon thermal Zone";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -125,8 +107,6 @@ in
|
||||||
# emojione
|
# emojione
|
||||||
font-awesome
|
font-awesome
|
||||||
grim
|
grim
|
||||||
hicolor-icon-theme
|
|
||||||
jq
|
|
||||||
lato
|
lato
|
||||||
liberation_ttf
|
liberation_ttf
|
||||||
libertine
|
libertine
|
||||||
|
@ -137,7 +117,6 @@ in
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
slurp
|
slurp
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wl-screenrec
|
|
||||||
xdg-utils
|
xdg-utils
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -154,8 +133,8 @@ in
|
||||||
package = pkgs.arc-theme;
|
package = pkgs.arc-theme;
|
||||||
};
|
};
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = cfg.iconThemeName;
|
name = "Papirus Dark";
|
||||||
package = cfg.iconTheme;
|
package = pkgs.papirus-icon-theme;
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
name = "Deja Vu Sans";
|
name = "Deja Vu Sans";
|
||||||
|
@ -207,7 +186,7 @@ in
|
||||||
xdg-desktop-portal-wlr
|
xdg-desktop-portal-wlr
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
];
|
];
|
||||||
xdgOpenUsePortal = false;
|
xdgOpenUsePortal = true;
|
||||||
config = {
|
config = {
|
||||||
sway = {
|
sway = {
|
||||||
default = [
|
default = [
|
||||||
|
|
|
@ -1,161 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -eu -o pipefail
|
|
||||||
|
|
||||||
APP_NAME="ScreenCapt"
|
|
||||||
|
|
||||||
declare -A COMMAND
|
|
||||||
COMMAND=(
|
|
||||||
[screenshot]="grim"
|
|
||||||
[video]="wl-screenrec"
|
|
||||||
)
|
|
||||||
declare -A ICONS
|
|
||||||
ICONS=(
|
|
||||||
["screenshot"]="accessories-screenshot"
|
|
||||||
["video"]="record-desktop"
|
|
||||||
)
|
|
||||||
|
|
||||||
declare -A OUTPUT_DIR
|
|
||||||
OUTPUT_DIR=(
|
|
||||||
["screenshot"]="${XDG_PICTURES_DIR:-"~/pictures"}/screenshots"
|
|
||||||
["video"]="${XDG_VIDEOS_DIR:="~/videos"}/screenrecords"
|
|
||||||
)
|
|
||||||
|
|
||||||
declare -A OUTPUT_FILE_EXT
|
|
||||||
OUTPUT_FILE_EXT=(
|
|
||||||
["screenshot"]="png"
|
|
||||||
["video"]="mp4"
|
|
||||||
)
|
|
||||||
|
|
||||||
TO_FILE=0
|
|
||||||
RECORD_AUDIO=0
|
|
||||||
ACTION="screenshot"
|
|
||||||
REGION_TYPE="window"
|
|
||||||
|
|
||||||
notify() {
|
|
||||||
local summary message command
|
|
||||||
filename="${1:-""}"
|
|
||||||
summary="New ${ACTION}!"
|
|
||||||
if [[ $TO_FILE -eq 1 ]]; then
|
|
||||||
message+="Available in <i>${filename##*/}</i>"
|
|
||||||
else
|
|
||||||
message+="Available in the clipboard"
|
|
||||||
fi
|
|
||||||
command=(notify-send "${summary}" --app-name="$APP_NAME")
|
|
||||||
if [[ -n "$filename" && "$ACTION" == "screenshot" ]]; then
|
|
||||||
command+=(--icon="${filename}")
|
|
||||||
else
|
|
||||||
command+=("--icon=${ICONS[$ACTION]}")
|
|
||||||
fi
|
|
||||||
command+=("$message")
|
|
||||||
"${command[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
process_args() {
|
|
||||||
while :; do
|
|
||||||
case ''${1:-""} in
|
|
||||||
screenshot)
|
|
||||||
ACTION="$1"
|
|
||||||
;;
|
|
||||||
|
|
||||||
video)
|
|
||||||
# If a video record is in progress Stop it
|
|
||||||
if pgrep "wl-screenrec"; then
|
|
||||||
kill -s SIGINT $(pgrep "wl-screenrec")
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
TO_FILE=1
|
|
||||||
ACTION="$1"
|
|
||||||
;;
|
|
||||||
-r | --region)
|
|
||||||
if [[ "${2:-""}" =~ ^(r|region|s|screen|w|window)$ ]]; then
|
|
||||||
REGION_TYPE="$2"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-f | --file)
|
|
||||||
TO_FILE=1
|
|
||||||
;;
|
|
||||||
-a | --with-audio)
|
|
||||||
RECORD_AUDIO=1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
get_app_name() {
|
|
||||||
local appname
|
|
||||||
case "$REGION_TYPE" in
|
|
||||||
r | region)
|
|
||||||
appname="region"
|
|
||||||
;;
|
|
||||||
s | screen)
|
|
||||||
appname="screen"
|
|
||||||
;;
|
|
||||||
w | window)
|
|
||||||
appname=$(swaymsg -t get_tree | jq -r '.. | ((.nodes? // empty) + (.floating_nodes? // empty))[] | select(.visible and .pid and .focused) | "\(.app_id)"')
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
printf "%s" "${appname:-}"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_region() {
|
|
||||||
local region switch
|
|
||||||
case "$REGION_TYPE" in
|
|
||||||
r | region)
|
|
||||||
region=$(slurp)
|
|
||||||
switch="-g"
|
|
||||||
;;
|
|
||||||
s | screen)
|
|
||||||
region=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | "\(.name)"')
|
|
||||||
switch="-o"
|
|
||||||
;;
|
|
||||||
w | window)
|
|
||||||
region=$(swaymsg -t get_tree | jq -r '.. | ((.nodes? // empty) + (.floating_nodes? // empty))[] | select(.visible and .pid and .focused) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')
|
|
||||||
switch="-g"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
printf "%s%s" "${switch:-}" "${region:-}"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_output_filename() {
|
|
||||||
local date
|
|
||||||
printf -v date '%(%F_%H.%M.%S)T'
|
|
||||||
printf "%s/%s-%s.%s" "${OUTPUT_DIR[$ACTION]}" "$date" "$(get_app_name)" "${OUTPUT_FILE_EXT[$ACTION]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
ensure_directories_exist() {
|
|
||||||
for dir in "${!OUTPUT_DIR[@]}"; do
|
|
||||||
mkdir -p "${OUTPUT_DIR[$dir]}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
process_args "$@"
|
|
||||||
ensure_directories_exist
|
|
||||||
local command
|
|
||||||
command=("${COMMAND[$ACTION]}" "$(get_region)")
|
|
||||||
if [[ "$TO_FILE" -eq 1 ]]; then
|
|
||||||
local filename
|
|
||||||
filename=$(get_output_filename)
|
|
||||||
if [[ "$ACTION" = "video" ]]; then
|
|
||||||
if [[ "$RECORD_AUDIO" -eq 1 ]]; then
|
|
||||||
command+=(--audio)
|
|
||||||
fi
|
|
||||||
command+=(-f)
|
|
||||||
fi
|
|
||||||
command+=("$filename")
|
|
||||||
"${command[@]}"
|
|
||||||
else
|
|
||||||
"${command[@]}" - | wl-copy
|
|
||||||
fi
|
|
||||||
notify "${filename:-""}"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
|
@ -1,134 +0,0 @@
|
||||||
@define-color color-base-bg #323232;
|
|
||||||
@define-color color-base-fg #ddd;
|
|
||||||
|
|
||||||
@define-color color-hover #f268b3;
|
|
||||||
@define-color color-selected #1cd180;
|
|
||||||
|
|
||||||
@define-color color-ok #1cd180;
|
|
||||||
@define-color color-warning #f2b768;
|
|
||||||
@define-color color-critical #f268b3;
|
|
||||||
|
|
||||||
* {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
min-height:0;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background: @color-base-bg ;
|
|
||||||
color: @color-base-fg;
|
|
||||||
font-family: "Fira Code Nerd Font";
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button,
|
|
||||||
button:disabled,label:disabled{
|
|
||||||
color:inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover{
|
|
||||||
background:none;
|
|
||||||
box-shadow:inherit;
|
|
||||||
box-shadow:inherit;
|
|
||||||
text-shadow:inherit;
|
|
||||||
text-shadow:inherit;
|
|
||||||
border-top:none;
|
|
||||||
}
|
|
||||||
#workspaces {
|
|
||||||
color:#fff;
|
|
||||||
}
|
|
||||||
#workspaces button {
|
|
||||||
margin:0 3px;
|
|
||||||
padding:4px 4px;
|
|
||||||
color:#9c9c9c;
|
|
||||||
border-bottom: 1px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
box-shadow:inherit;
|
|
||||||
text-shadow:inherit;
|
|
||||||
color: @color-hover;
|
|
||||||
border-bottom: 1px solid @color-hover;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
background: @color-selected;
|
|
||||||
color: @color-base-bg;
|
|
||||||
}
|
|
||||||
#workspaces button.visible:not(.focused) {
|
|
||||||
color: @color-selected;
|
|
||||||
border-color: @color-selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#tray,
|
|
||||||
#mode,
|
|
||||||
#battery,
|
|
||||||
#idle_inhibitor {
|
|
||||||
padding: 2px 4px;
|
|
||||||
margin: 0;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode{
|
|
||||||
background:@color-warning;
|
|
||||||
color: @color-base-bg;
|
|
||||||
font-weight:200;
|
|
||||||
font-variant: small-caps;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
#pulseaudio {}
|
|
||||||
#pulseaudio.output.muted {
|
|
||||||
color:@color-critical;
|
|
||||||
}
|
|
||||||
#pulseaudio.input.source-muted {
|
|
||||||
color:@color-critical;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.discharging {
|
|
||||||
color: @color-base-fg;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
border-bottom: 1px solid @color-ok;
|
|
||||||
color: @color-selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging),
|
|
||||||
#cpu.critical,
|
|
||||||
#memory.critical,
|
|
||||||
#temperature.critical{
|
|
||||||
border-color: @color-critical;
|
|
||||||
color: @color-critical;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.warning:not(.charging),
|
|
||||||
#cpu.warning,
|
|
||||||
#memory.warning{
|
|
||||||
border-color: @color-warning;
|
|
||||||
color: @color-warning;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
font-family: "DejaVu sans";
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
#custom-screenrecord {
|
|
||||||
color: @color-critical;
|
|
||||||
border-bottom: 1px solid @color-critical;
|
|
||||||
animation-name: critical-animation;
|
|
||||||
animation-duration: 2s;
|
|
||||||
animation-timing-function: ease-in-out;
|
|
||||||
animation-direction: alternate;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes critical-animation {
|
|
||||||
from {color: @color-critical;}
|
|
||||||
to {color: white;}
|
|
||||||
}
|
|
|
@ -1,8 +1,5 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
|
||||||
cfg = config.modules.desktop.sway;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config = mkIf config.modules.desktop.sway.enable {
|
config = mkIf config.modules.desktop.sway.enable {
|
||||||
systemd.user.services.mako = {
|
systemd.user.services.mako = {
|
||||||
|
@ -27,11 +24,12 @@ in
|
||||||
border-radius = 0;
|
border-radius = 0;
|
||||||
border-size = 2;
|
border-size = 2;
|
||||||
icons = true;
|
icons = true;
|
||||||
icon-path = "${cfg.iconTheme}/share/icons/${cfg.iconThemePathname}";
|
|
||||||
max-icon-size = 64;
|
max-icon-size = 64;
|
||||||
layer = "overlay";
|
layer = "overlay";
|
||||||
anchor = "top-right";
|
anchor = "top-right";
|
||||||
format = ''<span font_scale='small-caps'>%a</span>\n<b>%s</b>\n%b'';
|
format = ''
|
||||||
|
<span font_scale='small-caps'>%a</span>\n<b>%s</b>\n%b
|
||||||
|
'';
|
||||||
"urgency=high" = {
|
"urgency=high" = {
|
||||||
border-color = "#F268b3";
|
border-color = "#F268b3";
|
||||||
};
|
};
|
||||||
|
|
|
@ -87,12 +87,8 @@ in
|
||||||
"${mod}+Shift+space" = "floating toggle";
|
"${mod}+Shift+space" = "floating toggle";
|
||||||
"${mod}+space" = "focus mode_toggle";
|
"${mod}+space" = "focus mode_toggle";
|
||||||
"${mod}+a" = "focus parent";
|
"${mod}+a" = "focus parent";
|
||||||
"${mod}+Shift+minus" = "move scratchpad";
|
"${mod}+Shift+p" = "move scratchpad";
|
||||||
"${mod}+minus" = "scratchpad show";
|
"${mod}+p" = "scratchpad show";
|
||||||
"${mod}+p" = "exec screencapt --region window";
|
|
||||||
"${mod}+Shift+p" = "exec screencapt --region screen";
|
|
||||||
"${mod}+Alt+p" = "mode screenshot";
|
|
||||||
"${mod}+Alt+r" = "mode screenrecord";
|
|
||||||
# Media stuff
|
# Media stuff
|
||||||
"${mod}+F1" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 1%-";
|
"${mod}+F1" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 1%-";
|
||||||
"${mod}+F2" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +1%";
|
"${mod}+F2" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +1%";
|
||||||
|
@ -122,27 +118,6 @@ in
|
||||||
"r" = "exec ${pkgs.mako}/bin/makoctl restore";
|
"r" = "exec ${pkgs.mako}/bin/makoctl restore";
|
||||||
"Escape" = "mode default";
|
"Escape" = "mode default";
|
||||||
};
|
};
|
||||||
"screenshot" = {
|
|
||||||
"s" = "exec screencapt --region screen; mode default";
|
|
||||||
"Shift+s" = "exec screencapt --region screen -f; mode default";
|
|
||||||
"r" = "exec screencapt --region region; mode default";
|
|
||||||
"Shift+r" = "exec screencapt --region region -f; mode default";
|
|
||||||
"w" = "exec screencapt --region window; mode default";
|
|
||||||
"Shift+w" = "exec screencapt --region window -f; mode default";
|
|
||||||
"Return" = "mode default";
|
|
||||||
"Escape" = "mode default";
|
|
||||||
};
|
|
||||||
"screenrecord" = {
|
|
||||||
"s" = "exec screencapt video --region screen; mode default";
|
|
||||||
"Shift+s" = "exec screencapt --region video screen -a; mde default";
|
|
||||||
"r" = "exec screencapt video --region region; mode default";
|
|
||||||
"Shift+r" = "exec screencapt video --region region -a; mode default";
|
|
||||||
"w" = "exec screencapt video --region window -f ; mode default";
|
|
||||||
"Shift+w" = "exec screencapt --region video window -a; mode default";
|
|
||||||
"Return" = "mode default";
|
|
||||||
"Escape" = "mode default";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
focused = {
|
focused = {
|
||||||
|
@ -239,9 +214,5 @@ in
|
||||||
title_align right
|
title_align right
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
home.file.".local/bin/screencapt" = {
|
|
||||||
executable = true;
|
|
||||||
source = ./files/screencapt.sh;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{lib, config, pkgs, ...}:
|
{lib, config, ...}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.sway;
|
cfg = config.modules.desktop.sway;
|
||||||
|
@ -16,9 +16,7 @@ in
|
||||||
layer = "top";
|
layer = "top";
|
||||||
spacing = 6;
|
spacing = 6;
|
||||||
disable-toolptips = true;
|
disable-toolptips = true;
|
||||||
modules-center = [
|
modules-center = [];
|
||||||
"custom/screenrecord"
|
|
||||||
];
|
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"sway/workspaces"
|
"sway/workspaces"
|
||||||
"sway/mode"
|
"sway/mode"
|
||||||
|
@ -50,12 +48,10 @@ in
|
||||||
]
|
]
|
||||||
) ++
|
) ++
|
||||||
[
|
[
|
||||||
"pulseaudio#input"
|
"pulseaudio"
|
||||||
"pulseaudio#output"
|
|
||||||
"custom/sep"
|
"custom/sep"
|
||||||
"clock"
|
"clock"
|
||||||
"custom/sep"
|
"custom/sep"
|
||||||
"privacy"
|
|
||||||
"tray"
|
"tray"
|
||||||
];
|
];
|
||||||
"clock" = {
|
"clock" = {
|
||||||
|
@ -76,14 +72,6 @@ in
|
||||||
"format" = "|";
|
"format" = "|";
|
||||||
"tooltip" = false;
|
"tooltip" = false;
|
||||||
};
|
};
|
||||||
"custom/screenrecord" = {
|
|
||||||
"format" = " [rec.] ";
|
|
||||||
"interval" = 1;
|
|
||||||
"exec" = "echo '{\"class\": \"recording\"}'";
|
|
||||||
"exec-if" = "${pkgs.procps}/bin/pgrep wl-screenrec";
|
|
||||||
"on-click" = "exec ${pkgs.coreutils}/bin/kill -s SIGINT $(${pkgs.procps}/bin/pgrep wl-screenrec)";
|
|
||||||
"tooltype" = false;
|
|
||||||
};
|
|
||||||
"idle_inhibitor" = {
|
"idle_inhibitor" = {
|
||||||
"format" = "{icon}";
|
"format" = "{icon}";
|
||||||
"format-icons" = {
|
"format-icons" = {
|
||||||
|
@ -92,7 +80,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"memory" = {
|
"memory" = {
|
||||||
"format" = "{used:0.0f}/{total:0.0f}G ";
|
"format" = "{used:0.1f}G/{total:0.1f}G ";
|
||||||
"interval" = 30;
|
"interval" = 30;
|
||||||
"states" = {
|
"states" = {
|
||||||
"critical" = 90;
|
"critical" = 90;
|
||||||
|
@ -100,51 +88,27 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"network" = {
|
"network" = {
|
||||||
"format-alt" = "{ifname}: {essid} {ipaddr}/{cidr} ";
|
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
|
||||||
"format-disconnected" = "Disconnected ⚠ ";
|
"format-disconnected" = "Disconnected ⚠ ";
|
||||||
"format-ethernet" = "{ifname} ";
|
"format-ethernet" = "{ifname}: {ipaddr}/{cidr} ";
|
||||||
"format-linked" = "{ifname} (No IP) ";
|
"format-linked" = "{ifname} (No IP) ";
|
||||||
"format-wifi" = "{signalStrength}% ";
|
"format-wifi" = "{essid} ({signalStrength}%) ";
|
||||||
"tooltip" = false;
|
"tooltip" = false;
|
||||||
};
|
};
|
||||||
"privacy"= {
|
"pulseaudio" = {
|
||||||
"icon-spacing" = 6;
|
"format" = "{format_source} {volume}% {icon} ";
|
||||||
"icon-size" = 11;
|
|
||||||
"transition-duration" = 250;
|
|
||||||
"modules"= [
|
|
||||||
{
|
|
||||||
"type" = "screenshare";
|
|
||||||
"tooltip" = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
"type" = "audio-out";
|
|
||||||
"tooltip" = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
"type" = "audio-in";
|
|
||||||
"tooltip" = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
"ignore-monitor" = true;
|
|
||||||
};
|
|
||||||
"pulseaudio#output" = {
|
|
||||||
"format" = "{volume}% {icon} ";
|
|
||||||
"format-bluetooth" = "{volume}% {icon}";
|
"format-bluetooth" = "{volume}% {icon}";
|
||||||
"format-icons" = {
|
"format-icons" = {
|
||||||
"car" = "";
|
"car" = "";
|
||||||
"default" = "";
|
"default" = "";
|
||||||
"hands-free" = "";
|
"hands-free" = "";
|
||||||
"headphone" = "";
|
"headphone" = "";
|
||||||
"headset" = "";
|
"headset" = "";
|
||||||
"phone" = "";
|
"phone" = "";
|
||||||
"portable" = "";
|
"portable" = "";
|
||||||
};
|
};
|
||||||
"format-muted" = " ";
|
"format-muted" = "{format_source} ";
|
||||||
"tooltip" = false;
|
"format-source" = "{volume}% ";
|
||||||
};
|
|
||||||
"pulseaudio#input" = {
|
|
||||||
"format" = "{format_source} ";
|
|
||||||
"format-source" = "{volume}% ";
|
|
||||||
"format-source-muted" = " ";
|
"format-source-muted" = " ";
|
||||||
"tooltip" = false;
|
"tooltip" = false;
|
||||||
};
|
};
|
||||||
|
@ -156,7 +120,7 @@ in
|
||||||
};
|
};
|
||||||
"temperature" = {
|
"temperature" = {
|
||||||
"critical-threshold" = 80;
|
"critical-threshold" = 80;
|
||||||
"format" = " {temperatureC}°C ";
|
"format" = "{temperatureC}°C ";
|
||||||
"thermal-zone" = mkIf ( cfg.waybar.cpuThermal.thermalZone != "" )
|
"thermal-zone" = mkIf ( cfg.waybar.cpuThermal.thermalZone != "" )
|
||||||
"${cfg.waybar.cpuThermal.thermalZone}";
|
"${cfg.waybar.cpuThermal.thermalZone}";
|
||||||
"hwmon-path-abs" = mkIf ( cfg.waybar.cpuThermal.hwmonPathAbs != "" )
|
"hwmon-path-abs" = mkIf ( cfg.waybar.cpuThermal.hwmonPathAbs != "" )
|
||||||
|
@ -206,7 +170,121 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
style = builtins.readFile ./files/waybar-style.css;
|
style = ''
|
||||||
|
@define-color color-base-bg #323232;
|
||||||
|
@define-color color-base-fg #ddd;
|
||||||
|
|
||||||
|
@define-color color-hover #f268b3;
|
||||||
|
@define-color color-selected #1cd180;
|
||||||
|
|
||||||
|
@define-color color-ok #1cd180;
|
||||||
|
@define-color color-warning #f2b768;
|
||||||
|
@define-color color-critical #f268b3;
|
||||||
|
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: @color-base-bg ;
|
||||||
|
color: @color-base-fg;
|
||||||
|
font-family: "Fira Code Nerd Font";
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
button:disabled,label:disabled{
|
||||||
|
color:inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover{
|
||||||
|
background:none;
|
||||||
|
box-shadow:inherit;
|
||||||
|
box-shadow:inherit;
|
||||||
|
text-shadow:inherit;
|
||||||
|
text-shadow:inherit;
|
||||||
|
border-top:none;
|
||||||
|
}
|
||||||
|
#workspaces {
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
#workspaces button {
|
||||||
|
margin:0 3px;
|
||||||
|
padding:4px 4px;
|
||||||
|
color:#9c9c9c;
|
||||||
|
border-bottom: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
box-shadow:inherit;
|
||||||
|
text-shadow:inherit;
|
||||||
|
color: @color-hover;
|
||||||
|
border-bottom: 1px solid @color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background: @color-selected;
|
||||||
|
color: @color-base-bg;
|
||||||
|
}
|
||||||
|
#workspaces button.visible:not(.focused) {
|
||||||
|
color: @color-selected;
|
||||||
|
border-color: @color-selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#battery,
|
||||||
|
#idle_inhibitor {
|
||||||
|
padding: 2px 4px;
|
||||||
|
margin: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode{
|
||||||
|
background:@color-warning;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
#pulseaudio {}
|
||||||
|
#pulseaudio.muted {
|
||||||
|
color:@color-critical;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.discharging {
|
||||||
|
color: @color-base-fg;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
border-bottom: 1px solid @color-ok;
|
||||||
|
color: @color-selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging),
|
||||||
|
#cpu.critical,
|
||||||
|
#memory.critical{
|
||||||
|
border-color: @color-critical;
|
||||||
|
color: @color-critical;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning:not(.charging),
|
||||||
|
#cpu.warning,
|
||||||
|
#memory.warning{
|
||||||
|
border-color: @color-warning;
|
||||||
|
color: @color-warning;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
font-family: "DejaVu sans";
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue