refactor(home/linux/desktop): home/linux/desktop => home/linux/gui
18
home/linux/gui/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Desktop Related
|
||||
|
||||
3. `base`: all common configurations for all desktops.
|
||||
4. `hyprland`: Hyprland's configuration.
|
||||
5. `i3`: i3's configuration.
|
||||
|
||||
## Why install I3/Hyprland in Home Manager instead of a NixOS Module?
|
||||
|
||||
1. I3 & Hyprland's configuration file is located in `~/.config`, which can be easily managed by Home
|
||||
Manager.
|
||||
2. I have many user-specific systemd services, such gammastep, wallpaper-switcher, etc. Which can be
|
||||
easily managed by Home Manager, but if we add i3/hyprland in a NixOS Module, those user-level
|
||||
services may failed to start automatically. With i3/hyprland in a Home Manager Module, we can
|
||||
control their systemd service's dependent order more easily, so we can avoid issues like this.
|
||||
3. By install packages as less as possible in NixOS Module, we can:
|
||||
1. Make the NixOS system more secure and stable.
|
||||
2. Make this flake more portable to other non-NixOS systems, as home-manager can be installed on
|
||||
any Linux system.
|
||||
61
home/linux/gui/base/creative.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
pkgs-stable,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# creative
|
||||
blender # 3d modeling
|
||||
# gimp # image editing, I prefer using figma in browser instead of this one
|
||||
inkscape # vector graphics
|
||||
krita # digital painting
|
||||
musescore # music notation
|
||||
# reaper # audio production
|
||||
# sonic-pi # music programming
|
||||
|
||||
# this app consumes a lot of storage, so do not install it currently
|
||||
# kicad # 3d printing, eletrical engineering
|
||||
|
||||
# fpga
|
||||
pkgs-unstable.python311Packages.apycula # gowin fpga
|
||||
pkgs-unstable.yosys # fpga synthesis
|
||||
pkgs-unstable.nextpnr # fpga place and route
|
||||
pkgs-unstable.openfpgaloader # fpga programming
|
||||
nur-ryan4yin.packages.${pkgs.system}.gowin-eda-edu-ide # app: `gowin-env` => `gw_ide` / `gw_pack` / ...
|
||||
];
|
||||
|
||||
programs = {
|
||||
# live streaming
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs-stable.obs-studio-plugins; [
|
||||
# screen capture
|
||||
wlrobs
|
||||
# obs-ndi
|
||||
obs-vaapi
|
||||
obs-nvfbc
|
||||
obs-teleport
|
||||
# obs-hyperion
|
||||
droidcam-obs
|
||||
obs-vkcapture
|
||||
obs-gstreamer
|
||||
obs-3d-effect
|
||||
input-overlay
|
||||
obs-multi-rtmp
|
||||
obs-source-clone
|
||||
obs-shaderfilter
|
||||
obs-source-record
|
||||
obs-livesplit-one
|
||||
looking-glass-obs
|
||||
obs-vintage-filter
|
||||
obs-command-source
|
||||
obs-move-transition
|
||||
obs-backgroundremoval
|
||||
advanced-scene-switcher
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
3
home/linux/gui/base/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
5
home/linux/gui/base/dev-tools.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
android-tools
|
||||
];
|
||||
}
|
||||
45
home/linux/gui/base/eye-protection.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Adjust the color temperature(& brightness) of your screen according to
|
||||
# your surroundings. This may help your eyes hurt less if you are
|
||||
# working in front of the screen at night.
|
||||
#
|
||||
# works fine with both x11 & wayland(hyprland)
|
||||
#
|
||||
# https://gitlab.com/chinstrap/gammastep
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
# add a gammastep icon in the system tray
|
||||
# has problem with wayland, so disable it
|
||||
tray = false;
|
||||
temperature = {
|
||||
day = 5700;
|
||||
night = 4000;
|
||||
};
|
||||
# https://gitlab.com/chinstrap/gammastep/-/blob/master/gammastep.conf.sample?ref_type=heads
|
||||
settings = {
|
||||
general = {
|
||||
fade = "1"; # gradually apply the new screen temperature/brightness over a couple of seconds.
|
||||
# it is a fake brightness adjustment obtained by manipulating the gamma ramps,
|
||||
# which means that it does not reduce the backlight of the screen.
|
||||
# Preferably only use it if your normal backlight adjustment is too coarse-grained.
|
||||
brightness-day = "1.0";
|
||||
brightness-night = "0.8";
|
||||
location-provider = "manual";
|
||||
|
||||
# by default, Redshift will use the current elevation of the sun
|
||||
# to determine whether it is daytime, night or in transition (dawn/dusk).
|
||||
# dawn-time = "6:00-8:45";
|
||||
# dusk-time = "18:35-20:15";
|
||||
};
|
||||
manual = {
|
||||
# China, Shenzhen
|
||||
lat = "22.5"; # latitude
|
||||
lon = "114.1"; # longitude
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
home/linux/gui/base/fcitx5/classicui.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
# Vertical Candidate List
|
||||
Vertical Candidate List=False
|
||||
# Use Per Screen DPI
|
||||
PerScreenDPI=True
|
||||
# Use mouse wheel to go to prev or next page
|
||||
WheelForPaging=True
|
||||
# Font
|
||||
Font="Sans 10"
|
||||
# Menu Font
|
||||
MenuFont="Sans 10"
|
||||
# Tray Font
|
||||
TrayFont="Sans Bold 10"
|
||||
# Tray Label Outline Color
|
||||
TrayOutlineColor=#000000
|
||||
# Tray Label Text Color
|
||||
TrayTextColor=#ffffff
|
||||
# Prefer Text Icon
|
||||
PreferTextIcon=False
|
||||
# Show Layout Name In Icon
|
||||
ShowLayoutNameInIcon=True
|
||||
# Use input method language to display text
|
||||
UseInputMethodLangaugeToDisplayText=True
|
||||
# Theme macchiato, frappe, latte, mocha
|
||||
Theme=catppuccin-mocha
|
||||
# Force font DPI on Wayland
|
||||
ForceWaylandDPI=0
|
||||
30
home/linux/gui/base/fcitx5/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
pkgs,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
home.file.".local/share/fcitx5/themes".source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-fcitx5}/src";
|
||||
|
||||
xdg.configFile = {
|
||||
"fcitx5/profile" = {
|
||||
source = ./profile;
|
||||
# every time fcitx5 switch input method, it will modify ~/.config/fcitx5/profile,
|
||||
# so we need to force replace it in every rebuild to avoid file conflict.
|
||||
force = true;
|
||||
};
|
||||
"fcitx5/conf/classicui.conf".source = ./classicui.conf;
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
# for flypy chinese input method
|
||||
fcitx5-rime
|
||||
# needed enable rime using configtool after installed
|
||||
fcitx5-configtool
|
||||
fcitx5-chinese-addons
|
||||
# fcitx5-mozc # japanese input method
|
||||
fcitx5-gtk # gtk im module
|
||||
];
|
||||
};
|
||||
}
|
||||
17
home/linux/gui/base/fcitx5/profile
Normal file
@@ -0,0 +1,17 @@
|
||||
[Groups/0]
|
||||
# Group Name
|
||||
Name=Other
|
||||
# Layout
|
||||
Default Layout=us
|
||||
# Default Input Method
|
||||
DefaultIM=rime
|
||||
|
||||
[Groups/0/Items/0]
|
||||
# Name
|
||||
Name=rime
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[GroupOrder]
|
||||
0=Other
|
||||
|
||||
12
home/linux/gui/base/games.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
pkgs,
|
||||
nix-gaming,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# nix-gaming.packages.${pkgs.system}.osu-lazer-bin
|
||||
gamescope # SteamOS session compositing window manager
|
||||
prismlauncher # A free, open source launcher for Minecraft
|
||||
winetricks # A script to install DLLs needed to work around problems in Wine
|
||||
];
|
||||
}
|
||||
57
home/linux/gui/base/gtk.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# If your themes for mouse cursor, icons or windows don’t load correctly,
|
||||
# try setting them with home.pointerCursor and gtk.theme,
|
||||
# which enable a bunch of compatibility options that should make the themes load in all situations.
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
# set dpi for 4k monitor
|
||||
xresources.properties = {
|
||||
# dpi for Xorg's font
|
||||
"Xft.dpi" = 150;
|
||||
# or set a generic dpi
|
||||
"*.dpi" = 150;
|
||||
};
|
||||
|
||||
# gtk's theme settings, generate files:
|
||||
# 1. ~/.gtkrc-2.0
|
||||
# 2. ~/.config/gtk-3.0/settings.ini
|
||||
# 3. ~/.config/gtk-4.0/settings.ini
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
font = {
|
||||
name = "Noto Sans";
|
||||
package = pkgs.noto-fonts;
|
||||
size = 11;
|
||||
};
|
||||
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
|
||||
theme = {
|
||||
# https://github.com/catppuccin/gtk
|
||||
name = "Catppuccin-Macchiato-Compact-Pink-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-23.05/pkgs/data/themes/catppuccin-gtk/default.nix
|
||||
accents = ["pink"];
|
||||
size = "compact";
|
||||
variant = "macchiato";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
65
home/linux/gui/base/immutable-file.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
##############################################################################################
|
||||
#
|
||||
# Provide a option `home.immutable-file`, it works like `home.file` but make the generated file immutable.
|
||||
#
|
||||
# Copy from https://github.com/iosmanthus/nixos-config/blob/349917b/modules/immutable-file.nix
|
||||
#
|
||||
# this module use the `chattr +i` to make the file immutable, `i` indicates `immutable`,
|
||||
# it's a i-node flags only works on Linux.
|
||||
#
|
||||
# TODO not used yet, need to test it.
|
||||
#
|
||||
##############################################################################################
|
||||
with lib; let
|
||||
cfg = config.home.immutable-file;
|
||||
immutableFileOpts = _: {
|
||||
options = {
|
||||
src = mkOption {
|
||||
type = types.path;
|
||||
};
|
||||
dst = mkOption {
|
||||
type = types.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
mkImmutableFile = pkgs.writeScript "make_immutable_file" ''
|
||||
# $1: dst
|
||||
# $2: src
|
||||
if [ ! -d "$(dirname $1)" ]; then
|
||||
mkdir -p $1
|
||||
fi
|
||||
|
||||
if [ -f $1 ]; then
|
||||
sudo chattr -i $1
|
||||
fi
|
||||
|
||||
sudo cp $2 $1
|
||||
sudo chattr +i $1
|
||||
'';
|
||||
in {
|
||||
options.home.immutable-file = mkOption {
|
||||
type = with types; attrsOf (submodule immutableFileOpts);
|
||||
default = {};
|
||||
};
|
||||
|
||||
config = mkIf (cfg != {}) {
|
||||
home.activation =
|
||||
mapAttrs'
|
||||
(name: {
|
||||
src,
|
||||
dst,
|
||||
}:
|
||||
nameValuePair
|
||||
"make-immutable-${name}"
|
||||
(lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
${mkImmutableFile} ${dst} ${src}
|
||||
''))
|
||||
cfg;
|
||||
};
|
||||
}
|
||||
44
home/linux/gui/base/media.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}:
|
||||
# media - control and enjoy audio/video
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# audio control
|
||||
pavucontrol
|
||||
playerctl
|
||||
pulsemixer
|
||||
imv # simple image viewer
|
||||
|
||||
nvtop
|
||||
|
||||
# video/audio tools
|
||||
cava # for visualizing audio
|
||||
libva-utils
|
||||
vdpauinfo
|
||||
vulkan-tools
|
||||
glxinfo
|
||||
];
|
||||
|
||||
# https://github.com/catppuccin/cava
|
||||
xdg.configFile."cava/config".text =
|
||||
''
|
||||
# custom cava config
|
||||
''
|
||||
+ builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-cava}/mocha.cava";
|
||||
|
||||
programs = {
|
||||
mpv = {
|
||||
enable = true;
|
||||
defaultProfiles = ["gpu-hq"];
|
||||
scripts = [pkgs.mpvScripts.mpris];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
playerctld.enable = true;
|
||||
};
|
||||
}
|
||||
34
home/linux/gui/base/misc.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# GUI apps
|
||||
# e-book viewer(.epub/.mobi/...)
|
||||
# do not support .pdf
|
||||
foliate
|
||||
|
||||
# instant messaging
|
||||
telegram-desktop
|
||||
discord
|
||||
pkgs-unstable.qq # https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/networking/instant-messengers/qq
|
||||
|
||||
# remote desktop(rdp connect)
|
||||
remmina
|
||||
freerdp # required by remmina
|
||||
|
||||
# misc
|
||||
flameshot
|
||||
ventoy # multi-boot usb creator
|
||||
];
|
||||
|
||||
# GitHub CLI tool
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# allow fontconfig to discover fonts and configurations installed through home.packages
|
||||
# Install fonts at system-level, not user-level
|
||||
fonts.fontconfig.enable = false;
|
||||
}
|
||||
7
home/linux/gui/base/note-taking.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# https://joplinapp.org/help/
|
||||
joplin # joplin-cli
|
||||
joplin-desktop
|
||||
];
|
||||
}
|
||||
31
home/linux/gui/base/wallpaper/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
wallpapers,
|
||||
...
|
||||
}: {
|
||||
systemd.user.services.wallpaper = {
|
||||
Unit = {
|
||||
Description = "Wallpaper Switcher daemon";
|
||||
After = ["graphical-session-pre.target" "xdg-desktop-autostart.target"];
|
||||
Wants = ["graphical-session-pre.target"];
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
Service = {
|
||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||
name = "wallpaper";
|
||||
runtimeInputs = with pkgs; [procps feh swaybg python3];
|
||||
text = ''
|
||||
export WALLPAPERS_DIR="${wallpapers}"
|
||||
export WALLPAPERS_STATE_FILEPATH="${config.xdg.stateHome}/wallpaper-switcher/switcher_state"
|
||||
export WALLPAPER_WAIT_MIN=60
|
||||
export WALLPAPER_WAIT_MAX=180
|
||||
exec ${./wallpaper-switcher.py}
|
||||
'';
|
||||
});
|
||||
RestartSec = 3;
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
}
|
||||
169
home/linux/gui/base/wallpaper/wallpaper-switcher.py
Executable file
@@ -0,0 +1,169 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This script will randomly select a wallpaper from the wallpapers directory.
|
||||
It will skip the last wallpaper used, so that you don't get the same wallpaper.
|
||||
|
||||
It will also set the wallpaper using `feh` for X11, or `swaybg` for Wayland.
|
||||
|
||||
Maintainer: ryan4yin [xiaoyin_c@qq.com]
|
||||
"""
|
||||
|
||||
import os
|
||||
import time
|
||||
import random
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class WallpaperSwitcher:
|
||||
def __init__(
|
||||
self,
|
||||
wait_min,
|
||||
wait_max,
|
||||
wallpapers_dir: Path,
|
||||
state_filepath: Path,
|
||||
image_extensions: Union[tuple, list],
|
||||
) -> None:
|
||||
self.wallpapers_dir = wallpapers_dir
|
||||
self.image_extensions = image_extensions
|
||||
self.state_filepath = state_filepath
|
||||
self.wait_min = wait_min
|
||||
self.wait_max = wait_max
|
||||
|
||||
# initialize the state file
|
||||
self.state_filepath.parent.mkdir(parents=True, exist_ok=True)
|
||||
self.current_state = self.state_filepath.open("a+", encoding="utf-8")
|
||||
self.current_wallpaper_list = list()
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Iterate on all wallpapers in the wallpapers directory, cycling through them in a random order.
|
||||
"""
|
||||
self.initialize_state()
|
||||
while True:
|
||||
for i, w in enumerate(self.current_wallpaper_list):
|
||||
if i < self.current_wallpaper_index:
|
||||
continue
|
||||
|
||||
logger.info(
|
||||
f"Setting wallpaper {i+1}/{len(self.current_wallpaper_list)}: {w}"
|
||||
)
|
||||
self.set_wallpaper(w)
|
||||
|
||||
# update the state
|
||||
self.current_wallpaper_index = i
|
||||
self.save_state()
|
||||
|
||||
wait_time = random.randint(self.wait_min, self.wait_max)
|
||||
logger.info(f"Waiting {wait_time} seconds...")
|
||||
time.sleep(wait_time)
|
||||
|
||||
# reset the state
|
||||
self.reset_state()
|
||||
|
||||
def save_state(self):
|
||||
wallpaper_list = [w.as_posix() for w in self.current_wallpaper_list]
|
||||
state = {
|
||||
"current_wallpaper_list": wallpaper_list,
|
||||
"current_wallpaper_index": self.current_wallpaper_index,
|
||||
}
|
||||
self.current_state.truncate(0)
|
||||
self.current_state.write(json.dumps(state, indent=4))
|
||||
self.current_state.flush()
|
||||
|
||||
def initialize_state(self):
|
||||
self.current_state.seek(0)
|
||||
data = self.current_state.read()
|
||||
if not data:
|
||||
logger.info("No state found, resetting...")
|
||||
self.reset_state()
|
||||
else:
|
||||
logger.info("State found, reloading...")
|
||||
state = json.loads(data)
|
||||
wallpapers = [Path(w) for w in state["current_wallpaper_list"]]
|
||||
self.current_wallpaper_list = wallpapers
|
||||
self.current_wallpaper_index = state["current_wallpaper_index"]
|
||||
|
||||
def reset_state(self):
|
||||
logger.info(f"Rescanning & shuffle wallpapers in {self.wallpapers_dir} ...")
|
||||
wallpapers = list(
|
||||
filter(
|
||||
lambda x: x.suffix in self.image_extensions,
|
||||
self.wallpapers_dir.iterdir(),
|
||||
)
|
||||
)
|
||||
random.shuffle(wallpapers)
|
||||
self.current_wallpaper_list = wallpapers
|
||||
self.current_wallpaper_index = 0
|
||||
|
||||
def set_wallpaper(self, path: Path):
|
||||
# check if we are running under x11 or wayland
|
||||
if (
|
||||
"WAYLAND_DISPLAY" in os.environ
|
||||
or os.environ.get("XDG_SESSION_TYPE") == "wayland"
|
||||
):
|
||||
self.set_wallpaper_wayland(path)
|
||||
else:
|
||||
self.set_wallpaper_x11(path)
|
||||
|
||||
def set_wallpaper_x11(self, path: Path):
|
||||
subprocess.run(["feh", "--bg-fill", path])
|
||||
|
||||
def set_wallpaper_wayland(self, path: Path):
|
||||
# find all swaybg processes
|
||||
swaybg_pids = subprocess.run(
|
||||
["pgrep", "-f", "swaybg"], stdout=subprocess.PIPE
|
||||
).stdout.decode("utf-8")
|
||||
|
||||
# run swaybg in the background, and make it running even after the parent process exits
|
||||
subprocess.Popen(
|
||||
["swaybg", "--output", "*", "--mode", "fill", "--image", path],
|
||||
start_new_session=True,
|
||||
)
|
||||
time.sleep(1)
|
||||
|
||||
# kill all old swaybg processes
|
||||
for pid in swaybg_pids.splitlines():
|
||||
try:
|
||||
os.kill(int(pid), 9)
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
wallpapers_dir = os.getenv("WALLPAPERS_DIR")
|
||||
state_filepath = os.getenv("WALLPAPERS_STATE_FILEPATH")
|
||||
if not wallpapers_dir:
|
||||
raise Exception("WALLPAPERS_DIR not set")
|
||||
if not state_filepath:
|
||||
raise Exception("WALLPAPERS_STATE_FILEPATH not set")
|
||||
|
||||
image_postfix = (
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".png",
|
||||
# ".gif",
|
||||
# ".webp"
|
||||
)
|
||||
wait_min = int(os.getenv("WALLPAPER_WAIT_MIN", 60))
|
||||
wait_max = int(os.getenv("WALLPAPER_WAIT_MAX", 300))
|
||||
wallpaper_switcher = WallpaperSwitcher(
|
||||
wait_min,
|
||||
wait_max,
|
||||
Path(wallpapers_dir).expanduser(),
|
||||
Path(state_filepath).expanduser(),
|
||||
image_postfix,
|
||||
)
|
||||
wallpaper_switcher.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
92
home/linux/gui/base/xdg.nix
Normal file
@@ -0,0 +1,92 @@
|
||||
# XDG stands for "Cross-Desktop Group", with X used to mean "cross".
|
||||
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
|
||||
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
|
||||
# https://www.freedesktop.org/wiki/Specifications/
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
|
||||
xdg-user-dirs
|
||||
];
|
||||
|
||||
xdg.configFile."mimeapps.list".force = true;
|
||||
xdg = {
|
||||
enable = true;
|
||||
|
||||
cacheHome = "${config.home.homeDirectory}/.cache";
|
||||
configHome = "${config.home.homeDirectory}/.config";
|
||||
dataHome = "${config.home.homeDirectory}/.local/share";
|
||||
stateHome = "${config.home.homeDirectory}/.local/state";
|
||||
|
||||
# manage $XDG_CONFIG_HOME/mimeapps.list
|
||||
# xdg search all desktop entries from $XDG_DATA_DIRS, check it by command:
|
||||
# echo $XDG_DATA_DIRS
|
||||
# the system-level desktop entries can be list by command:
|
||||
# ls -l /run/current-system/sw/share/applications/
|
||||
# the user-level desktop entries can be list by command(user ryan):
|
||||
# ls /etc/profiles/per-user/ryan/share/applications/
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
# let `xdg-open` to open the url with the correct application.
|
||||
defaultApplications = let
|
||||
browser = ["firefox.desktop"];
|
||||
editor = ["nvim.desktop" "Helix.desktop" "code.desktop" "code-insiders.desktop"];
|
||||
in {
|
||||
"application/json" = browser;
|
||||
"application/pdf" = browser; # TODO: pdf viewer
|
||||
|
||||
"text/html" = browser;
|
||||
"text/xml" = browser;
|
||||
"text/plain" = editor;
|
||||
"application/xml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"application/xhtml_xml" = browser;
|
||||
"application/rdf+xml" = browser;
|
||||
"application/rss+xml" = browser;
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/x-wine-extension-ini" = editor;
|
||||
|
||||
# define default applications for some url schemes.
|
||||
"x-scheme-handler/about" = browser; # open `about:` url with `browser`
|
||||
"x-scheme-handler/ftp" = browser; # open `ftp:` url with `browser`
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
# https://github.com/microsoft/vscode/issues/146408
|
||||
"x-scheme-handler/vscode" = ["code-url-handler.desktop"]; # open `vscode://` url with `code-url-handler.desktop`
|
||||
"x-scheme-handler/vscode-insiders" = ["code-insiders-url-handler.desktop"]; # open `vscode-insiders://` url with `code-insiders-url-handler.desktop`
|
||||
# all other unknown schemes will be opened by this default application.
|
||||
# "x-scheme-handler/unknown" = editor;
|
||||
|
||||
"x-scheme-handler/discord" = ["discord.desktop"];
|
||||
"x-scheme-handler/tg" = ["org.telegram.desktop.desktop "];
|
||||
|
||||
"audio/*" = ["mpv.desktop"];
|
||||
"video/*" = ["mpv.dekstop"];
|
||||
"image/*" = ["imv-dir.desktop"];
|
||||
"image/gif" = ["imv-dir.desktop"];
|
||||
"image/jpeg" = ["imv-dir.desktop"];
|
||||
"image/png" = ["imv-dir.desktop"];
|
||||
"image/webp" = ["imv-dir.desktop"];
|
||||
};
|
||||
|
||||
associations.removed = {
|
||||
# ......
|
||||
};
|
||||
};
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
3
home/linux/gui/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
198
home/linux/gui/hyprland/conf/hyprland.conf
Normal file
@@ -0,0 +1,198 @@
|
||||
#-- Input ----------------------------------------------------
|
||||
# Configure mouse and touchpad here.
|
||||
input {
|
||||
kb_layout=us
|
||||
kb_variant=
|
||||
kb_model=
|
||||
kb_options=
|
||||
kb_rules=
|
||||
|
||||
# mouse focus will not switch to the hovered window unless the mouse crosses a window boundary
|
||||
follow_mouse=1
|
||||
mouse_refocus=false
|
||||
|
||||
natural_scroll=0
|
||||
touchpad {
|
||||
natural_scroll = 1
|
||||
}
|
||||
force_no_accel=0
|
||||
# repeat_rate=
|
||||
# repeat_delay=
|
||||
numlock_by_default=1
|
||||
}
|
||||
|
||||
#-- General ----------------------------------------------------
|
||||
# General settings like MOD key, Gaps, Colors, etc.
|
||||
general {
|
||||
sensitivity=2.0
|
||||
apply_sens_to_raw=0
|
||||
|
||||
gaps_in=5
|
||||
gaps_out=10
|
||||
|
||||
border_size=4
|
||||
col.active_border=0xFFB4A1DB
|
||||
col.inactive_border=0xFF343A40
|
||||
}
|
||||
|
||||
#-- Decoration ----------------------------------------------------
|
||||
# Decoration settings like Rounded Corners, Opacity, Blur, etc.
|
||||
decoration {
|
||||
rounding=8 # Original: rounding=-1
|
||||
|
||||
active_opacity=1.0
|
||||
inactive_opacity=0.9
|
||||
fullscreen_opacity=1.0
|
||||
|
||||
blur {
|
||||
enabled=true
|
||||
size=3 # minimum 1
|
||||
passes=1 # minimum 1, more passes = more resource intensive.
|
||||
ignore_opacity=false
|
||||
}
|
||||
|
||||
# Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts.
|
||||
# if you want heavy blur, you need to up the blur_passes.
|
||||
# the more passes, the more you can up the blur_size without noticing artifacts.
|
||||
}
|
||||
|
||||
#-- Animations ----------------------------------------------------
|
||||
animations {
|
||||
enabled=1
|
||||
# animation=NAME,ONOFF,SPEED,CURVE,STYLE
|
||||
animation=windows,1,8,default,popin 80%
|
||||
animation=fadeOut,1,8,default
|
||||
animation=fadeIn,1,8,default
|
||||
animation=workspaces,1,8,default
|
||||
#animation=workspaces,1,6,overshot
|
||||
}
|
||||
|
||||
#-- Dwindle ----------------------------------------------------
|
||||
dwindle {
|
||||
pseudotile=0 # enable pseudotiling on dwindle
|
||||
}
|
||||
|
||||
#-- Window Rules ----------------------------------------------------
|
||||
windowrule=float,foot-float
|
||||
windowrule=float,yad|nm-connection-editor|pavucontrolk
|
||||
windowrule=float,xfce-polkit|kvantummanager|qt5ct
|
||||
windowrule=float,feh|imv|Gpicview|Gimp|nomacs
|
||||
windowrule=float,VirtualBox Manager|qemu|Qemu-system-x86_64
|
||||
windowrule=float,xfce4-appfinder
|
||||
|
||||
windowrule=float,foot-full
|
||||
windowrule=move 0 0,foot-full
|
||||
windowrule=size 100% 100%,foot-full
|
||||
|
||||
windowrule=float,wlogout
|
||||
windowrule=move 0 0,wlogout
|
||||
windowrule=size 100% 100%,wlogout
|
||||
windowrule=animation slide,wlogout
|
||||
|
||||
#-- Keybindings ----------------------------------------------------
|
||||
$term = kitty
|
||||
$app_launcher = ~/.config/hypr/scripts/menu
|
||||
$volume = ~/.config/hypr/scripts/volume
|
||||
$backlight = ~/.config/hypr/scripts/brightness
|
||||
$lockscreen = ~/.config/hypr/scripts/lockscreen
|
||||
$wlogout = ~/.config/hypr/scripts/wlogout
|
||||
$colorpicker = ~/.config/hypr/scripts/colorpicker
|
||||
$files = thunar
|
||||
$browser = firefox
|
||||
|
||||
# -- Terminal --
|
||||
bind=SUPER,Return,exec,$term
|
||||
|
||||
# -- App Launcher --
|
||||
bind=SUPER,D,exec,$app_launcher
|
||||
|
||||
# -- Hyprland --
|
||||
bind=SUPER,Q,killactive,
|
||||
bind=CTRLALT,Delete,exit,
|
||||
bind=SUPER,F,fullscreen,
|
||||
bind=SUPER,Space,togglefloating,
|
||||
bind=SUPER,S,pseudo,
|
||||
|
||||
# -- Misc --
|
||||
bind=SUPER,N,exec,nm-connection-editor # need install network-manager-applet
|
||||
bind=SUPER,P,exec,$colorpicker
|
||||
bind=CTRLALT,L,exec,$lockscreen
|
||||
bind=SUPERSHIFT,X,exec,$wlogout
|
||||
|
||||
# -- Some nice mouse binds --
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
|
||||
# -- Function keys --
|
||||
bind=,XF86MonBrightnessUp,exec,$backlight --inc
|
||||
bind=,XF86MonBrightnessDown,exec,$backlight --dec
|
||||
bind=,XF86AudioRaiseVolume,exec,$volume --inc
|
||||
bind=,XF86AudioLowerVolume,exec,$volume --dec
|
||||
bind=,XF86AudioMute,exec,$volume --toggle
|
||||
bind=,XF86AudioMicMute,exec,$volume --toggle-mic
|
||||
bind=,XF86AudioNext,exec,mpc next
|
||||
bind=,XF86AudioPrev,exec,mpc prev
|
||||
bind=,XF86AudioPlay,exec,mpc toggle
|
||||
bind=,XF86AudioStop,exec,mpc stop
|
||||
|
||||
# -- Screenshots --
|
||||
bind=,Print,exec,hyprshot -m output -o ~/Pictures/Screenshots -- imv
|
||||
bind=SUPER,Print,exec,hyprshot -m window -o ~/Pictures/Screenshots -- imv
|
||||
# flameshot do not recognize hyprland as a wayland compositor, so we set it to sway here
|
||||
bind=CTRL,Print,exec,XDG_CURRENT_DESKTOP=sway flameshot gui --raw -p ~/Pictures/Screenshots | wl-copy
|
||||
# bind=CTRL,Print,exec,hyprshot -m region -o ~/Pictures/Screenshots -- imv
|
||||
|
||||
# Focus
|
||||
bind=SUPER,left,movefocus,l
|
||||
bind=SUPER,right,movefocus,r
|
||||
bind=SUPER,up,movefocus,u
|
||||
bind=SUPER,down,movefocus,d
|
||||
|
||||
# Move
|
||||
bind=SUPERSHIFT,left,movewindow,l
|
||||
bind=SUPERSHIFT,right,movewindow,r
|
||||
bind=SUPERSHIFT,up,movewindow,u
|
||||
bind=SUPERSHIFT,down,movewindow,d
|
||||
|
||||
# Resize
|
||||
bind=SUPERCTRL,left,resizeactive,-20 0
|
||||
bind=SUPERCTRL,right,resizeactive,20 0
|
||||
bind=SUPERCTRL,up,resizeactive,0 -20
|
||||
bind=SUPERCTRL,down,resizeactive,0 20
|
||||
|
||||
# Workspaces
|
||||
bind=SUPER,1,workspace,1
|
||||
bind=SUPER,2,workspace,2
|
||||
bind=SUPER,3,workspace,3
|
||||
bind=SUPER,4,workspace,4
|
||||
bind=SUPER,5,workspace,5
|
||||
bind=SUPER,6,workspace,6
|
||||
bind=SUPER,7,workspace,7
|
||||
bind=SUPER,8,workspace,8
|
||||
bind=SUPER,9,workspace,9
|
||||
bind=SUPER,0,workspace,10
|
||||
|
||||
# Send to Workspaces
|
||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
||||
bind=SUPERSHIFT,7,movetoworkspace,7
|
||||
bind=SUPERSHIFT,8,movetoworkspace,8
|
||||
bind=SUPERSHIFT,9,movetoworkspace,9
|
||||
bind=SUPERSHIFT,0,movetoworkspace,10
|
||||
|
||||
bind=SUPER,mouse_down,workspace,e+1
|
||||
bind=SUPER,mouse_up,workspace,e-1
|
||||
|
||||
#-- Startup ----------------------------------------------------
|
||||
exec-once=~/.config/hypr/scripts/startup
|
||||
|
||||
# -- Fcitx5 input method
|
||||
windowrule=pseudo,fcitx # enable this will make fcitx5 works, but fcitx5-configtool will not work!
|
||||
exec-once=cp ~/.config/fcitx5/profile-bak ~/.config/fcitx5/profile # restore fcitx5 profile managed by nixos
|
||||
exec-once=fcitx5 -d --replace # start fcitx5 daemon
|
||||
bind=ALT,E,exec,pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r
|
||||
|
||||
56
home/linux/gui/hyprland/conf/mako/config
Normal file
@@ -0,0 +1,56 @@
|
||||
## Mako configuration file
|
||||
|
||||
# GLOBAL CONFIGURATION OPTIONS
|
||||
max-history=100
|
||||
sort=-time
|
||||
|
||||
# BINDING OPTIONS
|
||||
on-button-left=dismiss
|
||||
on-button-middle=none
|
||||
on-button-right=dismiss-all
|
||||
on-touch=dismiss
|
||||
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
|
||||
|
||||
# STYLE OPTIONS
|
||||
font=JetBrains Mono 10
|
||||
width=300
|
||||
height=100
|
||||
margin=10
|
||||
padding=15
|
||||
border-size=2
|
||||
border-radius=0
|
||||
icons=1
|
||||
max-icon-size=48
|
||||
icon-location=left
|
||||
markup=1
|
||||
actions=1
|
||||
history=1
|
||||
text-alignment=left
|
||||
default-timeout=5000
|
||||
ignore-timeout=0
|
||||
max-visible=5
|
||||
layer=overlay
|
||||
anchor=top-right
|
||||
|
||||
background-color=#1e1e2e
|
||||
text-color=#d9e0ee
|
||||
border-color=#313244
|
||||
progress-color=over #89b4fa
|
||||
|
||||
[urgency=low]
|
||||
border-color=#313244
|
||||
default-timeout=2000
|
||||
|
||||
[urgency=normal]
|
||||
border-color=#313244
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#f38ba8
|
||||
text-color=#f38ba8
|
||||
default-timeout=0
|
||||
|
||||
[category=mpd]
|
||||
border-color=#f9e2af
|
||||
default-timeout=2000
|
||||
group-by=category
|
||||
BIN
home/linux/gui/hyprland/conf/mako/icons/brightness-100.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/brightness-20.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/brightness-40.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/brightness-60.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/brightness-80.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/dropper.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/microphone-mute.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/microphone.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/music.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/palette.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/picture.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/timer.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/volume-high.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/volume-low.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/volume-mid.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
home/linux/gui/hyprland/conf/mako/icons/volume-mute.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
17
home/linux/gui/hyprland/conf/mpd/mpd.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
# Recommended location for database
|
||||
db_file "~/.config/mpd/database"
|
||||
|
||||
# If running mpd using systemd, delete this line to log directly to systemd.
|
||||
log_file "syslog"
|
||||
|
||||
# The music directory is by default the XDG directory, uncomment to amend and choose a different directory
|
||||
#music_directory "~/Music"
|
||||
|
||||
# Uncomment to refresh the database whenever files in the music_directory are changed
|
||||
#auto_update "yes"
|
||||
|
||||
# Uncomment to enable the functionalities
|
||||
#playlist_directory "~/.config/mpd/playlists"
|
||||
#pid_file "~/.config/mpd/pid"
|
||||
#state_file "~/.local/state/mpd/state"
|
||||
#sticker_file "~/.config/mpd/sticker.sql"
|
||||
54
home/linux/gui/hyprland/conf/scripts/brightness
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Script To Manage Brightness (in Wayland).
|
||||
|
||||
iDIR="$HOME/.config/hypr/mako/icons"
|
||||
|
||||
# Get brightness
|
||||
get_backlight() {
|
||||
LIGHT=$(printf "%.0f\n" $(light -G))
|
||||
echo "${LIGHT}%"
|
||||
}
|
||||
|
||||
# Get icons
|
||||
get_icon() {
|
||||
backlight="$(get_backlight)"
|
||||
current="${backlight%%%}"
|
||||
if [[ ("$current" -ge "0") && ("$current" -le "20") ]]; then
|
||||
icon="$iDIR/brightness-20.png"
|
||||
elif [[ ("$current" -ge "20") && ("$current" -le "40") ]]; then
|
||||
icon="$iDIR/brightness-40.png"
|
||||
elif [[ ("$current" -ge "40") && ("$current" -le "60") ]]; then
|
||||
icon="$iDIR/brightness-60.png"
|
||||
elif [[ ("$current" -ge "60") && ("$current" -le "80") ]]; then
|
||||
icon="$iDIR/brightness-80.png"
|
||||
elif [[ ("$current" -ge "80") && ("$current" -le "100") ]]; then
|
||||
icon="$iDIR/brightness-100.png"
|
||||
fi
|
||||
}
|
||||
|
||||
# Notify
|
||||
notify_user() {
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$icon" "Brightness : $(get_backlight)"
|
||||
}
|
||||
|
||||
# Increase brightness
|
||||
inc_backlight() {
|
||||
light -A 5 && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Decrease brightness
|
||||
dec_backlight() {
|
||||
light -U 5 && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Execute accordingly
|
||||
if [[ "$1" == "--get" ]]; then
|
||||
get_backlight
|
||||
elif [[ "$1" == "--inc" ]]; then
|
||||
inc_backlight
|
||||
elif [[ "$1" == "--dec" ]]; then
|
||||
dec_backlight
|
||||
else
|
||||
get_backlight
|
||||
fi
|
||||
20
home/linux/gui/hyprland/conf/scripts/colorpicker
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Simple Script To Pick Color Quickly.
|
||||
|
||||
color=$(grim -g "$(slurp -b 1B1F2800 -p)" -t ppm - | convert - -format '%[pixel:p{0,0}]' txt:- | tail -n1 | cut -d' ' -f4)
|
||||
image=/tmp/${color}.png
|
||||
|
||||
main() {
|
||||
if [[ "$color" ]]; then
|
||||
# copy color code to clipboard
|
||||
echo $color | tr -d "\n" | wl-copy
|
||||
# generate preview
|
||||
convert -size 48x48 xc:"$color" ${image}
|
||||
# notify about it
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i ${image} "$color, copied to clipboard."
|
||||
fi
|
||||
}
|
||||
|
||||
# Run the script
|
||||
main
|
||||
10
home/linux/gui/hyprland/conf/scripts/lockscreen
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Times the screen off and puts it to background
|
||||
swayidle \
|
||||
timeout 300 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' &
|
||||
# Locks the screen immediately
|
||||
swaylock
|
||||
# Kills last background task so idle timer doesn't keep running
|
||||
kill %%
|
||||
7
home/linux/gui/hyprland/conf/scripts/menu
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ! $(pidof anyrun) ]]; then
|
||||
anyrun
|
||||
else
|
||||
pkill anyrun
|
||||
fi
|
||||
9
home/linux/gui/hyprland/conf/scripts/notifications
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## launch mako with alt config
|
||||
|
||||
CONFIG="$HOME/.config/hypr/mako/config"
|
||||
|
||||
if [[ ! $(pidof mako) ]]; then
|
||||
mako --config ${CONFIG}
|
||||
fi
|
||||
24
home/linux/gui/hyprland/conf/scripts/startup
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Autostart Programs
|
||||
|
||||
# Kill already running process
|
||||
_ps=(waybar mako mpd)
|
||||
for _prs in "${_ps[@]}"; do
|
||||
if [[ $(pidof ${_prs}) ]]; then
|
||||
killall -9 ${_prs}
|
||||
fi
|
||||
done
|
||||
|
||||
# Set wallpaper via a wallpaper.service
|
||||
# it will by start by home-manager automatically, do not need to restart it here.
|
||||
# systemctl --user restart wallpaper.service
|
||||
|
||||
# Lauch notification daemon (mako)
|
||||
~/.config/hypr/scripts/notifications &
|
||||
|
||||
# Lauch statusbar (waybar)
|
||||
~/.config/hypr/scripts/statusbar &
|
||||
|
||||
# Start mpd
|
||||
exec mpd &
|
||||
10
home/linux/gui/hyprland/conf/scripts/statusbar
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## launch waybar with alt config
|
||||
|
||||
CONFIG="$HOME/.config/hypr/waybar/config.jsonc"
|
||||
STYLE="$HOME/.config/hypr/waybar/style.css"
|
||||
|
||||
if [[ ! $(pidof waybar) ]]; then
|
||||
waybar --bar main-bar --log-level error --config ${CONFIG} --style ${STYLE}
|
||||
fi
|
||||
76
home/linux/gui/hyprland/conf/scripts/volume
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Script To Manage Speaker Volume(in Wayland).
|
||||
|
||||
iDIR="$HOME/.config/hypr/mako/icons"
|
||||
|
||||
# Get Volume
|
||||
get_volume() {
|
||||
volume=$(amixer get Master | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]')
|
||||
echo "$volume"
|
||||
}
|
||||
|
||||
# Get icons
|
||||
get_icon() {
|
||||
vol="$(get_volume)"
|
||||
current="${vol%%%}"
|
||||
if [[ "$current" -eq "0" ]]; then
|
||||
icon="$iDIR/volume-mute.png"
|
||||
elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
|
||||
icon="$iDIR/volume-low.png"
|
||||
elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
|
||||
icon="$iDIR/volume-mid.png"
|
||||
elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
|
||||
icon="$iDIR/volume-high.png"
|
||||
fi
|
||||
}
|
||||
|
||||
# Notify
|
||||
notify_user() {
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$icon" "Volume : $(get_volume)"
|
||||
}
|
||||
|
||||
# Increase Volume
|
||||
inc_volume() {
|
||||
amixer -Mq set Master,0 5%+ unmute && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Decrease Volume
|
||||
dec_volume() {
|
||||
amixer -Mq set Master,0 5%- unmute && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Toggle Mute
|
||||
toggle_mute() {
|
||||
amixer get Master | grep '\[on\]' &>/dev/null
|
||||
if [[ "$?" == 0 ]]; then
|
||||
amixer set Master toggle && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/volume-mute.png" "Mute"
|
||||
else
|
||||
amixer set Master toggle && get_icon && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$icon" "Unmute"
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggle Mic
|
||||
toggle_mic() {
|
||||
amixer get Capture | grep '\[on\]' &>/dev/null
|
||||
if [[ "$?" == 0 ]]; then
|
||||
amixer -D pulse sset Capture toggle && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
|
||||
else
|
||||
amixer -D pulse sset Capture toggle && get_icon && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
|
||||
fi
|
||||
}
|
||||
|
||||
# Execute accordingly
|
||||
if [[ "$1" == "--get" ]]; then
|
||||
get_volume
|
||||
elif [[ "$1" == "--inc" ]]; then
|
||||
inc_volume
|
||||
elif [[ "$1" == "--dec" ]]; then
|
||||
dec_volume
|
||||
elif [[ "$1" == "--toggle" ]]; then
|
||||
toggle_mute
|
||||
elif [[ "$1" == "--toggle-mic" ]]; then
|
||||
toggle_mic
|
||||
else
|
||||
get_volume
|
||||
fi
|
||||
18
home/linux/gui/hyprland/conf/scripts/wlogout
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## wlogout with alt layout and style file
|
||||
|
||||
LAYOUT="$HOME/.config/hypr/wlogout/layout"
|
||||
STYLE="$HOME/.config/hypr/wlogout/style.css"
|
||||
|
||||
if [[ ! $(pidof wlogout) ]]; then
|
||||
wlogout --layout ${LAYOUT} --css ${STYLE} \
|
||||
--column-spacing 20 \
|
||||
--row-spacing 20 \
|
||||
--margin-top 200 \
|
||||
--margin-bottom 200 \
|
||||
--margin-left 150 \
|
||||
--margin-right 150
|
||||
else
|
||||
pkill wlogout
|
||||
fi
|
||||
180
home/linux/gui/hyprland/conf/waybar/config.jsonc
Normal file
@@ -0,0 +1,180 @@
|
||||
{
|
||||
"position": "top",
|
||||
"layer": "top",
|
||||
|
||||
"modules-left": ["custom/launcher", "temperature", "backlight", "hyprland/workspaces"],
|
||||
"modules-center": ["custom/playerctl"],
|
||||
"modules-right": [
|
||||
"mpd",
|
||||
"pulseaudio",
|
||||
"battery",
|
||||
"memory",
|
||||
"cpu",
|
||||
"network",
|
||||
"clock",
|
||||
"idle_inhibitor",
|
||||
"custom/powermenu",
|
||||
"tray",
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": "",
|
||||
"6": "",
|
||||
"7": "",
|
||||
"8": "",
|
||||
"9": "",
|
||||
"10": "〇",
|
||||
"focused": "",
|
||||
"default": "",
|
||||
},
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"interval": 60,
|
||||
"align": 0,
|
||||
"rotate": 0,
|
||||
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": " {:%H:%M}",
|
||||
"format-alt": " {:%a %b %d, %G}",
|
||||
},
|
||||
"cpu": {
|
||||
"format": "\udb80\udf5b {usage}%",
|
||||
"interval": 1,
|
||||
"on-click-middle": "kitty btop",
|
||||
"on-click-right": "kitty btop",
|
||||
},
|
||||
"custom/launcher": {
|
||||
"format": "\uf313 ",
|
||||
"on-click": "$HOME/.config/hypr/scripts/menu",
|
||||
"on-click-middle": "exec default_wall",
|
||||
"on-click-right": "exec wallpaper_random",
|
||||
"tooltip": false,
|
||||
},
|
||||
"custom/powermenu": {
|
||||
"format": "\uf011",
|
||||
"on-click": "$HOME/.config/hypr/scripts/wlogout",
|
||||
"tooltip": false,
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "\uf06e",
|
||||
"deactivated": "\uf070",
|
||||
},
|
||||
"tooltip": false,
|
||||
},
|
||||
"memory": {
|
||||
"format": "\udb83\udee0 {percentage}%",
|
||||
"interval": 1,
|
||||
"states": {
|
||||
"warning": 85,
|
||||
},
|
||||
},
|
||||
"mpd": {
|
||||
"interval": 2,
|
||||
"unknown-tag": "N/A",
|
||||
"format": "{stateIcon} {artist} - {title}",
|
||||
"format-disconnected": " Disconnected",
|
||||
"format-paused": "{stateIcon} {artist} - {title}",
|
||||
"format-stopped": "Stopped ",
|
||||
"state-icons": {
|
||||
"paused": "",
|
||||
"playing": "",
|
||||
},
|
||||
"tooltip-format": "MPD (connected)",
|
||||
"tooltip-format-disconnected": "MPD (disconnected)",
|
||||
// Commands to execute on events
|
||||
"on-click": "mpc toggle",
|
||||
"on-click-middle": "mpc prev",
|
||||
"on-click-right": "mpc next",
|
||||
"on-update": "",
|
||||
"on-scroll-up": "mpc seek +00:00:01",
|
||||
"on-scroll-down": "mpc seek -00:00:01",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"custom/playerctl": {
|
||||
"format": "{icon} <span>{}</span>",
|
||||
"return-type": "json",
|
||||
"max-length": 55,
|
||||
"exec": "playerctl -a metadata --format '{\"text\": \" {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
|
||||
"on-click-middle": "playerctl previous",
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-click-right": "playerctl next",
|
||||
"format-icons": {
|
||||
"Paused": "<span foreground='#6dd9d9'></span>",
|
||||
"Playing": "<span foreground='#82db97'></span>",
|
||||
},
|
||||
},
|
||||
"network": {
|
||||
"interval": 5,
|
||||
//"interface": "wlan*", // (Optional) To force the use of this interface, set it for netspeed to work
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ipaddr}/{cidr}",
|
||||
"format-linked": " {ifname} (No IP)",
|
||||
"format-disconnected": "睊 Disconnected",
|
||||
"format-disabled": "睊 Disabled",
|
||||
"format-alt": " {bandwidthUpBytes} | {bandwidthDownBytes}",
|
||||
"tooltip-format": " {ifname} via {gwaddr}",
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
"on-click-right": "kitty nmtui",
|
||||
},
|
||||
"pulseaudio": {
|
||||
//"format": "{volume}% {icon} {format_source}",
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " Mute",
|
||||
"format-bluetooth": " {volume}% {format_source}",
|
||||
"format-bluetooth-muted": " Mute",
|
||||
"format-source": " {volume}%",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""],
|
||||
},
|
||||
"scroll-step": 5.0,
|
||||
// Commands to execute on events
|
||||
"on-click": "amixer set Master toggle",
|
||||
"on-click-right": "pavucontrol",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"temperature": {
|
||||
"format": "\uf2c9 {temperatureC}\u00b0C",
|
||||
"tooltip": false,
|
||||
},
|
||||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5,
|
||||
},
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
"adapter": "ADP0",
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15,
|
||||
},
|
||||
"max-length": 20,
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-warning": "{icon} {capacity}%",
|
||||
"format-critical": "{icon} {capacity}%",
|
||||
"format-charging": "<span font-family='Font Awesome 6 Free'></span> {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
"format-full": " {capacity}%",
|
||||
"format-icons": [" ", " ", " ", " ", " "],
|
||||
},
|
||||
}
|
||||
38
home/linux/gui/hyprland/conf/waybar/mocha.css
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* https://github.com/catppuccin/waybar/blob/main/themes/mocha.css
|
||||
*
|
||||
* Catppuccin Mocha palette
|
||||
* Maintainer: rubyowo
|
||||
*
|
||||
*/
|
||||
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
162
home/linux/gui/hyprland/conf/waybar/style.css
Normal file
@@ -0,0 +1,162 @@
|
||||
@import "mocha.css";
|
||||
|
||||
* {
|
||||
/* https://docs.gtk.org/gtk3/css-overview.html#colors */
|
||||
color: @text;
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: rgb(242, 143, 173);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
}
|
||||
.warning,
|
||||
.critical,
|
||||
.urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
border: 2px solid alpha(@crust, 0.3);
|
||||
}
|
||||
window > box {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
background-color: shade(@base, 0.9);
|
||||
padding: 3px;
|
||||
padding-left: 8px;
|
||||
border: 2px none #33ccff;
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 0px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: rgb(181, 232, 224);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: rgb(248, 189, 150);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
tooltip {
|
||||
background: rgb(48, 45, 65);
|
||||
}
|
||||
tooltip label {
|
||||
color: rgb(217, 224, 238);
|
||||
}
|
||||
#custom-launcher {
|
||||
font-size: 20px;
|
||||
padding-left: 8px;
|
||||
padding-right: 6px;
|
||||
color: #7ebae4;
|
||||
}
|
||||
#mode,
|
||||
#clock,
|
||||
#memory,
|
||||
#temperature,
|
||||
#cpu,
|
||||
#mpd,
|
||||
#custom-wall,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
/* #mode { */
|
||||
/* margin-left: 10px; */
|
||||
/* background-color: rgb(248, 189, 150); */
|
||||
/* color: rgb(26, 24, 38); */
|
||||
/* } */
|
||||
#memory {
|
||||
color: rgb(181, 232, 224);
|
||||
}
|
||||
#cpu {
|
||||
color: rgb(245, 194, 231);
|
||||
}
|
||||
#clock {
|
||||
color: rgb(217, 224, 238);
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
color: rgb(221, 182, 242);
|
||||
padding-right: 8px;
|
||||
}
|
||||
#battery {
|
||||
min-width: 55px;
|
||||
color: rgb(126, 186, 244);
|
||||
}
|
||||
#battery.charging,
|
||||
#battery.full,
|
||||
#battery.plugged {
|
||||
color: #26a65b;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: #f53c3c;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
#custom-wall {
|
||||
color: #33ccff;
|
||||
}
|
||||
#temperature {
|
||||
color: rgb(150, 205, 251);
|
||||
}
|
||||
#backlight {
|
||||
color: rgb(248, 189, 150);
|
||||
}
|
||||
#pulseaudio {
|
||||
color: rgb(245, 224, 220);
|
||||
}
|
||||
#network {
|
||||
color: #abe9b3;
|
||||
}
|
||||
#network.disconnected {
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
#custom-powermenu {
|
||||
color: rgb(242, 143, 173);
|
||||
padding-right: 8px;
|
||||
}
|
||||
#tray {
|
||||
padding-right: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#mpd.paused {
|
||||
color: #414868;
|
||||
font-style: italic;
|
||||
}
|
||||
#mpd.stopped {
|
||||
background: transparent;
|
||||
}
|
||||
#mpd {
|
||||
color: #c0caf5;
|
||||
}
|
||||
BIN
home/linux/gui/hyprland/conf/wlogout/icons/hibernate.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
home/linux/gui/hyprland/conf/wlogout/icons/lock.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
home/linux/gui/hyprland/conf/wlogout/icons/logout.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
home/linux/gui/hyprland/conf/wlogout/icons/reboot.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
home/linux/gui/hyprland/conf/wlogout/icons/shutdown.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
home/linux/gui/hyprland/conf/wlogout/icons/suspend.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
36
home/linux/gui/hyprland/conf/wlogout/layout
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"label" : "lock",
|
||||
"action" : "~/.config/hypr/scripts/lockscreen",
|
||||
"text" : "Lock",
|
||||
"keybind" : "l"
|
||||
}
|
||||
{
|
||||
"label" : "hibernate",
|
||||
"action" : "systemctl hibernate",
|
||||
"text" : "Hibernate",
|
||||
"keybind" : "h"
|
||||
}
|
||||
{
|
||||
"label" : "logout",
|
||||
"action" : "loginctl terminate-user $USER",
|
||||
"text" : "Logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
{
|
||||
"label" : "shutdown",
|
||||
"action" : "systemctl poweroff",
|
||||
"text" : "Shutdown",
|
||||
"keybind" : "s"
|
||||
}
|
||||
{
|
||||
"label" : "suspend",
|
||||
"action" : "systemctl suspend",
|
||||
"text" : "Suspend",
|
||||
"keybind" : "u"
|
||||
}
|
||||
{
|
||||
"label" : "reboot",
|
||||
"action" : "systemctl reboot",
|
||||
"text" : "Reboot",
|
||||
"keybind" : "r"
|
||||
}
|
||||
57
home/linux/gui/hyprland/conf/wlogout/style.css
Normal file
@@ -0,0 +1,57 @@
|
||||
/** ********** Fonts ********** **/
|
||||
* {
|
||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** ********** Main Window ********** **/
|
||||
window {
|
||||
background-color: #1e1e2e;
|
||||
}
|
||||
|
||||
/** ********** Buttons ********** **/
|
||||
button {
|
||||
background-color: #242434;
|
||||
color: #ffffff;
|
||||
border: 2px solid #282838;
|
||||
border-radius: 20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 35%;
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active,
|
||||
button:hover {
|
||||
background-color: #89b4fa;
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
/** ********** Icons ********** **/
|
||||
#lock {
|
||||
background-image: image(url("icons/lock.png"), url("/usr/share/wlogout/icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("icons/logout.png"), url("/usr/share/wlogout/icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("icons/suspend.png"), url("/usr/share/wlogout/icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(
|
||||
url("icons/hibernate.png"),
|
||||
url("/usr/share/wlogout/icons/hibernate.png")
|
||||
);
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("icons/shutdown.png"), url("/usr/share/wlogout/icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||
}
|
||||
47
home/linux/gui/hyprland/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
anyrun,
|
||||
...
|
||||
} @ args:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
in {
|
||||
imports = [
|
||||
anyrun.homeManagerModules.default
|
||||
./options
|
||||
];
|
||||
|
||||
options.modules.desktop.hyprland = {
|
||||
enable = mkEnableOption "hyprland compositor";
|
||||
settings = lib.mkOption {
|
||||
type = with lib.types; let
|
||||
valueType =
|
||||
nullOr (oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
path
|
||||
(attrsOf valueType)
|
||||
(listOf valueType)
|
||||
])
|
||||
// {
|
||||
description = "Hyprland configuration value";
|
||||
};
|
||||
in
|
||||
valueType;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
mkMerge ([
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = cfg.settings;
|
||||
}
|
||||
]
|
||||
++ (import ./values args))
|
||||
);
|
||||
}
|
||||
3
home/linux/gui/hyprland/options/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
24
home/linux/gui/hyprland/options/nvidia.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
in {
|
||||
options.modules.desktop.hyprland = {
|
||||
nvidia = mkEnableOption "whether nvidia GPU is used";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.nvidia) {
|
||||
wayland.windowManager.hyprland.settings.env = [
|
||||
# for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
# fix https://github.com/hyprwm/Hyprland/issues/1520
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
];
|
||||
};
|
||||
}
|
||||
84
home/linux/gui/hyprland/values/anyrun.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
pkgs,
|
||||
anyrun,
|
||||
...
|
||||
}: {
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
plugins = with anyrun.packages.${pkgs.system}; [
|
||||
applications
|
||||
randr
|
||||
rink
|
||||
shell
|
||||
symbols
|
||||
translate
|
||||
];
|
||||
|
||||
width.fraction = 0.3;
|
||||
y.absolute = 15;
|
||||
hidePluginInfo = true;
|
||||
closeOnClick = true;
|
||||
};
|
||||
|
||||
# custom css for anyrun, based on catppuccin-mocha
|
||||
extraCss = ''
|
||||
@define-color bg-col rgba(30, 30, 46, 0.7);
|
||||
@define-color bg-col-light rgba(150, 220, 235, 0.7);
|
||||
@define-color border-col rgba(30, 30, 46, 0.7);
|
||||
@define-color selected-col rgba(150, 205, 251, 0.7);
|
||||
@define-color fg-col #D9E0EE;
|
||||
@define-color fg-col2 #F28FAD;
|
||||
|
||||
* {
|
||||
transition: 200ms ease;
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
#window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#plugin,
|
||||
#main {
|
||||
border: 3px solid @border-col;
|
||||
color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
/* anyrun's input window - Text */
|
||||
#entry {
|
||||
color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
/* anyrun's ouput matches entries - Base */
|
||||
#match {
|
||||
color: @fg-col;
|
||||
background: @bg-col;
|
||||
}
|
||||
|
||||
/* anyrun's selected entry - Red */
|
||||
#match:selected {
|
||||
color: @fg-col2;
|
||||
background: @selected-col;
|
||||
}
|
||||
|
||||
#match {
|
||||
padding: 3px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
#entry, #plugin:hover {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
box#main {
|
||||
background: rgba(30, 30, 46, 0.7);
|
||||
border: 1px solid @border-col;
|
||||
border-radius: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
4
home/linux/gui/hyprland/values/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{mylib, ...} @ args:
|
||||
map
|
||||
(path: import path args)
|
||||
(mylib.scanPaths ./.)
|
||||
66
home/linux/gui/hyprland/values/hyprland.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hyprland,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
# NOTE:
|
||||
# We have to enable hyprland/i3's systemd user service in home-manager,
|
||||
# so that gammastep/wallpaper-switcher's user service can be start correctly!
|
||||
# they are all depending on hyprland/i3's user graphical-session
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
source = "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-hyprland}/themes/mocha.conf";
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1" # for any ozone-based browser & electron apps to run on wayland
|
||||
"MOZ_ENABLE_WAYLAND,1" # for firefox to run on wayland
|
||||
"MOZ_WEBRENDER,1"
|
||||
# misc
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland"
|
||||
];
|
||||
};
|
||||
package = hyprland.packages.${pkgs.system}.hyprland;
|
||||
extraConfig = builtins.readFile ../conf/hyprland.conf;
|
||||
# gammastep/wallpaper-switcher need this to be enabled.
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
source = "${pkgs.hyprland}/bin/Hyprland";
|
||||
executable = true;
|
||||
};
|
||||
|
||||
# hyprland configs, based on https://github.com/notwidow/hyprland
|
||||
xdg.configFile = {
|
||||
"hypr/mako" = {
|
||||
source = ../conf/mako;
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/scripts" = {
|
||||
source = ../conf/scripts;
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/waybar" = {
|
||||
source = ../conf/waybar;
|
||||
recursive = true;
|
||||
};
|
||||
"hypr/wlogout" = {
|
||||
source = ../conf/wlogout;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
# music player - mpd
|
||||
"mpd" = {
|
||||
source = ../conf/mpd;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
31
home/linux/gui/hyprland/values/packages.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
waybar # the status bar
|
||||
swaybg # the wallpaper
|
||||
swayidle # the idle timeout
|
||||
swaylock # locking the screen
|
||||
wlogout # logout menu
|
||||
wl-clipboard # copying and pasting
|
||||
hyprpicker # color picker
|
||||
|
||||
pkgs-unstable.hyprshot # screen shot
|
||||
grim # taking screenshots
|
||||
slurp # selecting a region to screenshot
|
||||
wf-recorder # screen recording
|
||||
|
||||
mako # the notification daemon, the same as dunst
|
||||
|
||||
yad # a fork of zenity, for creating dialogs
|
||||
|
||||
# audio
|
||||
alsa-utils # provides amixer/alsamixer/...
|
||||
mpd # for playing system sounds
|
||||
mpc-cli # command-line mpd client
|
||||
ncmpcpp # a mpd client with a UI
|
||||
networkmanagerapplet # provide GUI app: nm-connection-editor
|
||||
];
|
||||
}
|
||||
96
home/linux/gui/hyprland/values/wayland-apps.nix
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
pkgs,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
# refer to https://codeberg.org/dnkl/foot/src/branch/master/foot.ini
|
||||
xdg.configFile."foot/foot.ini".text =
|
||||
''
|
||||
[main]
|
||||
dpi-aware=yes
|
||||
font=JetBrainsMono Nerd Font:size=13
|
||||
shell=${pkgs.bash}/bin/bash --login -c 'nu --login --interactive'
|
||||
term=foot
|
||||
initial-window-size-pixels=3840x2160
|
||||
initial-window-mode=windowed
|
||||
pad=0x0 # optionally append 'center'
|
||||
resize-delay-ms=10
|
||||
|
||||
[mouse]
|
||||
hide-when-typing=yes
|
||||
''
|
||||
+ (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf");
|
||||
|
||||
programs = {
|
||||
# a wayland only terminal emulator
|
||||
foot = {
|
||||
enable = true;
|
||||
# foot can also be run in a server mode. In this mode, one process hosts multiple windows.
|
||||
# All Wayland communication, VT parsing and rendering is done in the server process.
|
||||
# New windows are opened by running footclient, which remains running until the terminal window is closed.
|
||||
#
|
||||
# Advantages to run foot in server mode including reduced memory footprint and startup time.
|
||||
# The downside is a performance penalty. If one window is very busy with, for example, producing output,
|
||||
# then other windows will suffer. Also, should the server process crash, all windows will be gone.
|
||||
server.enable = true;
|
||||
};
|
||||
|
||||
# source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
|
||||
google-chrome = {
|
||||
enable = true;
|
||||
|
||||
# https://wiki.archlinux.org/title/Chromium#Native_Wayland_support
|
||||
commandLineArgs = [
|
||||
"--ozone-platform-hint=auto"
|
||||
"--ozone-platform=wayland"
|
||||
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
|
||||
# (only supported by chromium/chrome at this time, not electron)
|
||||
"--gtk-version=4"
|
||||
# make it use text-input-v1, which works for kwin 5.27 and weston
|
||||
"--enable-wayland-ime"
|
||||
|
||||
# enable hardware acceleration - vulkan api
|
||||
# "--enable-features=Vulkan"
|
||||
];
|
||||
};
|
||||
|
||||
firefox = {
|
||||
enable = true;
|
||||
enableGnomeExtensions = false;
|
||||
package = pkgs.firefox-wayland; # firefox with wayland support
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
# let vscode sync and update its configuration & extensions across devices, using github account.
|
||||
userSettings = {};
|
||||
package =
|
||||
(pkgs.vscode.override
|
||||
{
|
||||
isInsiders = true;
|
||||
# https://wiki.archlinux.org/title/Wayland#Electron
|
||||
commandLineArgs = [
|
||||
"--ozone-platform-hint=auto"
|
||||
"--ozone-platform=wayland"
|
||||
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
|
||||
# (only supported by chromium/chrome at this time, not electron)
|
||||
"--gtk-version=4"
|
||||
# make it use text-input-v1, which works for kwin 5.27 and weston
|
||||
"--enable-wayland-ime"
|
||||
|
||||
# TODO: fix https://github.com/microsoft/vscode/issues/187436
|
||||
# still not works...
|
||||
"--password-store=gnome" # use gnome-keyring as password store
|
||||
];
|
||||
})
|
||||
.overrideAttrs (oldAttrs: rec {
|
||||
# Use VSCode Insiders to fix crash: https://github.com/NixOS/nixpkgs/issues/246509
|
||||
src = builtins.fetchTarball {
|
||||
url = "https://update.code.visualstudio.com/latest/linux-x64/insider";
|
||||
sha256 = "0k2sh7rb6mrx9d6bkk2744ry4g17d13xpnhcisk4akl4x7dn6a83";
|
||||
};
|
||||
version = "latest";
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
2
home/linux/gui/i3/bin/bright
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
xrandr --output DP-2 --brightness $@
|
||||
1
home/linux/gui/i3/bin/logout
Executable file
@@ -0,0 +1 @@
|
||||
i3-msg exit
|
||||
9
home/linux/gui/i3/conf/dual-monitor-4k-1080p.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
xrandr \
|
||||
--output HDMI-0 --mode 1920x1080 --pos 3840x0 --rotate normal \
|
||||
--output DP-0 --off \
|
||||
--output DP-1 --off \
|
||||
--output DP-2 --primary --mode 3840x2160 --pos 0x0 --rotate normal \
|
||||
--output DP-3 --off \
|
||||
--output DP-4 --off \
|
||||
--output DP-5 --off
|
||||
333
home/linux/gui/i3/conf/i3-config
Normal file
@@ -0,0 +1,333 @@
|
||||
# This file is a modified version based on default i3-config-wizard config
|
||||
# Maintainer: ryan4yin [xiaoyin_c@qq.com]
|
||||
|
||||
#######################
|
||||
# config starts here: #
|
||||
#######################
|
||||
|
||||
# Font for window titles.
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
font pango: Noto Sans Regular 10
|
||||
|
||||
# set the mod key to the winkey:
|
||||
set $mod Mod4
|
||||
|
||||
workspace_layout default
|
||||
|
||||
|
||||
##############################
|
||||
# extra options for windows: #
|
||||
##############################
|
||||
|
||||
#border indicator on windows:
|
||||
new_window pixel 1
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 6
|
||||
gaps outer 3
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# switch/iterate between workspaces
|
||||
bindsym $mod+Tab workspace next
|
||||
bindsym $mod+Shift+Tab workspace prev
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace $ws4
|
||||
bindsym $mod+5 workspace $ws5
|
||||
bindsym $mod+6 workspace $ws6
|
||||
bindsym $mod+7 workspace $ws7
|
||||
bindsym $mod+8 workspace $ws8
|
||||
bindsym $mod+9 workspace $ws9
|
||||
bindsym $mod+0 workspace $ws0
|
||||
|
||||
# switch to workspace with numpad keys
|
||||
bindcode $mod+87 workspace 1
|
||||
bindcode $mod+88 workspace 2
|
||||
bindcode $mod+89 workspace 3
|
||||
bindcode $mod+83 workspace 4
|
||||
bindcode $mod+84 workspace 5
|
||||
bindcode $mod+85 workspace 6
|
||||
bindcode $mod+79 workspace 7
|
||||
bindcode $mod+80 workspace 8
|
||||
bindcode $mod+81 workspace 9
|
||||
bindcode $mod+90 workspace 0
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws0
|
||||
|
||||
# resize window (you can also use the mouse for that):
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
|
||||
######################################
|
||||
# keybindings for different actions: #
|
||||
######################################
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec kitty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# Lock the system
|
||||
# lock with a picture:
|
||||
#bindsym $mod+l exec i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
|
||||
# lock by blurring the screen:
|
||||
bindsym $mod+l exec ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to update i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# Backlight control
|
||||
bindsym XF86MonBrightnessUp exec xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
bindsym XF86MonBrightnessDown exec xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+b focus up
|
||||
bindsym $mod+o focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+b move up
|
||||
bindsym $mod+Shift+o move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+g layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# open new empty workspace
|
||||
bindsym $mod+Shift+n exec ~/.config/i3/scripts/empty_workspace
|
||||
|
||||
# Multimedia Keys
|
||||
|
||||
# volume
|
||||
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 polybar
|
||||
bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 polybar
|
||||
|
||||
# gradular volume control
|
||||
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 polybar
|
||||
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 polybar
|
||||
|
||||
# mute
|
||||
bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 polybar
|
||||
|
||||
# audio control
|
||||
bindsym XF86AudioPlay exec playerctl play
|
||||
bindsym XF86AudioPause exec playerctl pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# Redirect sound to headphones
|
||||
bindsym $mod+p exec /usr/local/bin/switch-audio-port
|
||||
|
||||
## App shortcuts
|
||||
bindsym $mod+w exec /usr/bin/firefox
|
||||
bindsym $mod+n exec /usr/bin/thunar
|
||||
bindsym Print exec scrot ~/%Y-%m-%d-%T-screenshot.png && notify-send "Screenshot saved to ~/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
||||
|
||||
##########################################
|
||||
# configuration for workspace behaviour: #
|
||||
##########################################
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 "1: "
|
||||
set $ws2 "2: "
|
||||
# visual studio code
|
||||
set $ws3 "3: "
|
||||
set $ws4 "4: "
|
||||
set $ws5 "5: "
|
||||
set $ws6 "6: "
|
||||
set $ws7 "7: "
|
||||
set $ws8 "8:"
|
||||
set $ws9 "9:"
|
||||
set $ws0 "10: "
|
||||
|
||||
# use workspaces on different displays:
|
||||
# where you have to replace VGA-0/HDMI-0 with the names for your displays
|
||||
# you can get from xrandr command
|
||||
workspace $ws1 output DP-2
|
||||
workspace $ws6 output HDMI-0
|
||||
|
||||
# bind program to workspace and focus to them on startup:
|
||||
# assign [class="kitty"] $ws1
|
||||
assign [class="(?i)firefox"] $ws2
|
||||
assign [class="Thunar"] $ws8
|
||||
assign [class="thunderbird"] $ws9
|
||||
assign [class="TelegramDesktop"] $ws5
|
||||
|
||||
# automatic set focus new window if it opens on another workspace than the current:
|
||||
for_window [class=(?i)firefox] focus
|
||||
for_window [class=Thunar] focus
|
||||
for_window [class=Thunderbird] focus
|
||||
for_window [class=TelegramDesktop] focus
|
||||
|
||||
|
||||
##############
|
||||
# compositor #
|
||||
##############
|
||||
|
||||
# transparency
|
||||
# options could need changes, related to used GPU and drivers.
|
||||
# to find the right setting consult the archwiki or ask at the forum.
|
||||
#
|
||||
# picom: https://wiki.archlinux.org/title/Picom
|
||||
# manpage: https://man.archlinux.org/man/picom.1.en
|
||||
# The default configuration is available in /etc/xdg/picom.conf
|
||||
# For modifications, it can be copied to ~/.config/picom/picom.conf or ~/.config/picom.conf
|
||||
# install picom package (yay -S picom)
|
||||
# start using default config
|
||||
exec_always --no-startup-id picom -b
|
||||
#
|
||||
# for custom config:
|
||||
#exec_always --no-startup-id picom --config ~/.config/picom.conf
|
||||
|
||||
#############################################
|
||||
# autostart applications/services on login: #
|
||||
#############################################
|
||||
|
||||
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# start a script to setup displays
|
||||
# use arandr to setup displays and save the file as monitor
|
||||
exec --no-startup-id ~/.screenlayout/monitor.sh
|
||||
|
||||
# set wallpaper
|
||||
exec --no-startup-id sleep 1 && systemctl --user restart wallpaper.service
|
||||
|
||||
# set powersavings for display:
|
||||
exec --no-startup-id xset s 480 dpms 600 600 600
|
||||
|
||||
# Desktop notifications
|
||||
#exec --no-startup-id /usr/bin/dunst --config ~/.config/dunst/dunstrc
|
||||
exec --no-startup-id /usr/bin/dunst
|
||||
|
||||
# screenshot tool
|
||||
exec --no-startup-id flameshot
|
||||
|
||||
# autotiling script
|
||||
# https://github.com/nwg-piotr/autotiling
|
||||
exec_always --no-startup-id autotiling
|
||||
|
||||
exec --no-startup-id i3-msg "workspace $ws2; exec firefox"
|
||||
|
||||
##################
|
||||
# floating rules #
|
||||
##################
|
||||
|
||||
# set floating (nontiling) for apps needing it
|
||||
for_window [class="Galculator" instance="galculator"] floating enable
|
||||
|
||||
# set floating (nontiling) for special apps
|
||||
for_window [class="Xsane" instance="xsane"] floating enable
|
||||
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
|
||||
for_window [class="qt5ct" instance="qt5ct"] floating enable
|
||||
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
||||
for_window [window_role="About"] floating enable
|
||||
|
||||
# set border of floating window
|
||||
for_window [class="urxvt"] border pixel 1
|
||||
|
||||
# set size of floating window
|
||||
#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
|
||||
#for_window [class=".*"] resize set 640 480 #to change size of all floating windows
|
||||
|
||||
# set position of floating window
|
||||
#for_window [class=".*"] move position center
|
||||
|
||||
######################################
|
||||
# color settings for windows #
|
||||
######################################
|
||||
|
||||
# https://github.com/catppuccin/i3/blob/main/themes/catppuccin-mocha
|
||||
set $rosewater #f5e0dc
|
||||
set $flamingo #f2cdcd
|
||||
set $pink #f5c2e7
|
||||
set $mauve #cba6f7
|
||||
set $red #f38ba8
|
||||
set $maroon #eba0ac
|
||||
set $peach #fab387
|
||||
set $green #a6e3a1
|
||||
set $teal #94e2d5
|
||||
set $sky #89dceb
|
||||
set $sapphire #74c7ec
|
||||
set $blue #89b4fa
|
||||
set $lavender #b4befe
|
||||
set $text #cdd6f4
|
||||
set $subtext1 #bac2de
|
||||
set $subtext0 #a6adc8
|
||||
set $overlay2 #9399b2
|
||||
set $overlay1 #7f849c
|
||||
set $overlay0 #6c7086
|
||||
set $surface2 #585b70
|
||||
set $surface1 #45475a
|
||||
set $surface0 #313244
|
||||
set $base #1e1e2e
|
||||
# use colors in the RGBA format, the last two digits are transparency
|
||||
set $mantle #181825
|
||||
set $crust #11111b
|
||||
|
||||
# target title bg text indicator border
|
||||
client.focused $red $base $text $rosewater $red
|
||||
client.focused_inactive $mauve $base $text $rosewater $mauve
|
||||
client.unfocused $lavender $base $text $rosewater $lavender
|
||||
client.urgent $pink $base $lavender $overlay0 $pink
|
||||
client.placeholder $overlay0 $base $text $overlay0 $overlay0
|
||||
client.background $base
|
||||
|
||||
# Start Polybar
|
||||
exec_always --no-startup-id $HOME/.config/polybar/launch.sh --shapes
|
||||
|
||||
600
home/linux/gui/i3/conf/polybar/blocks/bars.ini
Normal file
@@ -0,0 +1,600 @@
|
||||
;; ┌────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar]
|
||||
fill = ⏽
|
||||
empty = ⏽
|
||||
indicator = ⏽
|
||||
; Nerd font : , ⏽, 樂 籠 錄 , 雷 絛
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
|
||||
; Soundcard to be used
|
||||
; Usually in the format hw:# where # is the card number
|
||||
; You can find the different card numbers in `/proc/asound/cards`
|
||||
master-soundcard = default
|
||||
speaker-soundcard = default
|
||||
headphone-soundcard = default
|
||||
|
||||
; Name of the master, speaker and headphone mixers
|
||||
; Use the following command to list available mixer controls:
|
||||
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
|
||||
; If master, speaker or headphone-soundcard isn't the default,
|
||||
; use `amixer -c # scontrols` instead where # is the number
|
||||
; of the master, speaker or headphone soundcard respectively
|
||||
;
|
||||
; Default: Master
|
||||
master-mixer = Master
|
||||
|
||||
; Optionally define speaker and headphone mixers
|
||||
; Default: none
|
||||
;;speaker-mixer = Speaker
|
||||
; Default: none
|
||||
;;headphone-mixer = Headphone
|
||||
|
||||
; NOTE: This is required if headphone_mixer is defined
|
||||
; Use the following command to list available device controls
|
||||
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
|
||||
; You may also need to use `amixer -c # controls` as above for the mixer names
|
||||
; Default: none
|
||||
;;headphone-id = 9
|
||||
|
||||
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
|
||||
; Default: false
|
||||
;;mapped = true
|
||||
|
||||
; Interval for volume increase/decrease (in percent points)
|
||||
; Default: 5
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <bar-volume>
|
||||
format-volume-prefix =
|
||||
format-volume-prefix-padding = 1
|
||||
format-volume-prefix-background = ${color.blue}
|
||||
format-volume-prefix-foreground = ${color.foreground}
|
||||
format-volume-background = ${color.background-alt}
|
||||
format-volume-foreground = ${color.foreground}
|
||||
format-volume-overline = ${color.background}
|
||||
format-volume-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-muted> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix =
|
||||
format-muted-prefix-padding = 1
|
||||
format-muted-prefix-background = ${color.red}
|
||||
format-muted-overline = ${color.background}
|
||||
format-muted-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-volume = %percentage%%
|
||||
label-volume-background = ${color.background-alt}
|
||||
label-volume-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default
|
||||
label-muted = "Muted"
|
||||
label-muted-foreground = ${color.foreground}
|
||||
label-muted-background = ${color.background-alt}
|
||||
label-muted-padding = 1
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-background = ${color.blue}
|
||||
ramp-volume-padding = 1
|
||||
|
||||
; Only applies if <bar-volume> is used
|
||||
bar-volume-format = " %fill%%indicator%%empty% "
|
||||
bar-volume-width = 10
|
||||
bar-volume-gradient = false
|
||||
|
||||
bar-volume-indicator = ${bar.indicator}
|
||||
bar-volume-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-volume-fill = ${bar.fill}
|
||||
bar-volume-foreground-0 = ${color.foreground}
|
||||
bar-volume-foreground-1 = ${color.foreground}
|
||||
bar-volume-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-volume-empty = ${bar.empty}
|
||||
bar-volume-empty-foreground = ${color.gray}
|
||||
|
||||
; If defined, it will replace <ramp-volume> when
|
||||
; headphones are plugged in to `headphone_control_numid`
|
||||
; If undefined, <ramp-volume> will be used for both
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-headphones-0 =
|
||||
ramp-headphones-background = ${color.blue}
|
||||
ramp-headphones-padding = 1
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/brightness]
|
||||
;type = internal/xbacklight
|
||||
type = internal/backlight
|
||||
|
||||
; Use the following command to list available cards:
|
||||
; $ ls -1 /sys/class/backlight/
|
||||
;card = intel_backlight
|
||||
card = amdgpu_bl0
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <ramp>
|
||||
; <bar>
|
||||
format = <bar>
|
||||
format-prefix =
|
||||
format-prefix-padding = 1
|
||||
format-prefix-background = ${color.lime}
|
||||
format-prefix-foreground = ${color.foreground}
|
||||
format-background = ${color.background-alt}
|
||||
format-foreground = ${color.foreground}
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label = %percentage%%
|
||||
|
||||
; Only applies if <ramp> is used
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
|
||||
; Only applies if <bar> is used
|
||||
bar-format = " %fill%%indicator%%empty% "
|
||||
bar-width = 10
|
||||
bar-gradient = false
|
||||
|
||||
bar-indicator = ${bar.indicator}
|
||||
bar-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-fill = ${bar.fill}
|
||||
bar-foreground-0 = ${color.foreground}
|
||||
bar-foreground-1 = ${color.foreground}
|
||||
bar-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-empty = ${bar.empty}
|
||||
bar-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/battery_bar]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 99
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT1
|
||||
adapter = ACAD
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 2
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <bar-capacity>
|
||||
format-charging-prefix = ""
|
||||
format-charging-prefix-padding = 1
|
||||
format-charging-prefix-background = ${color.green}
|
||||
format-charging-prefix-foreground = ${color.foreground}
|
||||
format-charging-background = ${color.background-alt}
|
||||
format-charging-foreground = ${color.foreground}
|
||||
format-charging-overline = ${color.background}
|
||||
format-charging-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <bar-capacity>
|
||||
format-discharging-prefix = ""
|
||||
format-discharging-prefix-padding = 1
|
||||
format-discharging-prefix-background = ${color.pink}
|
||||
format-discharging-prefix-foreground = ${color.foreground}
|
||||
format-discharging-background = ${color.background-alt}
|
||||
format-discharging-foreground = ${color.foreground}
|
||||
format-discharging-overline = ${color.background}
|
||||
format-discharging-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <label-full>
|
||||
format-full-prefix = ""
|
||||
format-full-prefix-padding = 1
|
||||
format-full-prefix-background = ${color.red}
|
||||
format-full-prefix-foreground = ${color.foreground}
|
||||
format-full-background = ${color.background-alt}
|
||||
format-full-foreground = ${color.foreground}
|
||||
format-full-overline = ${color.background}
|
||||
format-full-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
|
||||
label-charging = %percentage%%
|
||||
label-charging-background = ${color.background-alt}
|
||||
label-charging-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%%
|
||||
label-discharging-background = ${color.background-alt}
|
||||
label-discharging-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-full = Full
|
||||
label-full-background = ${color.background-alt}
|
||||
label-full-padding = 1
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
bar-capacity-format = " %fill%%indicator%%empty% "
|
||||
bar-capacity-width = 10
|
||||
bar-capacity-gradient = false
|
||||
|
||||
bar-capacity-indicator = ${bar.indicator}
|
||||
bar-capacity-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-capacity-fill = ${bar.fill}
|
||||
bar-capacity-foreground-0 = ${color.foreground}
|
||||
bar-capacity-foreground-1 = ${color.foreground}
|
||||
bar-capacity-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-capacity-empty = ${bar.empty}
|
||||
bar-capacity-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/cpu_bar]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 0.5
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
;;format = <label> <ramp-coreload>
|
||||
format = <bar-load><label>
|
||||
format-prefix =
|
||||
format-prefix-padding = 1
|
||||
format-prefix-background = ${color.teal}
|
||||
format-prefix-foreground = ${color.foreground}
|
||||
format-background = ${color.background-alt}
|
||||
format-foreground = ${color.foreground}
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load averaged over all cores
|
||||
; %percentage-sum% - Cumulative load on all cores
|
||||
; %percentage-cores% - load percentage for each core
|
||||
; %percentage-core[1-9]% - load percentage for specific core
|
||||
label = "%percentage%% "
|
||||
|
||||
; Only applies if <bar-load> is used
|
||||
bar-load-format = " %fill%%indicator%%empty% "
|
||||
bar-load-width = 10
|
||||
bar-load-gradient = false
|
||||
|
||||
bar-load-indicator = ${bar.indicator}
|
||||
bar-load-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-load-fill = ${bar.fill}
|
||||
bar-load-foreground-0 = ${color.foreground}
|
||||
bar-load-foreground-1 = ${color.foreground}
|
||||
bar-load-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-load-empty = ${bar.empty}
|
||||
bar-load-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/filesystem_bar]
|
||||
type = internal/fs
|
||||
|
||||
; Mountpoints to display
|
||||
mount-0 = /
|
||||
;;mount-1 = /home
|
||||
;;mount-2 = /var
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = 30
|
||||
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = false
|
||||
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
;;spacing = 4
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = <bar-used><label-mounted>
|
||||
format-mounted-prefix =
|
||||
format-mounted-prefix-padding = 1
|
||||
format-mounted-prefix-background = ${color.purple}
|
||||
format-mounted-prefix-foreground = ${color.foreground}
|
||||
format-mounted-background = ${color.background-alt}
|
||||
format-mounted-foreground = ${color.foreground}
|
||||
format-mounted-overline = ${color.background}
|
||||
format-mounted-underline = ${color.background}
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = <label-unmounted>
|
||||
format-unmounted-prefix =
|
||||
format-unmounted-prefix-padding = 1
|
||||
format-unmounted-prefix-background = ${color.red}
|
||||
format-unmounted-prefix-foreground = ${color.foreground}
|
||||
format-unmounted-background = ${color.background-alt}
|
||||
format-unmounted-foreground = ${color.foreground}
|
||||
format-unmounted-overline = ${color.background}
|
||||
format-unmounted-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = "%used%/%total% "
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; Default: %mountpoint% is not mounted
|
||||
label-unmounted = " %mountpoint%: not mounted "
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-format = " %fill%%indicator%%empty% "
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 2
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
format = <bar-used><label>
|
||||
format-prefix =
|
||||
format-prefix-padding = 1
|
||||
format-prefix-background = ${color.indigo}
|
||||
format-prefix-foreground = ${color.foreground}
|
||||
format-background = ${color.background-alt}
|
||||
format-foreground = ${color.foreground}
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = "%mb_used% "
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-format = " %fill%%indicator%%empty% "
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/mpd_bar]
|
||||
type = internal/mpd
|
||||
|
||||
; Host where mpd is running (either ip or domain name)
|
||||
; Can also be the full path to a unix socket where mpd is running.
|
||||
;;host = 127.0.0.1
|
||||
;;port = 6600
|
||||
;;password = mysecretpassword
|
||||
|
||||
; Seconds to sleep between progressbar/song timer sync
|
||||
; Default: 1
|
||||
interval = 1
|
||||
|
||||
; Available tags:
|
||||
; <label-song> (default)
|
||||
; <label-time>
|
||||
; <bar-progress>
|
||||
; <toggle> - gets replaced with <icon-(pause|play)>
|
||||
; <toggle-stop> - gets replaced with <icon-(stop|play)>
|
||||
; <icon-random>
|
||||
; <icon-repeat>
|
||||
; <icon-repeatone> (deprecated)
|
||||
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
|
||||
; <icon-consume>
|
||||
; <icon-prev>
|
||||
; <icon-stop>
|
||||
; <icon-play>
|
||||
; <icon-pause>
|
||||
; <icon-next>
|
||||
; <icon-seekb>
|
||||
; <icon-seekf>
|
||||
format-online = <label-song><bar-progress><label-time>
|
||||
format-online-prefix =
|
||||
format-online-prefix-padding = 1
|
||||
format-online-prefix-background = ${color.green}
|
||||
format-online-prefix-foreground = ${color.foreground}
|
||||
format-online-background = ${color.background-alt}
|
||||
format-online-foreground = ${color.foreground}
|
||||
format-online-overline = ${color.background}
|
||||
format-online-underline = ${color.background}
|
||||
|
||||
;format-playing = ${self.format-online}
|
||||
;format-paused = ${self.format-online}
|
||||
;format-stopped = ${self.format-online}
|
||||
|
||||
; Available tags:
|
||||
; <label-offline>
|
||||
format-offline = <label-offline>
|
||||
format-offline-prefix =
|
||||
format-offline-prefix-padding = 1
|
||||
format-offline-prefix-background = ${color.red}
|
||||
format-offline-prefix-foreground = ${color.foreground}
|
||||
format-offline-background = ${color.background-alt}
|
||||
format-offline-foreground = ${color.foreground}
|
||||
format-offline-overline = ${color.background}
|
||||
format-offline-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %artist%
|
||||
; %album-artist%
|
||||
; %album%
|
||||
; %date%
|
||||
; %title%
|
||||
; Default: %artist% - %title%
|
||||
label-song = " %artist% - %title%"
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
; Available tokens:
|
||||
; %elapsed%
|
||||
; %total%
|
||||
; Default: %elapsed% / %total%
|
||||
label-time = "%elapsed% / %total% "
|
||||
|
||||
; Available tokens:
|
||||
; None
|
||||
label-offline = " Offline "
|
||||
|
||||
; Only applies if <icon-X> is used
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-stop =
|
||||
icon-next =
|
||||
icon-prev =
|
||||
icon-seekf =
|
||||
icon-seekb =
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
icon-repeatone =
|
||||
icon-single =
|
||||
icon-consume =
|
||||
|
||||
; Used to display the state of random/repeat/repeatone/single
|
||||
; Only applies if <icon-[random|repeat|repeatone|single]> is used
|
||||
toggle-on-foreground = ${color.primary}
|
||||
toggle-off-foreground = ${color.secondary}
|
||||
|
||||
; Only applies if <bar-progress> is used
|
||||
bar-progress-format = " %fill%%indicator%%empty% "
|
||||
bar-progress-width = 10
|
||||
bar-progress-gradient = false
|
||||
|
||||
bar-progress-indicator = ${bar.indicator}
|
||||
bar-progress-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-progress-fill = ${bar.fill}
|
||||
bar-progress-foreground-0 = ${color.foreground}
|
||||
bar-progress-foreground-1 = ${color.foreground}
|
||||
bar-progress-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-progress-empty = ${bar.empty}
|
||||
bar-progress-empty-foreground = ${color.gray}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
39
home/linux/gui/i3/conf/polybar/blocks/colors.ini
Normal file
@@ -0,0 +1,39 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█░░░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░░░█░█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[color]
|
||||
|
||||
;; Use pywal.sh in scripts directory to use colors from an image/wallpaper.
|
||||
|
||||
;; main colors
|
||||
background = #2f343f
|
||||
background-alt = #C4C7C5
|
||||
foreground = #1C1E20
|
||||
foreground-alt = #C4C7C5
|
||||
primary = #B4BC67
|
||||
|
||||
white = #FFFFFF
|
||||
black = #000000
|
||||
red = #EC7875
|
||||
pink = #EC6798
|
||||
purple = #BE78D1
|
||||
blue = #75A4CD
|
||||
cyan = #00C7DF
|
||||
teal = #00B19F
|
||||
green = #61C766
|
||||
lime = #B9C244
|
||||
yellow = #EBD369
|
||||
amber = #EDB83F
|
||||
orange = #E57C46
|
||||
brown = #AC8476
|
||||
gray = #9E9E9E
|
||||
indigo = #6C77BB
|
||||
blue-gray = #6D8895
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
293
home/linux/gui/i3/conf/polybar/blocks/config.ini
Normal file
@@ -0,0 +1,293 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░█░█▀▀░░█░░█░█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Global WM Settings
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; File Inclusion
|
||||
; include an external file, like module file, etc.
|
||||
|
||||
include-file = ~/.config/polybar/blocks/bars.ini
|
||||
include-file = ~/.config/polybar/blocks/colors.ini
|
||||
include-file = ~/.config/polybar/blocks/modules.ini
|
||||
include-file = ~/.config/polybar/blocks/user_modules.ini
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Bar Settings
|
||||
|
||||
[bar/main]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = false
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
; When false, the center position will be based on the size of the other blocks.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 100%
|
||||
height = 34
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.background}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
line-size = 5
|
||||
line-color = ${color.background}
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed withing this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
border-bottom-size = 0
|
||||
border-bottom-color = ${color.primary}
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
|
||||
font-0 = "Iosevka Nerd Font:size=10;4"
|
||||
font-1 = "feather:size=10;3"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
modules-left = sep launcher sep workspaces sep mpd
|
||||
modules-center = title
|
||||
modules-right = color-switch sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale =
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
; Restack the bar window and put it above the
|
||||
; selected window manager's root
|
||||
;
|
||||
; Fixes the issue where the bar is being drawn
|
||||
; on top of fullscreen window's
|
||||
;
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
;;wm-restack =
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; dpi =
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
scroll-up =
|
||||
scroll-down =
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
; bspwm
|
||||
;;scroll-up = bspwm-desknext
|
||||
;;scroll-down = bspwm-deskprev
|
||||
;;scroll-up = bspc desktop -f prev.local
|
||||
;;scroll-down = bspc desktop -f next.local
|
||||
|
||||
;i3
|
||||
;;scroll-up = i3wm-wsnext
|
||||
;;scroll-down = i3wm-wsprev
|
||||
;;scroll-up = i3-msg workspace next_on_output
|
||||
;;scroll-down = i3-msg workspace prev_on_output
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Application Settings
|
||||
|
||||
[settings]
|
||||
; The throttle settings lets the eventloop swallow up til X events
|
||||
; if they happen within Y millisecond after first event was received.
|
||||
; This is done to prevent flood of update event.
|
||||
;
|
||||
; For example if 5 modules emit an update event at the same time, we really
|
||||
; just care about the last one. But if we wait too long for events to swallow
|
||||
; the bar would appear sluggish so we continue if timeout
|
||||
; expires or limit is reached.
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
|
||||
; Time in milliseconds that the input handler will wait between processing events
|
||||
;throttle-input-for = 30
|
||||
|
||||
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
|
||||
screenchange-reload = false
|
||||
|
||||
; Compositing operators
|
||||
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
|
||||
compositing-background = source
|
||||
compositing-foreground = over
|
||||
compositing-overline = over
|
||||
compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
;format-padding =
|
||||
;format-margin =
|
||||
;format-offset =
|
||||
|
||||
; Enables pseudo-transparency for the bar
|
||||
; If set to true the bar can be transparent without a compositor.
|
||||
pseudo-transparency = false
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
14
home/linux/gui/i3/conf/polybar/blocks/launch.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Add this script to your wm startup file.
|
||||
|
||||
DIR="$HOME/.config/polybar/blocks"
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch the bar
|
||||
polybar -q main -c "$DIR"/config.ini &
|
||||
1197
home/linux/gui/i3/conf/polybar/blocks/modules.ini
Normal file
309
home/linux/gui/i3/conf/polybar/blocks/preview.ini
Normal file
@@ -0,0 +1,309 @@
|
||||
;; ┌────────────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀█░█▀▄░█▀▀░█░█░▀█▀░█▀▀░█░█░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▀░█▀▄░█▀▀░▀▄▀░░█░░█▀▀░█▄█░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀░░░▀░▀░▀▀▀░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Global WM Settings
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; File Inclusion
|
||||
; include an external file, like module file, etc.
|
||||
|
||||
include-file = ~/.config/polybar/blocks/bars.ini
|
||||
include-file = ~/.config/polybar/blocks/colors.ini
|
||||
include-file = ~/.config/polybar/blocks/modules.ini
|
||||
include-file = ~/.config/polybar/blocks/user_modules.ini
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Bar Settings
|
||||
|
||||
[bar/main]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = false
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
; When false, the center position will be based on the size of the other blocks.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 100%
|
||||
height = 34
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0%
|
||||
offset-y = 0%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.background}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
line-size = 5
|
||||
line-color = ${color.background}
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed withing this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
border-bottom-size = 0
|
||||
border-bottom-color = ${color.primary}
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
|
||||
font-0 = "Iosevka Nerd Font:size=10;4"
|
||||
font-1 = "feather:size=10;3"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar/top]
|
||||
inherit = bar/main
|
||||
offset-y = 10
|
||||
modules-center = sep launcher sep workspaces sep cpu sep memory sep mpd sep alsa sep battery sep network sep date sep sysmenu sep
|
||||
enable-ipc = true
|
||||
|
||||
[bar/mid]
|
||||
inherit = bar/main
|
||||
offset-y = 54
|
||||
modules-center = volume sep brightness sep battery_bar sep cpu_bar sep filesystem_bar sep memory_bar sep mpd_bar
|
||||
enable-ipc = true
|
||||
|
||||
[bar/bottom]
|
||||
inherit = bar/main
|
||||
offset-y = 98
|
||||
modules-center = title sep menu sep term files browser settings sep filesystem sep temperature sep color-switch sep keyboard sep pulseaudio sep backlight sep updates sep powermenu sep
|
||||
enable-ipc = true
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale =
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
; Restack the bar window and put it above the
|
||||
; selected window manager's root
|
||||
;
|
||||
; Fixes the issue where the bar is being drawn
|
||||
; on top of fullscreen window's
|
||||
;
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
;;wm-restack =
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; dpi =
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
;enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
scroll-up =
|
||||
scroll-down =
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
; bspwm
|
||||
;;scroll-up = bspwm-desknext
|
||||
;;scroll-down = bspwm-deskprev
|
||||
;;scroll-up = bspc desktop -f prev.local
|
||||
;;scroll-down = bspc desktop -f next.local
|
||||
|
||||
;i3
|
||||
;;scroll-up = i3wm-wsnext
|
||||
;;scroll-down = i3wm-wsprev
|
||||
;;scroll-up = i3-msg workspace next_on_output
|
||||
;;scroll-down = i3-msg workspace prev_on_output
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Application Settings
|
||||
|
||||
[settings]
|
||||
; The throttle settings lets the eventloop swallow up til X events
|
||||
; if they happen within Y millisecond after first event was received.
|
||||
; This is done to prevent flood of update event.
|
||||
;
|
||||
; For example if 5 modules emit an update event at the same time, we really
|
||||
; just care about the last one. But if we wait too long for events to swallow
|
||||
; the bar would appear sluggish so we continue if timeout
|
||||
; expires or limit is reached.
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
|
||||
; Time in milliseconds that the input handler will wait between processing events
|
||||
;throttle-input-for = 30
|
||||
|
||||
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
|
||||
screenchange-reload = false
|
||||
|
||||
; Compositing operators
|
||||
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
|
||||
compositing-background = source
|
||||
compositing-foreground = over
|
||||
compositing-overline = over
|
||||
compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
;format-padding =
|
||||
;format-margin =
|
||||
;format-offset =
|
||||
|
||||
; Enables pseudo-transparency for the bar
|
||||
; If set to true the bar can be transparent without a compositor.
|
||||
pseudo-transparency = false
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
14
home/linux/gui/i3/conf/polybar/blocks/preview.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$HOME/.config/polybar/blocks"
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch the preview bar
|
||||
polybar -q top -c "$DIR"/preview.ini &
|
||||
polybar -q mid -c "$DIR"/preview.ini &
|
||||
polybar -q bottom -c "$DIR"/preview.ini &
|
||||
117
home/linux/gui/i3/conf/polybar/blocks/scripts/checkupdates
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/bash
|
||||
#
|
||||
# checkupdates: Safely print a list of pending updates.
|
||||
#
|
||||
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
declare -r myname='checkupdates'
|
||||
declare -r myver='1.0.0'
|
||||
|
||||
plain() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
msg() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
msg2() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
ask() {
|
||||
local mesg=$1; shift
|
||||
printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
|
||||
}
|
||||
|
||||
warning() {
|
||||
local mesg=$1; shift
|
||||
printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
|
||||
error() {
|
||||
local mesg=$1; shift
|
||||
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
|
||||
# check if messages are to be printed using color
|
||||
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
|
||||
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
|
||||
# prefer terminal safe colored and bold text when tput is supported
|
||||
if tput setaf 0 &>/dev/null; then
|
||||
ALL_OFF="$(tput sgr0)"
|
||||
BOLD="$(tput bold)"
|
||||
BLUE="${BOLD}$(tput setaf 4)"
|
||||
GREEN="${BOLD}$(tput setaf 2)"
|
||||
RED="${BOLD}$(tput setaf 1)"
|
||||
YELLOW="${BOLD}$(tput setaf 3)"
|
||||
else
|
||||
ALL_OFF="\e[1;0m"
|
||||
BOLD="\e[1;1m"
|
||||
BLUE="${BOLD}\e[1;34m"
|
||||
GREEN="${BOLD}\e[1;32m"
|
||||
RED="${BOLD}\e[1;31m"
|
||||
YELLOW="${BOLD}\e[1;33m"
|
||||
fi
|
||||
fi
|
||||
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
|
||||
|
||||
|
||||
if (( $# > 0 )); then
|
||||
echo "${myname} v${myver}"
|
||||
echo
|
||||
echo "Safely print a list of pending updates"
|
||||
echo
|
||||
echo "Usage: ${myname}"
|
||||
echo
|
||||
echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! type -P fakeroot >/dev/null; then
|
||||
error 'Cannot find the fakeroot binary.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $CHECKUPDATES_DB ]]; then
|
||||
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
|
||||
fi
|
||||
|
||||
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
|
||||
|
||||
DBPath="$(pacman-conf DBPath)"
|
||||
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
|
||||
DBPath="/var/lib/pacman/"
|
||||
fi
|
||||
|
||||
mkdir -p "$CHECKUPDATES_DB"
|
||||
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
|
||||
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
|
||||
error 'Cannot fetch updates'
|
||||
exit 1
|
||||
fi
|
||||
pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]'
|
||||
|
||||
exit 0
|
||||
|
||||
# vim: set noet:
|
||||
12
home/linux/gui/i3/conf/polybar/blocks/scripts/launcher.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
FILE="$HOME/.config/polybar/blocks/scripts/rofi/colors.rasi"
|
||||
|
||||
# random accent color
|
||||
COLORS=('#EC7875' '#EC6798' '#BE78D1' '#75A4CD' '#00C7DF' '#00B19F' '#61C766' \
|
||||
'#B9C244' '#EBD369' '#EDB83F' '#E57C46' '#AC8476' '#6C77BB' '#6D8895')
|
||||
AC="${COLORS[$(( $RANDOM % 14 ))]}"
|
||||
sed -i -e "s/ac: .*/ac: ${AC}FF;/g" $FILE
|
||||
sed -i -e "s/se: .*/se: ${AC}40;/g" $FILE
|
||||
|
||||
rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/blocks/scripts/rofi/launcher.rasi
|
||||
95
home/linux/gui/i3/conf/polybar/blocks/scripts/powermenu.sh
Executable file
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Author : Aditya Shakya
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Twitter : @adi1090x
|
||||
|
||||
dir="~/.config/polybar/blocks/scripts/rofi"
|
||||
uptime=$(uptime -p | sed -e 's/up //g')
|
||||
|
||||
rofi_command="rofi -no-config -theme $dir/powermenu.rasi"
|
||||
|
||||
# Options
|
||||
shutdown=" Shutdown"
|
||||
reboot=" Restart"
|
||||
lock=" Lock"
|
||||
suspend=" Sleep"
|
||||
logout=" Logout"
|
||||
|
||||
# Confirmation
|
||||
confirm_exit() {
|
||||
rofi -dmenu\
|
||||
-no-config\
|
||||
-i\
|
||||
-no-fixed-num-lines\
|
||||
-p "Are You Sure? : "\
|
||||
-theme $dir/confirm.rasi
|
||||
}
|
||||
|
||||
# Message
|
||||
msg() {
|
||||
rofi -no-config -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
|
||||
}
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl poweroff
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$reboot)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
systemctl reboot
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$lock)
|
||||
if [[ -f /usr/bin/i3lock ]]; then
|
||||
i3lock
|
||||
elif [[ -f /usr/bin/betterlockscreen ]]; then
|
||||
betterlockscreen -l
|
||||
fi
|
||||
;;
|
||||
$suspend)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
mpc -q pause
|
||||
amixer set Master mute
|
||||
systemctl suspend
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
$logout)
|
||||
ans=$(confirm_exit &)
|
||||
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||
if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then
|
||||
openbox --exit
|
||||
elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then
|
||||
bspc quit
|
||||
elif [[ "$DESKTOP_SESSION" == "i3" ]]; then
|
||||
i3-msg exit
|
||||
fi
|
||||
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||
exit 0
|
||||
else
|
||||
msg
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,11 @@
|
||||
/* colors */
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: #2f343fFF;
|
||||
bga: #C4C7C5FF;
|
||||
fga: #C4C7C5FF;
|
||||
fg: #1C1E20FF;
|
||||
ac: #00C7DFFF;
|
||||
se: #00C7DF40;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/* Confirm Dialog */
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @bg;
|
||||
text-color: @fga;
|
||||
font: "Iosevka Nerd Font 10";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 210px;
|
||||
padding: 25px;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @ac;
|
||||
}
|
||||
119
home/linux/gui/i3/conf/polybar/blocks/scripts/rofi/launcher.rasi
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 550px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ prompt, entry ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 2;
|
||||
lines: 8;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/* Confirm Dialog */
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
* {
|
||||
background-color: @bg;
|
||||
text-color: @fga;
|
||||
font: "Iosevka Nerd Font 10";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 320px;
|
||||
padding: 25px;
|
||||
border: 0px 0px 4px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
location: center;
|
||||
y-offset: -2em;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @ac;
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 400px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 8;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px 3px 3px -12px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 300px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, prompt ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px 3px 3px -23px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
127
home/linux/gui/i3/conf/polybar/blocks/scripts/rofi/styles.rasi
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
*
|
||||
* Author : Aditya Shakya
|
||||
* Mail : adi1090x@gmail.com
|
||||
* Github : @adi1090x
|
||||
* Twitter : @adi1090x
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
font: "Iosevka Nerd Font 10";
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
display-drun: "";
|
||||
drun-display-format: "{name}";
|
||||
disable-history: false;
|
||||
fullscreen: false;
|
||||
hide-scrollbar: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
@import "colors.rasi"
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-color: @ac;
|
||||
border-radius: 0px;
|
||||
width: 300px;
|
||||
location: center;
|
||||
x-offset: 0;
|
||||
y-offset: 0;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
padding: 6px 7px 4px 7px;
|
||||
background-color: @ac;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
str: "";
|
||||
font: "feather 12";
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @al;
|
||||
text-color: @fg;
|
||||
placeholder-color: @fg;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
placeholder: "Search...";
|
||||
padding: 6px;
|
||||
blink: true;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, entry ];
|
||||
background-color: @bga;
|
||||
text-color: @fg;
|
||||
expand: false;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @al;
|
||||
padding: 0px;
|
||||
columns: 1;
|
||||
lines: 5;
|
||||
spacing: 6px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @al;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @al;
|
||||
text-color: @fga;
|
||||
orientation: horizontal;
|
||||
border-radius: 0px;
|
||||
padding: 3px 3px 3px -23px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 24px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
vertical-align: 0.5;
|
||||
margin: 0px 2.5px 0px 2.5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @se;
|
||||
text-color: @fga;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @ac;
|
||||
}
|
||||
15
home/linux/gui/i3/conf/polybar/blocks/scripts/style-switch.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SDIR="$HOME/.config/polybar/blocks/scripts"
|
||||
|
||||
# Launch Rofi
|
||||
MENU="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '' \
|
||||
-theme $SDIR/rofi/styles.rasi \
|
||||
<<< " Default| Nord| Gruvbox| Adapta| Cherry|")"
|
||||
case "$MENU" in
|
||||
*Default) "$SDIR"/styles.sh --default ;;
|
||||
*Nord) "$SDIR"/styles.sh --nord ;;
|
||||
*Gruvbox) "$SDIR"/styles.sh --gruvbox ;;
|
||||
*Adapta) "$SDIR"/styles.sh --adapta ;;
|
||||
*Cherry) "$SDIR"/styles.sh --cherry ;;
|
||||
esac
|
||||
74
home/linux/gui/i3/conf/polybar/blocks/scripts/styles.sh
Executable file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Color files
|
||||
PFILE="$HOME/.config/polybar/blocks/colors.ini"
|
||||
RFILE="$HOME/.config/polybar/blocks/scripts/rofi/colors.rasi"
|
||||
|
||||
# Change colors
|
||||
change_color() {
|
||||
# polybar
|
||||
sed -i -e "s/background = #.*/background = $BG/g" $PFILE
|
||||
sed -i -e "s/background-alt = #.*/background-alt = $BGA/g" $PFILE
|
||||
sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE
|
||||
sed -i -e "s/foreground-alt = #.*/foreground-alt = $FGA/g" $PFILE
|
||||
sed -i -e "s/primary = #.*/primary = $AC/g" $PFILE
|
||||
|
||||
# rofi
|
||||
cat > $RFILE <<- EOF
|
||||
/* colors */
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: ${BG}FF;
|
||||
bga: ${BGA}FF;
|
||||
fga: ${FGA}FF;
|
||||
fg: ${FG}FF;
|
||||
ac: ${AC}FF;
|
||||
se: ${AC}40;
|
||||
}
|
||||
EOF
|
||||
|
||||
polybar-msg cmd restart
|
||||
}
|
||||
|
||||
if [[ $1 = "--default" ]]; then
|
||||
BG="#2f343f"
|
||||
BGA="#C4C7C5"
|
||||
FGA="#C4C7C5"
|
||||
FG="#1C1E20"
|
||||
AC="#B4BC67"
|
||||
change_color
|
||||
elif [[ $1 = "--nord" ]]; then
|
||||
BG="#3B4252"
|
||||
BGA="#4C566A"
|
||||
FGA="#E5E9F0"
|
||||
FG="#ECEFF4"
|
||||
AC="#A3BE8C"
|
||||
change_color
|
||||
elif [[ $1 = "--gruvbox" ]]; then
|
||||
BG="#282828"
|
||||
BGA="#EBDBB2"
|
||||
FGA="#EBDBB2"
|
||||
FG="#282828"
|
||||
AC="#CC241D"
|
||||
change_color
|
||||
elif [[ $1 = "--adapta" ]]; then
|
||||
BG="#243035"
|
||||
BGA="#38444A"
|
||||
FGA="#FDF6E3"
|
||||
FG="#FFFFFF"
|
||||
AC="#4DD0E1"
|
||||
change_color
|
||||
elif [[ $1 = "--cherry" ]]; then
|
||||
BG="#1F1626"
|
||||
BGA="#423949"
|
||||
FGA="#FFFFFF"
|
||||
FG="#FFFFFF"
|
||||
AC="#D94085"
|
||||
change_color
|
||||
else
|
||||
cat <<- _EOF_
|
||||
No option specified, Available options:
|
||||
--default --nord --gruvbox --adapta --cherry
|
||||
_EOF_
|
||||
fi
|
||||
45
home/linux/gui/i3/conf/polybar/blocks/scripts/updates.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
|
||||
|
||||
get_total_updates() { UPDATES=$(~/.config/polybar/blocks/scripts/checkupdates 2>/dev/null | wc -l); }
|
||||
|
||||
while true; do
|
||||
get_total_updates
|
||||
|
||||
# notify user of updates
|
||||
if hash notify-send &>/dev/null; then
|
||||
if (( UPDATES > 50 )); then
|
||||
notify-send -u critical -i $NOTIFY_ICON \
|
||||
"You really need to update!!" "$UPDATES New packages"
|
||||
elif (( UPDATES > 25 )); then
|
||||
notify-send -u normal -i $NOTIFY_ICON \
|
||||
"You should update soon" "$UPDATES New packages"
|
||||
elif (( UPDATES > 2 )); then
|
||||
notify-send -u low -i $NOTIFY_ICON \
|
||||
"$UPDATES New packages"
|
||||
fi
|
||||
fi
|
||||
|
||||
# when there are updates available
|
||||
# every 10 seconds another check for updates is done
|
||||
while (( UPDATES > 0 )); do
|
||||
if (( UPDATES == 1 )); then
|
||||
echo "$UPDATES"
|
||||
elif (( UPDATES > 1 )); then
|
||||
echo "$UPDATES"
|
||||
else
|
||||
echo "None"
|
||||
fi
|
||||
sleep 10
|
||||
get_total_updates
|
||||
done
|
||||
|
||||
# when no updates are available, use a longer loop, this saves on CPU
|
||||
# and network uptime, only checking once every 30 min for new updates
|
||||
while (( UPDATES == 0 )); do
|
||||
echo "None"
|
||||
sleep 1800
|
||||
get_total_updates
|
||||
done
|
||||
done
|
||||
292
home/linux/gui/i3/conf/polybar/blocks/user_modules.ini
Normal file
@@ -0,0 +1,292 @@
|
||||
;; ┌──────────────────────────────────────────────────────────────────────────────-----┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█░█░█▀▀░█▀▀░█▀▄░░░█▄█░█▀█░█▀▄░█░█░█░░░█▀▀░█▀▀ │
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░█░▀▀█░█▀▀░█▀▄░░░█░█░█░█░█░█░█░█░█░░░█▀▀░▀▀█ │
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀▀▀░▀▀▀ │
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └──────────────────────────────────────────────────────────────────────────────-----┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/updates]
|
||||
type = custom/script
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; Command to be executed (using "/usr/bin/env sh -c [command]")
|
||||
exec = ~/.config/polybar/blocks/scripts/updates.sh
|
||||
|
||||
; Conditional command that, if defined, needs to exit successfully
|
||||
; before the main exec command is invoked.
|
||||
; Default: ""
|
||||
;;exec-if = ""
|
||||
|
||||
; Will the script output continous content?
|
||||
; Default: false
|
||||
tail = true
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 2 (0 if `tail = true`)
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <output> - deprecated
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-background = ${color.yellow}
|
||||
format-prefix-padding = 1
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
; Available tokens:
|
||||
; %output%
|
||||
; Default: %output%
|
||||
label = %output%
|
||||
label-background = ${color.background-alt}
|
||||
label-padding = 1
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
|
||||
click-left = exo-open --launch TerminalEmulator &
|
||||
click-right = exo-open --launch TerminalEmulator &
|
||||
;;double-click-left = echo double left %counter%
|
||||
;;double-click-middle = echo double middle %counter%
|
||||
;;double-click-right = echo double right %counter%
|
||||
|
||||
; Available tokens:
|
||||
; %counter%
|
||||
; %pid%
|
||||
;
|
||||
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
|
||||
;;scroll-up = echo scroll up %counter%
|
||||
;;scroll-down = echo scroll down %counter%
|
||||
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/launcher]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix-background = ${color.teal}
|
||||
content-prefix-padding = 1
|
||||
|
||||
content = " Menu "
|
||||
content-background = ${color.background-alt}
|
||||
content-foreground = ${color.foreground}
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
|
||||
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
click-left = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
;;click-middle = ~/.config/polybar/blocks/scripts/launcher-full
|
||||
click-right = ~/.config/polybar/blocks/scripts/style-switch.sh &
|
||||
|
||||
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
;;scroll-up = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
;;scroll-down = ~/.config/polybar/blocks/scripts/color-switch.sh &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/sysmenu]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix-background = ${color.cyan}
|
||||
content-prefix-padding = 1
|
||||
|
||||
content = " System "
|
||||
content-background = ${color.background-alt}
|
||||
content-foreground = ${color.foreground}
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
|
||||
click-left = ~/.config/polybar/blocks/scripts/powermenu.sh &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/color-switch]
|
||||
type = custom/text
|
||||
|
||||
content-prefix =
|
||||
content-prefix-background = ${color.orange}
|
||||
content-prefix-padding = 1
|
||||
|
||||
content = " Style "
|
||||
content-background = ${color.background-alt}
|
||||
content-foreground = ${color.foreground}
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
|
||||
click-left = ~/.config/polybar/blocks/scripts/style-switch.sh &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/sep]
|
||||
type = custom/text
|
||||
content = |
|
||||
|
||||
content-background = ${color.background}
|
||||
content-foreground = ${color.background}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/apps]
|
||||
type = custom/text
|
||||
content-overline = ${color.background}
|
||||
content-underline = ${color.background}
|
||||
content-padding = 1
|
||||
|
||||
[module/term]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.blue-gray}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = termite &
|
||||
click-middle = urxvt &
|
||||
click-right = xfce4-terminal &
|
||||
|
||||
[module/files]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.blue}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = thunar &
|
||||
click-right = pcmanfm &
|
||||
|
||||
[module/browser]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.orange}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = firefox &
|
||||
click-right = chromium &
|
||||
|
||||
[module/settings]
|
||||
inherit = module/apps
|
||||
content =
|
||||
content-background = ${color.teal}
|
||||
content-foreground = ${color.foreground}
|
||||
click-left = xfce4-settings-manager &
|
||||
click-right = lxappearance &
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
; If true, <label-toggle> will be to the left of the menu items (default).
|
||||
; If false, it will be on the right of all the items.
|
||||
expand-right = true
|
||||
|
||||
; "menu-LEVEL-N" has the same properties as "label-NAME" with
|
||||
; the additional "exec" property
|
||||
;
|
||||
; Available exec commands:
|
||||
; menu-open-LEVEL
|
||||
; menu-close
|
||||
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
menu-0-0 = " Reboot |"
|
||||
menu-0-0-background = ${color.background-alt}
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-1 = " Shutdown "
|
||||
menu-0-1-background = ${color.background-alt}
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
menu-1-0 = " Back |"
|
||||
menu-1-0-background = ${color.background-alt}
|
||||
menu-1-0-exec = menu-open-0
|
||||
menu-1-1 = " Reboot "
|
||||
menu-1-1-background = ${color.background-alt}
|
||||
menu-1-1-exec = systemctl reboot
|
||||
|
||||
menu-2-0 = " Shutdown |"
|
||||
menu-2-0-background = ${color.background-alt}
|
||||
menu-2-0-exec = systemctl poweroff
|
||||
menu-2-1 = " Back "
|
||||
menu-2-1-background = ${color.background-alt}
|
||||
menu-2-1-exec = menu-open-0
|
||||
|
||||
; Available tags:
|
||||
; <label-toggle> (default) - gets replaced with <label-(open|close)>
|
||||
; <menu> (default)
|
||||
; Note that if you use <label-toggle> you must also include
|
||||
; the definition for <label-open>
|
||||
|
||||
format = <label-toggle><menu>
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
label-open =
|
||||
label-open-background = ${color.cyan}
|
||||
label-open-padding = 1
|
||||
label-close =
|
||||
label-close-background = ${color.red}
|
||||
label-close-padding = 1
|
||||
|
||||
; Optional item separator
|
||||
; Default: none
|
||||
;label-separator = " | "
|
||||
;label-separator-foreground = ${color.foreground}
|
||||
;label-separator-background = ${color.background-alt}
|
||||
|
||||
;;label-open-foreground = ${color.foreground}
|
||||
;;label-close-foreground = ${color.background}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/menu]
|
||||
type = custom/menu
|
||||
|
||||
; If true, <label-toggle> will be to the left of the menu items (default).
|
||||
; If false, it will be on the right of all the items.
|
||||
expand-right = true
|
||||
|
||||
; "menu-LEVEL-N" has the same properties as "label-NAME" with
|
||||
; the additional "exec" property
|
||||
;
|
||||
; Available exec commands:
|
||||
; menu-open-LEVEL
|
||||
; menu-close
|
||||
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
menu-0-0 =" Menu | "
|
||||
menu-0-0-background = ${color.background-alt}
|
||||
menu-0-0-exec = ~/.config/polybar/blocks/scripts/launcher.sh &
|
||||
|
||||
menu-0-1 =" Files | "
|
||||
menu-0-1-background = ${color.background-alt}
|
||||
menu-0-1-exec = thunar &
|
||||
|
||||
menu-0-2 =" Terminal | "
|
||||
menu-0-2-background = ${color.background-alt}
|
||||
menu-0-2-exec = termite &
|
||||
|
||||
menu-0-3 =" Browser "
|
||||
menu-0-3-background = ${color.background-alt}
|
||||
menu-0-3-exec = firefox &
|
||||
|
||||
; Available tags:
|
||||
; <label-toggle> (default) - gets replaced with <label-(open|close)>
|
||||
; <menu> (default)
|
||||
; Note that if you use <label-toggle> you must also include
|
||||
; the definition for <label-open>
|
||||
|
||||
format = <label-toggle><menu>
|
||||
format-overline = ${color.background}
|
||||
format-underline = ${color.background}
|
||||
|
||||
label-open =
|
||||
label-open-background = ${color.yellow}
|
||||
label-open-padding = 1
|
||||
label-close =
|
||||
label-close-background = ${color.red}
|
||||
label-close-padding = 1
|
||||
|
||||
; Optional item separator
|
||||
; Default: none
|
||||
;label-separator = " | "
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
534
home/linux/gui/i3/conf/polybar/colorblocks/bars.ini
Normal file
@@ -0,0 +1,534 @@
|
||||
;; ┌────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar]
|
||||
fill =
|
||||
empty =
|
||||
indicator = ⏽
|
||||
; Nerd font : , ⏽, 樂 籠 錄 , 雷 絛
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
|
||||
; Soundcard to be used
|
||||
; Usually in the format hw:# where # is the card number
|
||||
; You can find the different card numbers in `/proc/asound/cards`
|
||||
master-soundcard = default
|
||||
speaker-soundcard = default
|
||||
headphone-soundcard = default
|
||||
|
||||
; Name of the master, speaker and headphone mixers
|
||||
; Use the following command to list available mixer controls:
|
||||
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
|
||||
; If master, speaker or headphone-soundcard isn't the default,
|
||||
; use `amixer -c # scontrols` instead where # is the number
|
||||
; of the master, speaker or headphone soundcard respectively
|
||||
;
|
||||
; Default: Master
|
||||
master-mixer = Master
|
||||
|
||||
; Optionally define speaker and headphone mixers
|
||||
; Default: none
|
||||
;;speaker-mixer = Speaker
|
||||
; Default: none
|
||||
;;headphone-mixer = Headphone
|
||||
|
||||
; NOTE: This is required if headphone_mixer is defined
|
||||
; Use the following command to list available device controls
|
||||
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
|
||||
; You may also need to use `amixer -c # controls` as above for the mixer names
|
||||
; Default: none
|
||||
;;headphone-id = 9
|
||||
|
||||
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
|
||||
; Default: false
|
||||
;;mapped = true
|
||||
|
||||
; Interval for volume increase/decrease (in percent points)
|
||||
; Default: 5
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <ramp-volume> <bar-volume>
|
||||
format-volume-background = ${color.shade6}
|
||||
format-volume-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-muted> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix =
|
||||
format-muted-prefix-font = 2
|
||||
format-muted-background = ${color.shade6}
|
||||
format-muted-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-volume = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default
|
||||
label-muted = " Muted"
|
||||
label-muted-foreground = ${color.foreground}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-font = 2
|
||||
|
||||
; Only applies if <bar-volume> is used
|
||||
bar-volume-width = 10
|
||||
bar-volume-gradient = false
|
||||
|
||||
bar-volume-indicator = ${bar.indicator}
|
||||
bar-volume-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-volume-fill = ${bar.fill}
|
||||
bar-volume-foreground-0 = ${color.foreground}
|
||||
bar-volume-foreground-1 = ${color.foreground}
|
||||
bar-volume-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-volume-empty = ${bar.empty}
|
||||
bar-volume-empty-foreground = ${color.foreground}
|
||||
|
||||
; If defined, it will replace <ramp-volume> when
|
||||
; headphones are plugged in to `headphone_control_numid`
|
||||
; If undefined, <ramp-volume> will be used for both
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-headphones-0 =
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/brightness]
|
||||
;type = internal/xbacklight
|
||||
type = internal/backlight
|
||||
|
||||
; Use the following command to list available cards:
|
||||
; $ ls -1 /sys/class/backlight/
|
||||
;card = intel_backlight
|
||||
card = amdgpu_bl0
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <ramp>
|
||||
; <bar>
|
||||
format = <ramp> <bar>
|
||||
format-background = ${color.shade7}
|
||||
format-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label = %percentage%%
|
||||
|
||||
; Only applies if <ramp> is used
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
ramp-font = 2
|
||||
|
||||
; Only applies if <bar> is used
|
||||
bar-width = 10
|
||||
bar-gradient = false
|
||||
|
||||
bar-indicator = ${bar.indicator}
|
||||
bar-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-fill = ${bar.fill}
|
||||
bar-foreground-0 = ${color.foreground}
|
||||
bar-foreground-1 = ${color.foreground}
|
||||
bar-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-empty = ${bar.empty}
|
||||
bar-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/battery_bar]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 99
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT1
|
||||
adapter = ACAD
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 2
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <bar-capacity>
|
||||
format-charging-prefix = " "
|
||||
format-charging-prefix-font = 2
|
||||
format-charging-background = ${color.shade5}
|
||||
format-charging-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <bar-capacity>
|
||||
format-discharging-prefix = " "
|
||||
format-discharging-prefix-font = 2
|
||||
format-discharging-background = ${color.shade5}
|
||||
format-discharging-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <label-full>
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-font = 2
|
||||
format-full-background = ${color.shade5}
|
||||
format-full-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
|
||||
label-charging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-full = "Full"
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
bar-capacity-width = 10
|
||||
bar-capacity-gradient = false
|
||||
|
||||
bar-capacity-indicator = ${bar.indicator}
|
||||
bar-capacity-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-capacity-fill = ${bar.fill}
|
||||
bar-capacity-foreground-0 = ${color.foreground}
|
||||
bar-capacity-foreground-1 = ${color.foreground}
|
||||
bar-capacity-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-capacity-empty = ${bar.empty}
|
||||
bar-capacity-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/cpu_bar]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 0.5
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
;;format = <label> <ramp-coreload>
|
||||
format = <bar-load> <label>
|
||||
format-prefix = " "
|
||||
format-prefix-font = 2
|
||||
format-background = ${color.shade7}
|
||||
format-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load averaged over all cores
|
||||
; %percentage-sum% - Cumulative load on all cores
|
||||
; %percentage-cores% - load percentage for each core
|
||||
; %percentage-core[1-9]% - load percentage for specific core
|
||||
label = "%percentage%%"
|
||||
|
||||
; Only applies if <bar-load> is used
|
||||
bar-load-width = 10
|
||||
bar-load-gradient = false
|
||||
|
||||
bar-load-indicator = ${bar.indicator}
|
||||
bar-load-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-load-fill = ${bar.fill}
|
||||
bar-load-foreground-0 = ${color.foreground}
|
||||
bar-load-foreground-1 = ${color.foreground}
|
||||
bar-load-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-load-empty = ${bar.empty}
|
||||
bar-load-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/filesystem_bar]
|
||||
type = internal/fs
|
||||
|
||||
; Mountpoints to display
|
||||
mount-0 = /
|
||||
;;mount-1 = /home
|
||||
;;mount-2 = /var
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = 30
|
||||
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = false
|
||||
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
;;spacing = 4
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = <bar-used> <label-mounted>
|
||||
format-mounted-prefix = " "
|
||||
format-mounted-prefix-font = 2
|
||||
format-mounted-background = ${color.shade5}
|
||||
format-mounted-padding = 2
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = <label-unmounted>
|
||||
format-unmounted-prefix = " "
|
||||
format-unmounted-prefix-font = 2
|
||||
format-unmounted-background = ${color.shade5}
|
||||
format-unmounted-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = %used%/%total%
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; Default: %mountpoint% is not mounted
|
||||
label-unmounted = "%mountpoint%: not mounted"
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 2
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
format = <bar-used> <label>
|
||||
format-prefix = " "
|
||||
format-prefix-font = 2
|
||||
format-background = ${color.shade6}
|
||||
format-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = "%mb_used%"
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
|
||||
bar-used-indicator = ${bar.indicator}
|
||||
bar-used-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-used-fill = ${bar.fill}
|
||||
bar-used-foreground-0 = ${color.foreground}
|
||||
bar-used-foreground-1 = ${color.foreground}
|
||||
bar-used-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-used-empty = ${bar.empty}
|
||||
bar-used-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/mpd_bar]
|
||||
type = internal/mpd
|
||||
|
||||
; Host where mpd is running (either ip or domain name)
|
||||
; Can also be the full path to a unix socket where mpd is running.
|
||||
;;host = 127.0.0.1
|
||||
;;port = 6600
|
||||
;;password = mysecretpassword
|
||||
|
||||
; Seconds to sleep between progressbar/song timer sync
|
||||
; Default: 1
|
||||
interval = 1
|
||||
|
||||
; Available tags:
|
||||
; <label-song> (default)
|
||||
; <label-time>
|
||||
; <bar-progress>
|
||||
; <toggle> - gets replaced with <icon-(pause|play)>
|
||||
; <toggle-stop> - gets replaced with <icon-(stop|play)>
|
||||
; <icon-random>
|
||||
; <icon-repeat>
|
||||
; <icon-repeatone> (deprecated)
|
||||
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
|
||||
; <icon-consume>
|
||||
; <icon-prev>
|
||||
; <icon-stop>
|
||||
; <icon-play>
|
||||
; <icon-pause>
|
||||
; <icon-next>
|
||||
; <icon-seekb>
|
||||
; <icon-seekf>
|
||||
format-online = <label-song> <bar-progress> <label-time>
|
||||
format-online-prefix = ﱘ
|
||||
format-online-prefix-font = 2
|
||||
format-online-background = ${color.shade4}
|
||||
format-online-padding = 2
|
||||
|
||||
;format-playing = ${self.format-online}
|
||||
;format-paused = ${self.format-online}
|
||||
;format-stopped = ${self.format-online}
|
||||
|
||||
; Available tags:
|
||||
; <label-offline>
|
||||
format-offline = <label-offline>
|
||||
format-offline-prefix = ﱘ
|
||||
format-offline-prefix-font = 2
|
||||
format-offline-background = ${color.shade4}
|
||||
format-offline-padding = 2
|
||||
|
||||
; Available tokens:
|
||||
; %artist%
|
||||
; %album-artist%
|
||||
; %album%
|
||||
; %date%
|
||||
; %title%
|
||||
; Default: %artist% - %title%
|
||||
label-song = " %artist% - %title%"
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
; Available tokens:
|
||||
; %elapsed%
|
||||
; %total%
|
||||
; Default: %elapsed% / %total%
|
||||
label-time = %elapsed% / %total%
|
||||
|
||||
; Available tokens:
|
||||
; None
|
||||
label-offline = " Offline"
|
||||
|
||||
; Only applies if <icon-X> is used
|
||||
icon-play = 喇
|
||||
icon-pause =
|
||||
icon-stop =
|
||||
icon-prev =
|
||||
icon-next =
|
||||
icon-seekb =
|
||||
icon-seekf =
|
||||
icon-random =
|
||||
icon-repeat =
|
||||
icon-repeatone =
|
||||
icon-single =
|
||||
icon-consume =
|
||||
|
||||
; Used to display the state of random/repeat/repeatone/single
|
||||
; Only applies if <icon-[random|repeat|repeatone|single]> is used
|
||||
toggle-on-foreground = ${color.foreground}
|
||||
toggle-off-foreground = ${color.background}
|
||||
|
||||
; Only applies if <bar-progress> is used
|
||||
bar-progress-width = 10
|
||||
bar-progress-gradient = false
|
||||
|
||||
bar-progress-indicator = ${bar.indicator}
|
||||
bar-progress-indicator-foreground = ${color.foreground}
|
||||
|
||||
bar-progress-fill = ${bar.fill}
|
||||
bar-progress-foreground-0 = ${color.foreground}
|
||||
bar-progress-foreground-1 = ${color.foreground}
|
||||
bar-progress-foreground-2 = ${color.foreground}
|
||||
|
||||
bar-progress-empty = ${bar.empty}
|
||||
bar-progress-empty-foreground = ${color.foreground}
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
30
home/linux/gui/i3/conf/polybar/colorblocks/colors.ini
Normal file
@@ -0,0 +1,30 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█░░░█▀█░█▀▄░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░░░█░█░█▀▄░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[color]
|
||||
|
||||
;; Use pywal.sh in scripts directory to use colors from an image/wallpaper.
|
||||
|
||||
;; main colors
|
||||
background = #141C21
|
||||
foreground = #F5F5F5
|
||||
foreground-alt = #FFFFFF
|
||||
alpha = #00000000
|
||||
|
||||
;; shades
|
||||
shade1 = #BF360C
|
||||
shade2 = #D84315
|
||||
shade3 = #E64A19
|
||||
shade4 = #F4511E
|
||||
shade5 = #FF5722
|
||||
shade6 = #FF7043
|
||||
shade7 = #FF8A65
|
||||
shade8 = #FFAB91
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
293
home/linux/gui/i3/conf/polybar/colorblocks/config.ini
Normal file
@@ -0,0 +1,293 @@
|
||||
;; ┌────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░█░█▀▀░░█░░█░█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Global WM Settings
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; File Inclusion
|
||||
; include an external file, like module file, etc.
|
||||
|
||||
include-file = ~/.config/polybar/colorblocks/bars.ini
|
||||
include-file = ~/.config/polybar/colorblocks/colors.ini
|
||||
include-file = ~/.config/polybar/colorblocks/modules.ini
|
||||
include-file = ~/.config/polybar/colorblocks/user_modules.ini
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Bar Settings
|
||||
|
||||
[bar/main]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = true
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
; When false, the center position will be based on the size of the other blocks.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 99%
|
||||
height = 40
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0.5%
|
||||
offset-y = 1%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.alpha}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
underline-size = 2
|
||||
underline-color = ${color.foreground}
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed withing this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
border-size = 0
|
||||
border-color = ${color.background}
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
|
||||
font-0 = "Iosevka Nerd Font:pixelsize=10;4"
|
||||
font-1 = "Iosevka Nerd Font:pixelsize=13;4"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
modules-left = launcher sep workspaces sep mpd
|
||||
modules-center =
|
||||
modules-right = color-switch sep cpu memory alsa battery network date sep sysmenu
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale =
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
; Restack the bar window and put it above the
|
||||
; selected window manager's root
|
||||
;
|
||||
; Fixes the issue where the bar is being drawn
|
||||
; on top of fullscreen window's
|
||||
;
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
;;wm-restack =
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; dpi =
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
scroll-up =
|
||||
scroll-down =
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
; bspwm
|
||||
;;scroll-up = bspwm-desknext
|
||||
;;scroll-down = bspwm-deskprev
|
||||
;;scroll-up = bspc desktop -f prev.local
|
||||
;;scroll-down = bspc desktop -f next.local
|
||||
|
||||
;i3
|
||||
;;scroll-up = i3wm-wsnext
|
||||
;;scroll-down = i3wm-wsprev
|
||||
;;scroll-up = i3-msg workspace next_on_output
|
||||
;;scroll-down = i3-msg workspace prev_on_output
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Application Settings
|
||||
|
||||
[settings]
|
||||
; The throttle settings lets the eventloop swallow up til X events
|
||||
; if they happen within Y millisecond after first event was received.
|
||||
; This is done to prevent flood of update event.
|
||||
;
|
||||
; For example if 5 modules emit an update event at the same time, we really
|
||||
; just care about the last one. But if we wait too long for events to swallow
|
||||
; the bar would appear sluggish so we continue if timeout
|
||||
; expires or limit is reached.
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
|
||||
; Time in milliseconds that the input handler will wait between processing events
|
||||
;throttle-input-for = 30
|
||||
|
||||
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
|
||||
screenchange-reload = false
|
||||
|
||||
; Compositing operators
|
||||
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
|
||||
compositing-background = source
|
||||
compositing-foreground = over
|
||||
compositing-overline = over
|
||||
compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
;format-padding =
|
||||
;format-margin =
|
||||
;format-offset =
|
||||
|
||||
; Enables pseudo-transparency for the bar
|
||||
; If set to true the bar can be transparent without a compositor.
|
||||
pseudo-transparency = false
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
14
home/linux/gui/i3/conf/polybar/colorblocks/launch.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Add this script to your wm startup file.
|
||||
|
||||
DIR="$HOME/.config/polybar/colorblocks"
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch the bar
|
||||
polybar -q main -c "$DIR"/config.ini &
|
||||
1162
home/linux/gui/i3/conf/polybar/colorblocks/modules.ini
Normal file
311
home/linux/gui/i3/conf/polybar/colorblocks/preview.ini
Normal file
@@ -0,0 +1,311 @@
|
||||
;; ┌────────────────────────────────────────────────────────────────────┐
|
||||
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀█░█▀▄░█▀▀░█░█░▀█▀░█▀▀░█░█░█▀▀│
|
||||
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▀░█▀▄░█▀▀░▀▄▀░░█░░█▀▀░█▄█░▀▀█│
|
||||
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀░░░▀░▀░▀▀▀░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀│
|
||||
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
|
||||
;; └────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Global WM Settings
|
||||
|
||||
[global/wm]
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL top value
|
||||
; Used for top aligned bars
|
||||
margin-bottom = 0
|
||||
|
||||
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
|
||||
; Used for bottom aligned bars
|
||||
margin-top = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; File Inclusion
|
||||
; include an external file, like module file, etc.
|
||||
|
||||
include-file = ~/.config/polybar/colorblocks/bars.ini
|
||||
include-file = ~/.config/polybar/colorblocks/colors.ini
|
||||
include-file = ~/.config/polybar/colorblocks/modules.ini
|
||||
include-file = ~/.config/polybar/colorblocks/user_modules.ini
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Bar Settings
|
||||
|
||||
[bar/main]
|
||||
; Use either of the following command to list available outputs:
|
||||
; If unspecified, the application will pick the first one it finds.
|
||||
; $ polybar -m | cut -d ':' -f 1
|
||||
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
|
||||
monitor =
|
||||
|
||||
; Use the specified monitor as a fallback if the main one is not found.
|
||||
monitor-fallback =
|
||||
|
||||
; Require the monitor to be in connected state
|
||||
; XRandR sometimes reports my monitor as being disconnected (when in use)
|
||||
monitor-strict = false
|
||||
|
||||
; Tell the Window Manager not to configure the window.
|
||||
; Use this to detach the bar if your WM is locking its size/position.
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = true
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
; When false, the center position will be based on the size of the other blocks.
|
||||
fixed-center = true
|
||||
|
||||
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
|
||||
width = 99%
|
||||
height = 40
|
||||
|
||||
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
; the percentage can optionally be extended with a pixel offset like so:
|
||||
; 50%:-10, this will result in an offset in the x or y direction
|
||||
; of 50% minus 10 pixels
|
||||
offset-x = 0.5%
|
||||
offset-y = 1%
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${color.alpha}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${color.foreground}
|
||||
|
||||
; Background gradient (vertical steps)
|
||||
; background-[0-9]+ = #aarrggbb
|
||||
;;background-0 =
|
||||
|
||||
; Value used for drawing rounded corners
|
||||
; Note: This shouldn't be used together with border-size because the border
|
||||
; doesn't get rounded
|
||||
; Individual top/bottom values can be defined using:
|
||||
; radius-{top,bottom}
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
; Under-/overline pixel size and argb color
|
||||
; Individual values can be defined using:
|
||||
; {overline,underline}-size
|
||||
; {overline,underline}-color
|
||||
underline-size = 2
|
||||
underline-color = ${color.foreground}
|
||||
|
||||
; Values applied to all borders
|
||||
; Individual side values can be defined using:
|
||||
; border-{left,top,right,bottom}-size
|
||||
; border-{left,top,right,bottom}-color
|
||||
; The top and bottom borders are added to the bar height, so the effective
|
||||
; window height is:
|
||||
; height + border-top-size + border-bottom-size
|
||||
; Meanwhile the effective window width is defined entirely by the width key and
|
||||
; the border is placed withing this area. So you effectively only have the
|
||||
; following horizontal space on the bar:
|
||||
; width - border-right-size - border-left-size
|
||||
border-size = 0
|
||||
border-color = ${color.background}
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; Fonts are defined using <font-name>;<vertical-offset>
|
||||
; Font names are specified using a fontconfig pattern.
|
||||
; font-0 = NotoSans-Regular:size=8;2
|
||||
; font-1 = MaterialIcons:size=10
|
||||
; font-2 = Termsynu:size=8;-1
|
||||
; font-3 = FontAwesome:size=10
|
||||
; See the Fonts wiki page for more details
|
||||
|
||||
font-0 = "Iosevka Nerd Font:pixelsize=10;4"
|
||||
font-1 = "Iosevka Nerd Font:pixelsize=13;4"
|
||||
|
||||
; Modules are added to one of the available blocks
|
||||
; modules-left = cpu ram
|
||||
; modules-center = xwindow xbacklight
|
||||
; modules-right = ipc clock
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[bar/top]
|
||||
inherit = bar/main
|
||||
modules-left = menu sep title sep google github reddit gmail twitter
|
||||
modules-right = updates temperature filesystem keyboard pulseaudio backlight sep powermenu
|
||||
enable-ipc = true
|
||||
|
||||
[bar/mid]
|
||||
offset-y = 62
|
||||
inherit = bar/main
|
||||
modules-center = cpu_bar sep memory_bar sep filesystem_bar sep mpd_bar sep battery_bar sep volume sep brightness
|
||||
enable-ipc = true
|
||||
|
||||
[bar/bottom]
|
||||
inherit = bar/main
|
||||
offset-y = 114
|
||||
modules-left = launcher sep workspaces sep mpd
|
||||
modules-center =
|
||||
modules-right = color-switch sep cpu memory alsa battery network date sep sysmenu
|
||||
enable-ipc = true
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
; Value to be used to set the WM_NAME atom
|
||||
; If the value is empty or undefined, the atom value
|
||||
; will be created from the following template: polybar-[BAR]_[MONITOR]
|
||||
; NOTE: The placeholders are not available for custom values
|
||||
wm-name =
|
||||
|
||||
; Locale used to localize various module data (e.g. date)
|
||||
; Expects a valid libc locale, for example: sv_SE.UTF-8
|
||||
locale =
|
||||
|
||||
; Position of the system tray window
|
||||
; If empty or undefined, tray support will be disabled
|
||||
; NOTE: A center aligned tray will cover center aligned modules
|
||||
;
|
||||
; Available positions:
|
||||
; left
|
||||
; center
|
||||
; right
|
||||
; none
|
||||
tray-position = none
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
; Background color for the tray container
|
||||
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
; By default the tray container will use the bar
|
||||
; background color.
|
||||
tray-background = ${color.background}
|
||||
|
||||
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
; Restack the bar window and put it above the
|
||||
; selected window manager's root
|
||||
;
|
||||
; Fixes the issue where the bar is being drawn
|
||||
; on top of fullscreen window's
|
||||
;
|
||||
; Currently supported WM's:
|
||||
; bspwm
|
||||
; i3 (requires: `override-redirect = true`)
|
||||
;;wm-restack =
|
||||
|
||||
; Set a DPI values used when rendering text
|
||||
; This only affects scalable fonts
|
||||
; dpi =
|
||||
|
||||
; Enable support for inter-process messaging
|
||||
; See the Messaging wiki page for more details.
|
||||
;enable-ipc = true
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
click-left =
|
||||
click-middle =
|
||||
click-right =
|
||||
scroll-up =
|
||||
scroll-down =
|
||||
double-click-left =
|
||||
double-click-middle =
|
||||
double-click-right =
|
||||
|
||||
; Requires polybar to be built with xcursor support (xcb-util-cursor)
|
||||
; Possible values are:
|
||||
; - default : The default pointer as before, can also be an empty string (default)
|
||||
; - pointer : Typically in the form of a hand
|
||||
; - ns-resize : Up and down arrows, can be used to indicate scrolling
|
||||
cursor-click =
|
||||
cursor-scroll =
|
||||
|
||||
;; WM Workspace Specific
|
||||
|
||||
; bspwm
|
||||
;;scroll-up = bspwm-desknext
|
||||
;;scroll-down = bspwm-deskprev
|
||||
;;scroll-up = bspc desktop -f prev.local
|
||||
;;scroll-down = bspc desktop -f next.local
|
||||
|
||||
;i3
|
||||
;;scroll-up = i3wm-wsnext
|
||||
;;scroll-down = i3wm-wsprev
|
||||
;;scroll-up = i3-msg workspace next_on_output
|
||||
;;scroll-down = i3-msg workspace prev_on_output
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
;; Application Settings
|
||||
|
||||
[settings]
|
||||
; The throttle settings lets the eventloop swallow up til X events
|
||||
; if they happen within Y millisecond after first event was received.
|
||||
; This is done to prevent flood of update event.
|
||||
;
|
||||
; For example if 5 modules emit an update event at the same time, we really
|
||||
; just care about the last one. But if we wait too long for events to swallow
|
||||
; the bar would appear sluggish so we continue if timeout
|
||||
; expires or limit is reached.
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
|
||||
; Time in milliseconds that the input handler will wait between processing events
|
||||
;throttle-input-for = 30
|
||||
|
||||
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
|
||||
screenchange-reload = false
|
||||
|
||||
; Compositing operators
|
||||
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
|
||||
compositing-background = source
|
||||
compositing-foreground = over
|
||||
compositing-overline = over
|
||||
compositing-underline = over
|
||||
compositing-border = over
|
||||
|
||||
; Define fallback values used by all module formats
|
||||
;format-foreground =
|
||||
;format-background =
|
||||
;format-underline =
|
||||
;format-overline =
|
||||
;format-spacing =
|
||||
;format-padding =
|
||||
;format-margin =
|
||||
;format-offset =
|
||||
|
||||
; Enables pseudo-transparency for the bar
|
||||
; If set to true the bar can be transparent without a compositor.
|
||||
pseudo-transparency = false
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
14
home/linux/gui/i3/conf/polybar/colorblocks/preview.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$HOME/.config/polybar/colorblocks"
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch the preview bar
|
||||
polybar -q top -c "$DIR"/preview.ini &
|
||||
polybar -q mid -c "$DIR"/preview.ini &
|
||||
polybar -q bottom -c "$DIR"/preview.ini &
|
||||
117
home/linux/gui/i3/conf/polybar/colorblocks/scripts/checkupdates
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/bash
|
||||
#
|
||||
# checkupdates: Safely print a list of pending updates.
|
||||
#
|
||||
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
declare -r myname='checkupdates'
|
||||
declare -r myver='1.0.0'
|
||||
|
||||
plain() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
msg() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
msg2() {
|
||||
(( QUIET )) && return
|
||||
local mesg=$1; shift
|
||||
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
|
||||
}
|
||||
|
||||
ask() {
|
||||
local mesg=$1; shift
|
||||
printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
|
||||
}
|
||||
|
||||
warning() {
|
||||
local mesg=$1; shift
|
||||
printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
|
||||
error() {
|
||||
local mesg=$1; shift
|
||||
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
|
||||
# check if messages are to be printed using color
|
||||
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
|
||||
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
|
||||
# prefer terminal safe colored and bold text when tput is supported
|
||||
if tput setaf 0 &>/dev/null; then
|
||||
ALL_OFF="$(tput sgr0)"
|
||||
BOLD="$(tput bold)"
|
||||
BLUE="${BOLD}$(tput setaf 4)"
|
||||
GREEN="${BOLD}$(tput setaf 2)"
|
||||
RED="${BOLD}$(tput setaf 1)"
|
||||
YELLOW="${BOLD}$(tput setaf 3)"
|
||||
else
|
||||
ALL_OFF="\e[1;0m"
|
||||
BOLD="\e[1;1m"
|
||||
BLUE="${BOLD}\e[1;34m"
|
||||
GREEN="${BOLD}\e[1;32m"
|
||||
RED="${BOLD}\e[1;31m"
|
||||
YELLOW="${BOLD}\e[1;33m"
|
||||
fi
|
||||
fi
|
||||
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
|
||||
|
||||
|
||||
if (( $# > 0 )); then
|
||||
echo "${myname} v${myver}"
|
||||
echo
|
||||
echo "Safely print a list of pending updates"
|
||||
echo
|
||||
echo "Usage: ${myname}"
|
||||
echo
|
||||
echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! type -P fakeroot >/dev/null; then
|
||||
error 'Cannot find the fakeroot binary.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $CHECKUPDATES_DB ]]; then
|
||||
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
|
||||
fi
|
||||
|
||||
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
|
||||
|
||||
DBPath="$(pacman-conf DBPath)"
|
||||
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
|
||||
DBPath="/var/lib/pacman/"
|
||||
fi
|
||||
|
||||
mkdir -p "$CHECKUPDATES_DB"
|
||||
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
|
||||
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
|
||||
error 'Cannot fetch updates'
|
||||
exit 1
|
||||
fi
|
||||
pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]'
|
||||
|
||||
exit 0
|
||||
|
||||
# vim: set noet:
|
||||
55
home/linux/gui/i3/conf/polybar/colorblocks/scripts/color-switch.sh
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SDIR="$HOME/.config/polybar/colorblocks/scripts"
|
||||
|
||||
# Launch Rofi
|
||||
MENU="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '' \
|
||||
-theme $SDIR/rofi/styles.rasi \
|
||||
<<< "♥ amber|♥ blue|♥ blue-gray|♥ brown|♥ cyan|♥ deep-orange|\
|
||||
♥ deep-purple|♥ green|♥ gray|♥ indigo|♥ blue-light|♥ green-light|\
|
||||
♥ lime|♥ orange|♥ pink|♥ purple|♥ red|♥ teal|♥ yellow|♥ amber-dark|\
|
||||
♥ blue-dark|♥ blue-gray-dark|♥ brown-dark|♥ cyan-dark|♥ deep-orange-dark|\
|
||||
♥ deep-purple-dark|♥ green-dark|♥ gray-dark|♥ indigo-dark|♥ blue-light-dark|\
|
||||
♥ green-light-dark|♥ lime-dark|♥ orange-dark|♥ pink-dark|♥ purple-dark|♥ red-dark|♥ teal-dark|♥ yellow-dark|")"
|
||||
case "$MENU" in
|
||||
## Light Colors
|
||||
*amber) "$SDIR"/colors-light.sh --amber ;;
|
||||
*blue) "$SDIR"/colors-light.sh --blue ;;
|
||||
*blue-gray) "$SDIR"/colors-light.sh --blue-gray ;;
|
||||
*brown) "$SDIR"/colors-light.sh --brown ;;
|
||||
*cyan) "$SDIR"/colors-light.sh --cyan ;;
|
||||
*deep-orange) "$SDIR"/colors-light.sh --deep-orange ;;
|
||||
*deep-purple) "$SDIR"/colors-light.sh --deep-purple ;;
|
||||
*green) "$SDIR"/colors-light.sh --green ;;
|
||||
*gray) "$SDIR"/colors-light.sh --gray ;;
|
||||
*indigo) "$SDIR"/colors-light.sh --indigo ;;
|
||||
*blue-light) "$SDIR"/colors-light.sh --light-blue ;;
|
||||
*green-light) "$SDIR"/colors-light.sh --light-green ;;
|
||||
*lime) "$SDIR"/colors-light.sh --lime ;;
|
||||
*orange) "$SDIR"/colors-light.sh --orange ;;
|
||||
*pink) "$SDIR"/colors-light.sh --pink ;;
|
||||
*purple) "$SDIR"/colors-light.sh --purple ;;
|
||||
*red) "$SDIR"/colors-light.sh --red ;;
|
||||
*teal) "$SDIR"/colors-light.sh --teal ;;
|
||||
*yellow) "$SDIR"/colors-light.sh --yellow ;;
|
||||
## Dark Colors
|
||||
*amber-dark) "$SDIR"/colors-dark.sh --amber ;;
|
||||
*blue-dark) "$SDIR"/colors-dark.sh --blue ;;
|
||||
*blue-gray-dark) "$SDIR"/colors-dark.sh --blue-gray ;;
|
||||
*brown-dark) "$SDIR"/colors-dark.sh --brown ;;
|
||||
*cyan-dark) "$SDIR"/colors-dark.sh --cyan ;;
|
||||
*deep-orange-dark) "$SDIR"/colors-dark.sh --deep-orange ;;
|
||||
*deep-purple-dark) "$SDIR"/colors-dark.sh --deep-purple ;;
|
||||
*green-dark) "$SDIR"/colors-dark.sh --green ;;
|
||||
*gray-dark) "$SDIR"/colors-dark.sh --gray ;;
|
||||
*indigo-dark) "$SDIR"/colors-dark.sh --indigo ;;
|
||||
*blue-light-dark) "$SDIR"/colors-dark.sh --light-blue ;;
|
||||
*green-light-dark) "$SDIR"/colors-dark.sh --light-green ;;
|
||||
*lime-dark) "$SDIR"/colors-dark.sh --lime ;;
|
||||
*orange-dark) "$SDIR"/colors-dark.sh --orange ;;
|
||||
*pink-dark) "$SDIR"/colors-dark.sh --pink ;;
|
||||
*purple-dark) "$SDIR"/colors-dark.sh --purple ;;
|
||||
*red-dark) "$SDIR"/colors-dark.sh --red ;;
|
||||
*teal-dark) "$SDIR"/colors-dark.sh --teal ;;
|
||||
*yellow-dark) "$SDIR"/colors-dark.sh --yellow
|
||||
esac
|
||||
143
home/linux/gui/i3/conf/polybar/colorblocks/scripts/colors-dark.sh
Executable file
@@ -0,0 +1,143 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Color files
|
||||
PFILE="$HOME/.config/polybar/colorblocks/colors.ini"
|
||||
RFILE="$HOME/.config/polybar/colorblocks/scripts/rofi/colors.rasi"
|
||||
|
||||
# Change colors
|
||||
change_color() {
|
||||
# polybar
|
||||
sed -i -e 's/background = #.*/background = #141C21/g' $PFILE
|
||||
sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE
|
||||
sed -i -e 's/foreground-alt = #.*/foreground-alt = #FFFFFF/g' $PFILE
|
||||
sed -i -e "s/shade1 = #.*/shade1 = $SH1/g" $PFILE
|
||||
sed -i -e "s/shade2 = #.*/shade2 = $SH2/g" $PFILE
|
||||
sed -i -e "s/shade3 = #.*/shade3 = $SH3/g" $PFILE
|
||||
sed -i -e "s/shade4 = #.*/shade4 = $SH4/g" $PFILE
|
||||
sed -i -e "s/shade5 = #.*/shade5 = $SH5/g" $PFILE
|
||||
sed -i -e "s/shade6 = #.*/shade6 = $SH6/g" $PFILE
|
||||
sed -i -e "s/shade7 = #.*/shade7 = $SH7/g" $PFILE
|
||||
sed -i -e "s/shade8 = #.*/shade8 = $SH8/g" $PFILE
|
||||
|
||||
# rofi
|
||||
cat > $RFILE <<- EOF
|
||||
/* colors */
|
||||
|
||||
* {
|
||||
al: #00000000;
|
||||
bg: #141C21FF;
|
||||
bg1: ${SH8}FF;
|
||||
bg2: ${SH7}FF;
|
||||
bg3: ${SH6}FF;
|
||||
fg: #FFFFFFFF;
|
||||
}
|
||||
EOF
|
||||
|
||||
polybar-msg cmd restart
|
||||
}
|
||||
|
||||
if [[ $1 = "--amber" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#FF6F00" SH2="#FF8F00" SH3="#FFA000" SH4="#FFB300"
|
||||
SH5="#FFC107" SH6="#FFCA28" SH7="#FFD54F" SH8="#FFE082"
|
||||
change_color
|
||||
elif [[ $1 = "--blue" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#0D47A1" SH2="#1565C0" SH3="#1976D2" SH4="#1E88E5"
|
||||
SH5="#2196F3" SH6="#42A5F5" SH7="#64B5F6" SH8="#90CAF9"
|
||||
change_color
|
||||
elif [[ $1 = "--blue-gray" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#263238" SH2="#37474F" SH3="#455A64" SH4="#546E7A"
|
||||
SH5="#607D8B" SH6="#78909C" SH7="#90A4AE" SH8="#B0BEC5"
|
||||
change_color
|
||||
elif [[ $1 = "--brown" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#3E2723" SH2="#4E342E" SH3="#5D4037" SH4="#6D4C41"
|
||||
SH5="#795548" SH6="#8D6E63" SH7="#A1887F" SH8="#BCAAA4"
|
||||
change_color
|
||||
elif [[ $1 = "--cyan" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#006064" SH2="#00838F" SH3="#0097A7" SH4="#00ACC1"
|
||||
SH5="#00BCD4" SH6="#26C6DA" SH7="#4DD0E1" SH8="#80DEEA"
|
||||
change_color
|
||||
elif [[ $1 = "--deep-orange" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#BF360C" SH2="#D84315" SH3="#E64A19" SH4="#F4511E"
|
||||
SH5="#FF5722" SH6="#FF7043" SH7="#FF8A65" SH8="#FFAB91"
|
||||
change_color
|
||||
elif [[ $1 = "--deep-purple" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#311B92" SH2="#4527A0" SH3="#512DA8" SH4="#5E35B1"
|
||||
SH5="#673AB7" SH6="#7E57C2" SH7="#9575CD" SH8="#B39DDB"
|
||||
change_color
|
||||
elif [[ $1 = "--green" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#1B5E20" SH2="#2E7D32" SH3="#388E3C" SH4="#43A047"
|
||||
SH5="#4CAF50" SH6="#66BB6A" SH7="#81C784" SH8="#A5D6A7"
|
||||
change_color
|
||||
elif [[ $1 = "--gray" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#212121" SH2="#424242" SH3="#616161" SH4="#757575"
|
||||
SH5="#9E9E9E" SH6="#BDBDBD" SH7="#D4D4D4" SH8="#EEEEEE"
|
||||
change_color
|
||||
elif [[ $1 = "--indigo" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#1A237E" SH2="#283593" SH3="#303F9F" SH4="#3949AB"
|
||||
SH5="#3F51B5" SH6="#5C6BC0" SH7="#7986CB" SH8="#9FA8DA"
|
||||
change_color
|
||||
elif [[ $1 = "--light-blue" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#01579B" SH2="#0277BD" SH3="#0288D1" SH4="#039BE5"
|
||||
SH5="#03A9F4" SH6="#29B6F6" SH7="#4FC3F7" SH8="#81D4FA"
|
||||
change_color
|
||||
elif [[ $1 = "--light-green" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#33691E" SH2="#558B2F" SH3="#689F38" SH4="#7CB342"
|
||||
SH5="#8BC34A" SH6="#9CCC65" SH7="#AED581" SH8="#C5E1A5"
|
||||
change_color
|
||||
elif [[ $1 = "--lime" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#827717" SH2="#9E9D24" SH3="#AFB42B" SH4="#C0CA33"
|
||||
SH5="#CDDC39" SH6="#D4E157" SH7="#DCE775" SH8="#E6EE9C"
|
||||
change_color
|
||||
elif [[ $1 = "--orange" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#E65100" SH2="#EF6C00" SH3="#F57C00" SH4="#FB8C00"
|
||||
SH5="#FF9800" SH6="#FFA726" SH7="#FFB74D" SH8="#FFCC80"
|
||||
change_color
|
||||
elif [[ $1 = "--pink" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#880E4F" SH2="#AD1457" SH3="#C2185B" SH4="#D81B60"
|
||||
SH5="#E91E63" SH6="#EC407A" SH7="#F06292" SH8="#F48FB1"
|
||||
change_color
|
||||
elif [[ $1 = "--purple" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#4A148C" SH2="#6A1B9A" SH3="#7B1FA2" SH4="#8E24AA"
|
||||
SH5="#9C27B0" SH6="#AB47BC" SH7="#BA68C8" SH8="#CE93D8"
|
||||
change_color
|
||||
elif [[ $1 = "--red" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#B71C1C" SH2="#C62828" SH3="#D32F2F" SH4="#E53935"
|
||||
SH5="#EE413D" SH6="#EF5350" SH7="#E57373" SH8="#EF9A9A"
|
||||
change_color
|
||||
elif [[ $1 = "--teal" ]]; then
|
||||
FG="#F5F5F5"
|
||||
SH1="#004D40" SH2="#00695C" SH3="#00796B" SH4="#00897B"
|
||||
SH5="#009688" SH6="#26A69A" SH7="#4DB6AC" SH8="#80CBC4"
|
||||
change_color
|
||||
elif [[ $1 = "--yellow" ]]; then
|
||||
FG="#141C21"
|
||||
SH1="#F57F17" SH2="#F9A825" SH3="#FBC02D" SH4="#FDD835"
|
||||
SH5="#FFEB3B" SH6="#FFEE58" SH7="#FFF176" SH8="#FFF59D"
|
||||
change_color
|
||||
else
|
||||
cat <<- _EOF_
|
||||
No option specified, Available options:
|
||||
--amber --blue --blue-gray --brown
|
||||
--cyan --deep-orange --deep-purple --green
|
||||
--gray --indigo --light-blue --light-green
|
||||
--lime --orange --pink --purple
|
||||
--red --teal --yellow
|
||||
_EOF_
|
||||
fi
|
||||