Compare commits
4 commits
2a92cc7270
...
ca7ccf8dc8
Author | SHA1 | Date | |
---|---|---|---|
ca7ccf8dc8 | |||
a9bd6c5fda | |||
e5d1aa8634 | |||
c14db34fb6 |
61
flake.lock
|
@ -152,6 +152,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"headscale": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701336075,
|
||||
"narHash": "sha256-1AN5KGL42BwBNkJMjS2ZDcd/CT/AtH1BkT+azHMI5NY=",
|
||||
"owner": "kradalby",
|
||||
"repo": "headscale",
|
||||
"rev": "bbb4c357268998fd02780b7f8f2013f76e3ab80a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kradalby",
|
||||
"repo": "headscale",
|
||||
"rev": "bbb4c357268998fd02780b7f8f2013f76e3ab80a",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -431,12 +455,14 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"ewwtilities": "ewwtilities",
|
||||
"headscale": "headscale",
|
||||
"home-manager": "home-manager",
|
||||
"kmonad": "kmonad",
|
||||
"nicks_nextcloud_integrations": "nicks_nextcloud_integrations",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixvim": "nixvim"
|
||||
"nixvim": "nixvim",
|
||||
"utils": "utils_2"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -537,6 +563,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
|
@ -551,6 +592,24 @@
|
|||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
53
flake.nix
|
@ -2,11 +2,19 @@
|
|||
description = "Nick's NixOS Configuration";
|
||||
|
||||
inputs = {
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/release-23.05";
|
||||
kmonad.url = "github:kmonad/kmonad?dir=nix";
|
||||
|
||||
headscale = {
|
||||
url = "github:kradalby/headscale/bbb4c357268998fd02780b7f8f2013f76e3ab80a";
|
||||
# url = "github:juanfont/headscale"; # Real repo
|
||||
inputs."flake-utils".follows = "utils";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nicks_nextcloud_integrations.url = "git+https://git.nickiel.net/Nickiel/nicks_nextcloud_integrations.git";
|
||||
ewwtilities.url = "git+https://git.nickiel.net/Nickiel/Ewwtilities.git";
|
||||
|
||||
|
@ -18,12 +26,29 @@
|
|||
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, nixpkgs-stable, home-manager, ewwtilities, kmonad, ... }:
|
||||
outputs = inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
headscale,
|
||||
home-manager,
|
||||
ewwtilities,
|
||||
kmonad,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = "nixolas";
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
headscale.overlay
|
||||
];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
@ -31,16 +56,14 @@
|
|||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit inputs home-manager user kmonad;
|
||||
inherit lib;
|
||||
|
||||
|
||||
# Home server
|
||||
Alaska = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit user;
|
||||
pkgs-stable = inputs.nixpkgs-stable;
|
||||
inherit user pkgs pkgs-stable;
|
||||
};
|
||||
|
||||
modules = [
|
||||
|
@ -55,11 +78,7 @@
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit user ewwtilities;
|
||||
pkgs-stable = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit user ewwtilities pkgs-stable;
|
||||
};
|
||||
users.${user} = {
|
||||
imports = [
|
||||
|
@ -76,7 +95,7 @@
|
|||
NicksNixLaptop = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit user;
|
||||
inherit user pkgs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
|
@ -92,11 +111,7 @@
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit user ewwtilities;
|
||||
pkgs-stable = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit user ewwtilities pkgs-stable;
|
||||
};
|
||||
users.${user} = {
|
||||
imports = [
|
||||
|
@ -128,11 +143,7 @@
|
|||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit user ewwtilities;
|
||||
pkgs-stable = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit user ewwtilities pkgs-stable;
|
||||
};
|
||||
users.${user} = {
|
||||
imports = [
|
||||
|
|
26
home.nix
|
@ -3,10 +3,11 @@
|
|||
|
||||
let
|
||||
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
||||
nixpkgs = import <nixpkgs> {
|
||||
rustpkgs = import pkgs {
|
||||
overlays = [ moz_overlay ];
|
||||
};
|
||||
ruststable = (nixpkgs.latest.rustChannels.stable.rust.override {
|
||||
|
||||
ruststable = (rustpkgs.latest.rustChannels.stable.rust.override {
|
||||
extensions = [ "rust-src" "rust-analysis" ];}
|
||||
);
|
||||
|
||||
|
@ -14,13 +15,6 @@ let
|
|||
"Alaska"
|
||||
];
|
||||
|
||||
awesome-wm-widgets = pkgs.fetchFromGitHub {
|
||||
owner = "streetturtle";
|
||||
repo = "awesome-wm-widgets";
|
||||
rev = "ef70d16c43c2f566a4fe2955b8d6c08f6c185af8";
|
||||
sha256 = "td9uE+b3DrE+JJ3NCmIkQAuxJLJCGd79J5LZLqBw9KI=";
|
||||
};
|
||||
|
||||
install_packages = with pkgs; [
|
||||
# (pkgs.callPackage ./modules/minecraft-bedrock/minecraft-bedrock-server.nix {}) # the possible minecraft-bedrock-server package for testing
|
||||
# utilities
|
||||
|
@ -68,8 +62,7 @@ let
|
|||
pkgs-stable.kicad # PCB design
|
||||
krita # Raster drawing
|
||||
pkgs-stable.libreoffice-fresh # Office editing
|
||||
pkgs-stable.makemkv # blue-ray + dvd -> mkv
|
||||
pkgs-stable.obsidian # Markdown and notes
|
||||
makemkv # blue-ray + dvd -> mkv
|
||||
qalculate-gtk # unit-friendly calculator
|
||||
qlcplus # LED xlr control program
|
||||
signal-desktop # secure messaging service
|
||||
|
@ -117,17 +110,6 @@ in
|
|||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
home = {
|
||||
file = {
|
||||
".config/awesome" = {
|
||||
source = ./rsrcs/awesome;
|
||||
recursive = true;
|
||||
};
|
||||
".config/awesome/cpu-widget.lua".source = "${awesome-wm-widgets}/cpu-widget/cpu-widget.lua";
|
||||
".config/awesome/ram-widget.lua".source = "${awesome-wm-widgets}/ram-widget/ram-widget.lua";
|
||||
".config/awesome/batteryarc.lua".source = "${awesome-wm-widgets}/batteryarc-widget/batteryarc.lua";
|
||||
".config/awesome/awesome-wm-widgets/spaceman.jpg".source = "${awesome-wm-widgets}/batteryarc-widget/spaceman.jpg";
|
||||
".config/awesome/calendar.lua".source = "${awesome-wm-widgets}/calendar-widget/batteryarc.lua";
|
||||
};
|
||||
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
|
|
|
@ -37,13 +37,6 @@
|
|||
|
||||
desktopManager.plasma5.enable = true;
|
||||
displayManager.defaultSession = "plasma";
|
||||
windowManager.awesome = {
|
||||
enable = true;
|
||||
luaModules = with pkgs.luaPackages; [
|
||||
vicious
|
||||
luarocks # is the package manager for Lua modules
|
||||
];
|
||||
};
|
||||
|
||||
displayManager.sddm.enable = true;
|
||||
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port 11100];
|
||||
allowedTCPPorts = [ 11100 ];
|
||||
};
|
||||
|
||||
nameservers = ["10.0.0.183" "1.1.1.1"];
|
||||
|
|
|
@ -11,6 +11,7 @@ let
|
|||
env = XDG_SESSION_TYPE,wayland
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
env = SIGNAL_USE_WAYLAND,1
|
||||
''
|
||||
else if (hostname == "NicksNixLaptop") then ''
|
||||
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="audio-volume-high-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="audio-volume-low-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="audio-volume-medium-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.4 KiB |
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="audio-volume-muted-symbolic.svg">
|
||||
<metadata
|
||||
id="metadata30">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1215"
|
||||
inkscape:window-height="776"
|
||||
id="namedview28"
|
||||
showgrid="true"
|
||||
inkscape:zoom="38.125"
|
||||
inkscape:cx="3.4229508"
|
||||
inkscape:cy="7.947541"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
showguides="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4158" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs4" />
|
||||
<path
|
||||
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
|
||||
id="path18"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
<path
|
||||
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
|
||||
id="path20"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#bebebe"
|
||||
sodipodi:nodetypes="ssssccs" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
|
||||
id="path4508"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
|
||||
id="path4529"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
|
||||
id="path4569"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccscccc" />
|
||||
</svg>
|
Before Width: | Height: | Size: 3.5 KiB |
|
@ -1,2 +0,0 @@
|
|||
for i in *.jpg; do ffmpeg -i "$i" "${i%.*}.png"; done
|
||||
for i in *.png; do ffmpeg -i "$i" -map_metadata -1 "${i%.*}.jpg"; done
|
|
@ -1,17 +0,0 @@
|
|||
local p = require 'dbus_proxy'
|
||||
|
||||
local dbus = {}
|
||||
|
||||
dbus.proxy = p.Proxy:new(
|
||||
{
|
||||
bus = p.Bus.SESSION,
|
||||
name = "org.awesome.galaxymenu",
|
||||
interface = "org.awsome.galaxymenu",
|
||||
path = "/org/awsome/galaxymenu/Main"
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
dbus.callback = function () {
|
||||
|
||||
}
|
|
@ -1,240 +0,0 @@
|
|||
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
|
||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||
-- Enable hotkeys help widget for VIM and other apps
|
||||
-- when client with a matching name is opened:
|
||||
require("awful.hotkeys_popup.keys")
|
||||
|
||||
-- Default modkey.
|
||||
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
||||
-- If you do not like this or do not have such a key,
|
||||
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
||||
-- However, you can use another modifier like Mod1, but it may interact with others.
|
||||
modkey = "Mod4"
|
||||
|
||||
local key_conf = {}
|
||||
|
||||
-- {{{ Key bindings
|
||||
key_conf.globalkeys = gears.table.join(
|
||||
|
||||
-- misc hotkeys
|
||||
awful.key({modkey, }, "z", function() awful.spawn.with_shell("rofi -show run") end,
|
||||
{description = "launch rofi run window", group="launcher"}),
|
||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||
{description="show help", group="awesome"}),
|
||||
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||
{description = "view previous", group = "tag"}),
|
||||
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||
{description = "view next", group = "tag"}),
|
||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
||||
{description = "go back", group = "tag"}),
|
||||
awful.key({ modkey, "Control" }, "l", function() awful.spawn.with_shell("/usr/bin/i3lock-fancy") end,
|
||||
{description = "Lock the computer with i3lock-fancy", group="awesome"}),
|
||||
|
||||
-- focusing hotkeys
|
||||
awful.key({ modkey, }, "j",
|
||||
function ()
|
||||
awful.client.focus.byidx( 1)
|
||||
end,
|
||||
{description = "focus next by index", group = "client"}
|
||||
),
|
||||
awful.key({ modkey, }, "k",
|
||||
function ()
|
||||
awful.client.focus.byidx(-1)
|
||||
end,
|
||||
{description = "focus previous by index", group = "client"}
|
||||
),
|
||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||
{description = "show main menu", group = "awesome"}),
|
||||
|
||||
-- Layout manipulation
|
||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||
{description = "swap with next client by index", group = "client"}),
|
||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||
{description = "swap with previous client by index", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
|
||||
{description = "focus the next screen", group = "screen"}),
|
||||
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
|
||||
{description = "focus the previous screen", group = "screen"}),
|
||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||
{description = "jump to urgent client", group = "client"}),
|
||||
awful.key({ modkey, }, "Tab",
|
||||
function ()
|
||||
awful.client.focus.history.previous()
|
||||
if client.focus then
|
||||
client.focus:raise()
|
||||
end
|
||||
end,
|
||||
{description = "go back", group = "client"}),
|
||||
|
||||
-- Standard program
|
||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||
{description = "open a terminal", group = "launcher"}),
|
||||
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||
{description = "reload awesome", group = "awesome"}),
|
||||
-- awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||
-- {description = "quit awesome", group = "awesome"}),
|
||||
|
||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
|
||||
{description = "increase master width factor", group = "layout"}),
|
||||
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
|
||||
{description = "decrease master width factor", group = "layout"}),
|
||||
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
|
||||
{description = "increase the number of master clients", group = "layout"}),
|
||||
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
|
||||
{description = "decrease the number of master clients", group = "layout"}),
|
||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
|
||||
{description = "increase the number of columns", group = "layout"}),
|
||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
|
||||
{description = "decrease the number of columns", group = "layout"}),
|
||||
awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
|
||||
{description = "select next", group = "layout"}),
|
||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||
{description = "select previous", group = "layout"}),
|
||||
|
||||
awful.key({ modkey, "Control" }, "n",
|
||||
function ()
|
||||
local c = awful.client.restore()
|
||||
-- Focus restored client
|
||||
if c then
|
||||
c:emit_signal(
|
||||
"request::activate", "key.unminimize", {raise = true}
|
||||
)
|
||||
end
|
||||
end,
|
||||
{description = "restore minimized", group = "client"}),
|
||||
|
||||
-- Prompt
|
||||
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||
{description = "run prompt", group = "launcher"}),
|
||||
|
||||
awful.key({ modkey }, "x",
|
||||
function ()
|
||||
awful.prompt.run {
|
||||
prompt = "Run Lua code: ",
|
||||
textbox = awful.screen.focused().mypromptbox.widget,
|
||||
exe_callback = awful.util.eval,
|
||||
history_path = awful.util.get_cache_dir() .. "/history_eval"
|
||||
}
|
||||
end,
|
||||
{description = "lua execute prompt", group = "awesome"})
|
||||
-- Menubar
|
||||
--awful.key({ modkey }, "p", function() menubar.show() end,
|
||||
-- {description = "show the menubar", group = "launcher"})
|
||||
)
|
||||
|
||||
key_conf.clientkeys = gears.table.join(
|
||||
awful.key({ modkey, }, "f",
|
||||
function (c)
|
||||
c.fullscreen = not c.fullscreen
|
||||
c:raise()
|
||||
end,
|
||||
{description = "toggle fullscreen", group = "client"}),
|
||||
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
|
||||
{description = "defenstrate", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
|
||||
{description = "toggle floating", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
|
||||
{description = "move to master", group = "client"}),
|
||||
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||
{description = "move to screen", group = "client"}),
|
||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
||||
{description = "toggle keep on top", group = "client"}),
|
||||
awful.key({ modkey, }, "n",
|
||||
function (c)
|
||||
-- The client currently has the input focus, so it cannot be
|
||||
-- minimized, since minimized clients can't have the focus.
|
||||
c.minimized = true
|
||||
end ,
|
||||
{description = "minimize", group = "client"}),
|
||||
awful.key({ modkey, }, "m",
|
||||
function (c)
|
||||
c.maximized = not c.maximized
|
||||
c:raise()
|
||||
end ,
|
||||
{description = "(un)maximize", group = "client"}),
|
||||
awful.key({ modkey, "Control" }, "m",
|
||||
function (c)
|
||||
c.maximized_vertical = not c.maximized_vertical
|
||||
c:raise()
|
||||
end ,
|
||||
{description = "(un)maximize vertically", group = "client"}),
|
||||
awful.key({ modkey, "Shift" }, "m",
|
||||
function (c)
|
||||
c.maximized_horizontal = not c.maximized_horizontal
|
||||
c:raise()
|
||||
end ,
|
||||
{description = "(un)maximize horizontally", group = "client"})
|
||||
)
|
||||
|
||||
-- Bind all key numbers to tags.
|
||||
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||
for i = 1, 9 do
|
||||
key_conf.globalkeys = gears.table.join(key_conf.globalkeys,
|
||||
-- View tag only.
|
||||
awful.key({ modkey }, "#" .. i + 9,
|
||||
function ()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
end
|
||||
end,
|
||||
{description = "view tag #"..i, group = "tag"}),
|
||||
-- Toggle tag display.
|
||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||
function ()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then
|
||||
awful.tag.viewtoggle(tag)
|
||||
end
|
||||
end,
|
||||
{description = "toggle tag #" .. i, group = "tag"}),
|
||||
-- Move client to tag.
|
||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
||||
function ()
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[i]
|
||||
if tag then
|
||||
client.focus:move_to_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
{description = "move focused client to tag #"..i, group = "tag"}),
|
||||
-- Toggle tag on focused client.
|
||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||
function ()
|
||||
if client.focus then
|
||||
local tag = client.focus.screen.tags[i]
|
||||
if tag then
|
||||
client.focus:toggle_tag(tag)
|
||||
end
|
||||
end
|
||||
end,
|
||||
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
||||
)
|
||||
end
|
||||
|
||||
key_conf.clientbuttons = gears.table.join(
|
||||
awful.button({ }, 1, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
end),
|
||||
awful.button({ modkey }, 1, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
awful.mouse.client.move(c)
|
||||
end),
|
||||
awful.button({ modkey }, 3, function (c)
|
||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||
awful.mouse.client.resize(c)
|
||||
end)
|
||||
)
|
||||
|
||||
-- Set keys
|
||||
root.keys(key_conf.globalkeys)
|
||||
-- }}}
|
||||
|
||||
return key_conf
|
|
@ -1,290 +0,0 @@
|
|||
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local wibox = require("wibox")
|
||||
local menubar = require("menubar")
|
||||
local cpu_widget = require("cpu-widget")
|
||||
local battery_widget = require("batteryarc")
|
||||
local ram_widget = require("ram-widget")
|
||||
|
||||
-- Mod+p for a simple .desktop thing, probably not going to use
|
||||
local vicious = require("vicious")
|
||||
|
||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||
-- Enable hotkeys help widget for VIM and other apps
|
||||
-- when client with a matching name is opened:
|
||||
require("awful.hotkeys_popup.keys")
|
||||
|
||||
local menu_conf = {}
|
||||
|
||||
menu_conf.init = function(
|
||||
theme_dir, terminal, editor, editor_cmd)
|
||||
|
||||
beautiful.init(theme_dir)
|
||||
|
||||
-- {{{ Menu
|
||||
-- Create a launcher widget and a main menu
|
||||
myawesomemenu = {
|
||||
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
|
||||
{ "manual", terminal .. " -e man awesome" },
|
||||
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||
{ "restart", awesome.restart },
|
||||
{ "quit", function() awesome.quit() end },
|
||||
}
|
||||
|
||||
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||
{ "open terminal", terminal }
|
||||
}
|
||||
})
|
||||
|
||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||
menu = mymainmenu })
|
||||
|
||||
-- Menubar configuration
|
||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
||||
-- }}}
|
||||
|
||||
-- {{{ Wibar
|
||||
-- Create a textclock widget
|
||||
mytextclock = wibox.widget.background()
|
||||
mytextclock:set_widget(awful.widget.textclock())
|
||||
mytextclock:set_bg(beautiful.bg_normal)
|
||||
|
||||
|
||||
-- Create a wibox for each screen and add it
|
||||
local taglist_buttons = gears.table.join(
|
||||
awful.button({ }, 1, function(t) t:view_only() end),
|
||||
awful.button({ modkey }, 1, function(t)
|
||||
if client.focus then
|
||||
client.focus:move_to_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||
awful.button({ modkey }, 3, function(t)
|
||||
if client.focus then
|
||||
client.focus:toggle_tag(t)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
|
||||
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
|
||||
)
|
||||
|
||||
local tasklist_buttons = gears.table.join(
|
||||
awful.button({ }, 1, function (c)
|
||||
if c == client.focus then
|
||||
c.minimized = true
|
||||
else
|
||||
c:emit_signal(
|
||||
"request::activate",
|
||||
"tasklist",
|
||||
{raise = true}
|
||||
)
|
||||
end
|
||||
end),
|
||||
awful.button({ }, 3, function()
|
||||
awful.menu.client_list({ theme = { width = 250 } })
|
||||
end),
|
||||
awful.button({ }, 4, function ()
|
||||
awful.client.focus.byidx(1)
|
||||
end),
|
||||
awful.button({ }, 5, function ()
|
||||
awful.client.focus.byidx(-1)
|
||||
end))
|
||||
|
||||
local function set_wallpaper(s)
|
||||
-- Wallpaper
|
||||
if beautiful.wallpaper then
|
||||
local wallpaper = beautiful.wallpaper
|
||||
-- If wallpaper is a function, call it with the screen
|
||||
if type(wallpaper) == "function" then
|
||||
wallpaper = wallpaper(s)
|
||||
end
|
||||
gears.wallpaper.maximized(wallpaper, s, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
||||
screen.connect_signal("property::geometry", set_wallpaper)
|
||||
|
||||
awful.screen.connect_for_each_screen(function(s)
|
||||
-- Wallpaper
|
||||
set_wallpaper(s)
|
||||
|
||||
-- Each screen has its own tag table.
|
||||
awful.tag({ "1", "2", "3", "4", "5" }, s, awful.layout.layouts[1])
|
||||
|
||||
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
|
||||
-- We need one layoutbox per screen.
|
||||
local layoutbox = awful.widget.layoutbox(s)
|
||||
layoutbox:buttons(gears.table.join(
|
||||
awful.button({ }, 1, function () awful.layout.inc( 1) end),
|
||||
awful.button({ }, 3, function () awful.layout.inc(-1) end),
|
||||
awful.button({ }, 4, function () awful.layout.inc( 1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
|
||||
|
||||
s.mylayoutbox = wibox.widget.background()
|
||||
s.mylayoutbox:set_widget(layoutbox)
|
||||
s.mypromptbox = awful.widget.prompt()
|
||||
|
||||
-- Create a taglist widget
|
||||
s.mytaglist = awful.widget.taglist {
|
||||
screen = s,
|
||||
filter = awful.widget.taglist.filter.all,
|
||||
buttons = taglist_buttons,
|
||||
}
|
||||
|
||||
-- Create a tasklist widget
|
||||
s.mytasklist = awful.widget.tasklist {
|
||||
screen = s,
|
||||
filter = awful.widget.tasklist.filter.currenttags,
|
||||
buttons = tasklist_buttons,
|
||||
layout = {
|
||||
spacing = 0,
|
||||
layout = wibox.layout.flex.horizontal,
|
||||
},
|
||||
widget_template = {
|
||||
{
|
||||
{
|
||||
{
|
||||
{
|
||||
id = 'icon_role',
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
margins = 0,
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
{
|
||||
id = 'text_role',
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
left = 20,
|
||||
right = 20,
|
||||
widget = wibox.container.margin,
|
||||
},
|
||||
id = 'background_role',
|
||||
widget = wibox.container.background,
|
||||
},
|
||||
}
|
||||
|
||||
s.battery_widget = wibox.widget {
|
||||
battery_widget({
|
||||
show_current_level = true,
|
||||
bg_color = "#ff0000",
|
||||
size = 30,
|
||||
arc_thickness = 3,
|
||||
}),
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background,
|
||||
}
|
||||
|
||||
s.cpu_widget = cpu_widget({
|
||||
width = 70,
|
||||
step_width = 2,
|
||||
step_spacing = 0,
|
||||
color = '#434c9e',
|
||||
background_color = beautiful.bg_normal,
|
||||
})
|
||||
|
||||
s.ram_widget = wibox.widget {
|
||||
ram_widget({
|
||||
--color_used=
|
||||
--color_buf=
|
||||
--color_free=
|
||||
widget_width=35,
|
||||
widget_height=35,
|
||||
widget_show_buf=true,
|
||||
}),
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background,
|
||||
}
|
||||
|
||||
|
||||
function left_endpoint_shape(cr, width, height)
|
||||
-- insert custom shape building here:
|
||||
gears.shape.transform(gears.shape.rectangular_tag)
|
||||
: translate(0, -height)
|
||||
(cr, width, height*2, width)
|
||||
end
|
||||
|
||||
function right_endpoint_shape(cr, width, height)
|
||||
-- insert custom shape building here:
|
||||
gears.shape.transform(gears.shape.rectangular_tag)
|
||||
: rotate_at(width/2, height, math.pi)
|
||||
: translate(0, height)
|
||||
(cr, width, height*2, width)
|
||||
end
|
||||
|
||||
-- Custom Widget the makes the left-side angle
|
||||
local left_endpoint = {
|
||||
{
|
||||
{
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
forced_width = beautiful.menu_height,
|
||||
shape = left_endpoint_shape,
|
||||
widget = wibox.container.background,
|
||||
}
|
||||
|
||||
-- Custom widget that makes the right-side angle
|
||||
local right_endpoint = {
|
||||
{
|
||||
{
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
forced_width = beautiful.menu_height,
|
||||
shape = right_endpoint_shape,
|
||||
widget = wibox.container.background,
|
||||
}
|
||||
|
||||
-- Create the wibox
|
||||
s.mywibox = awful.wibar({
|
||||
position = "top",
|
||||
screen = s,
|
||||
bg = beautiful.bg_systray
|
||||
})
|
||||
|
||||
-- Add widgets to the wibox
|
||||
s.mywibox:setup {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
expand = "none",
|
||||
{ -- Left widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
|
||||
mylauncher,
|
||||
s.mytaglist,
|
||||
s.mypromptbox,
|
||||
right_endpoint,
|
||||
},
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
|
||||
left_endpoint,
|
||||
s.mytasklist, -- Middle widget
|
||||
right_endpoint,
|
||||
},
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
|
||||
left_endpoint,
|
||||
s.cpu_widget,
|
||||
s.ram_widget,
|
||||
s.battery_widget,
|
||||
wibox.widget.systray(),
|
||||
mytextclock,
|
||||
s.mylayoutbox,
|
||||
},
|
||||
}
|
||||
end)
|
||||
-- }}}
|
||||
end
|
||||
|
||||
return menu_conf
|
|
@ -1,149 +0,0 @@
|
|||
package.path = package.path .. ';/usr/local/share/lua/5.3/?.lua;/usr/share/lua/5.3/?.lua;/usr/share/lua/5.3/?/init.lua;/usr/lib/lua/5.3/?.lua;/usr/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua;/home/nick/.luarocks/share/lua/5.3/?.lua;/home/nick/.luarocks/share/lua/5.3/?/init.lua;/usr/local/share/lua/5.3/?/init.lua;/home/nicholas/.luarocks/share/lua/5.3/?.lua;/home/nicholas/.luarocks/share/lua/5.3/?/init.lua'
|
||||
package.cpath = package.cpath .. ';/usr/lib/lua/5.3/?.so;/usr/lib/lua/5.3/loadall.so;./?.so;/home/nick/.luarocks/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/?.so;/home/nicholas/.luarocks/lib/lua/5.3/?.so'
|
||||
|
||||
-- If LuaRocks is installed, make sure that packages installed through it are
|
||||
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
||||
pcall(require, "luarocks.loader")
|
||||
|
||||
-- Standard awesome library
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
require("awful.autofocus")
|
||||
-- Widget and layout library
|
||||
local wibox = require("wibox")
|
||||
-- Theme handling librarykey
|
||||
local beautiful = require("beautiful")
|
||||
-- Notification library
|
||||
local naughty = require("naughty")
|
||||
|
||||
local key_conf = require("key_conf")
|
||||
local menu_conf = require("menu_conf")
|
||||
local signals = require("signals")
|
||||
local rules = require("window_rules")
|
||||
|
||||
|
||||
-- {{{ Error handling
|
||||
-- Check if awesome encountered an error during startup and fell back to
|
||||
-- another config (This code will only ever execute for the fallback config)
|
||||
if awesome.startup_errors then
|
||||
naughty.notify({ preset = naughty.config.presets.critical,
|
||||
title = "Oops, there were errors during startup!",
|
||||
text = awesome.startup_errors })
|
||||
end
|
||||
|
||||
-- Handle runtime errors after startup
|
||||
do
|
||||
local in_error = false
|
||||
awesome.connect_signal("debug::error", function (err)
|
||||
-- Make sure we don't go into an endless error loop
|
||||
if in_error then return end
|
||||
in_error = true
|
||||
|
||||
naughty.notify({ preset = naughty.config.presets.critical,
|
||||
title = "Oops, an error happened!",
|
||||
text = tostring(err) })
|
||||
in_error = false
|
||||
end)
|
||||
end
|
||||
-- }}}
|
||||
|
||||
-- {{{ Variable definitions
|
||||
-- Themes define colours, icons, font and wallpapers.
|
||||
local theme_name = "galaxymenu"
|
||||
beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), theme_name ))
|
||||
-- beautiful.wallpaper = string.format("%s/.config/awesome/themes/%s/wallpapers/earth2.png", os.getenv("HOME"), theme_name )
|
||||
|
||||
-- {{{ Function definitions
|
||||
|
||||
-- scan directory, and optionally filter outputs
|
||||
function scandir(directory)
|
||||
local i, t, popen = 0, {}, io.popen
|
||||
local pfile = popen('ls -a "'..directory..'"')
|
||||
for filename in pfile:lines() do
|
||||
i = i + 1
|
||||
t[i] = filename
|
||||
end
|
||||
pfile:close()
|
||||
return t
|
||||
end
|
||||
-- }}}
|
||||
|
||||
-- configuration - edit to your liking
|
||||
wp_timeout = 180
|
||||
|
||||
-- simply put more pictures in this folder
|
||||
wp_path = string.format("%s/.config/awesome/themes/%s/wallpapers/", os.getenv("HOME"), theme_name )
|
||||
wp_filter = function(s) return string.match(s,"%.png$") end
|
||||
wp_files = scandir(wp_path)
|
||||
wp_index = math.random(1, #wp_files)
|
||||
|
||||
local rand_wllppr = function()
|
||||
|
||||
-- set wallpaper to current index for all screens
|
||||
beautiful.wallpaper = wp_files[wp_index]
|
||||
gears.wallpaper.maximized(beautiful.wallpaper)
|
||||
|
||||
-- stop the timer (we don't need multiple instances running at the same time)
|
||||
wp_timer:stop()
|
||||
|
||||
-- get next random index
|
||||
wp_index = math.random( 1, #wp_files)
|
||||
|
||||
--restart the timer
|
||||
wp_timer.timeout = wp_timeout
|
||||
wp_timer:start()
|
||||
end
|
||||
-- setup the timer
|
||||
wp_timer = timer { timeout = wp_timeout }
|
||||
wp_timer:connect_signal("timeout", rand_wllppr)
|
||||
|
||||
-- initial start when rc.lua is first run
|
||||
wp_timer:start()
|
||||
rand_wllppr()
|
||||
|
||||
|
||||
-- This is used later as the default terminal and editor to run.
|
||||
terminal = "wezterm"
|
||||
editor = os.getenv("EDITOR") or "vim"
|
||||
editor_cmd = terminal .. " -e " .. editor
|
||||
|
||||
|
||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||
awful.layout.layouts = {
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.tile.left,
|
||||
awful.layout.suit.floating,
|
||||
awful.layout.suit.tile.bottom,
|
||||
awful.layout.suit.tile.top,
|
||||
awful.layout.suit.fair,
|
||||
awful.layout.suit.fair.horizontal,
|
||||
awful.layout.suit.spiral,
|
||||
--awful.layout.suit.spiral.dwindle,
|
||||
awful.layout.suit.max,
|
||||
-- awful.layout.suit.max.fullscreen,
|
||||
-- awful.layout.suit.magnifier,
|
||||
awful.layout.suit.corner.nw,
|
||||
-- awful.layout.suit.corner.ne,
|
||||
-- awful.layout.suit.corner.sw,
|
||||
-- awful.layout.suit.corner.se,
|
||||
}
|
||||
-- }}}
|
||||
|
||||
menu_conf.init(theme_dir, terminal, editor, editor_cmd)
|
||||
|
||||
-- {{{ Mouse bindings
|
||||
root.buttons(gears.table.join(
|
||||
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||
awful.button({ }, 4, awful.tag.viewnext),
|
||||
awful.button({ }, 5, awful.tag.viewprev)
|
||||
))
|
||||
-- }}}
|
||||
--awful.spawn.with_shell(string.format("%s/.config/autostart.sh", os.getenv("HOME")))
|
||||
--awful.spawn.with_shell(string.format("%s/.config/polybar/start_polybar.sh", os.getenv("HOME")))
|
||||
-- XDG autostart
|
||||
-- awful.spawn.with_shell(
|
||||
-- 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
|
||||
-- 'xrdb -merge <<< "awesome.started:true";' ..
|
||||
-- list each of your autostart commands, followed by ; inside single quotes, followed by ..
|
||||
-- 'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex
|
||||
-- )
|
|
@ -1,161 +0,0 @@
|
|||
|
||||
local awful = require("awful")
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
local beautiful = require("beautiful")
|
||||
local naughty = require("naughty")
|
||||
|
||||
-- {{{ Signals
|
||||
-- Signal function to execute when a new client appears.
|
||||
client.connect_signal("manage", function (c)
|
||||
-- Set the windows at the slave,
|
||||
-- i.e. put it at the end of others instead of setting it master.
|
||||
-- if not awesome.startup then awful.client.setslave(c) end
|
||||
|
||||
if awesome.startup
|
||||
and not c.size_hints.user_position
|
||||
and not c.size_hints.program_position then
|
||||
-- Prevent clients from being unreachable after screen count changes.
|
||||
awful.placement.no_offscreen(c)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Add a titlebar if titlebars_enabled is set to true in the rules.
|
||||
local create_titlebar = function(c, is_floating)
|
||||
-- buttons for the titlebar
|
||||
local buttons = gears.table.join(
|
||||
awful.button({ }, 1, function()
|
||||
c:emit_signal("request::activate", "titlebar", {raise = true})
|
||||
awful.mouse.client.move(c)
|
||||
end),
|
||||
awful.button({ }, 3, function()
|
||||
c:emit_signal("request::activate", "titlebar", {raise = true})
|
||||
awful.mouse.client.resize(c)
|
||||
end)
|
||||
)
|
||||
|
||||
local my_close_btn = awful.titlebar.widget.closebutton(c)
|
||||
-- The part that actually removes the tooltip
|
||||
my_close_btn._private.tooltip:remove_from_object(my_close_btn)
|
||||
|
||||
local defenstrate_tooltip = awful.tooltip { }
|
||||
defenstrate_tooltip:add_to_object(my_close_btn)
|
||||
my_close_btn:connect_signal('mouse::enter', function()
|
||||
defenstrate_tooltip.text = "Defenstrate"
|
||||
end)
|
||||
|
||||
function drag_bar_shape(cr, width, height)
|
||||
local radius = 10
|
||||
gears.shape.rounded_rect(cr, width, height, radius)
|
||||
end
|
||||
|
||||
if (is_floating)
|
||||
then
|
||||
awful.titlebar(c) : setup {
|
||||
{ -- Left
|
||||
awful.titlebar.widget.iconwidget(c),
|
||||
buttons = buttons,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
{ -- Middle
|
||||
{ -- Title
|
||||
align = "center",
|
||||
widget = awful.titlebar.widget.titlewidget(c)
|
||||
},
|
||||
buttons = buttons,
|
||||
layout = wibox.layout.flex.horizontal
|
||||
},
|
||||
{ -- Right
|
||||
awful.titlebar.widget.floatingbutton (c),
|
||||
awful.titlebar.widget.maximizedbutton(c),
|
||||
--awful.titlebar.widget.stickybutton (c),
|
||||
awful.titlebar.widget.ontopbutton (c),
|
||||
my_close_btn,
|
||||
--awful.titlebar.widget.closebutton (c),
|
||||
layout = wibox.layout.fixed.horizontal()
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
else
|
||||
awful.titlebar(c, {
|
||||
size = beautiful.tiled_titlebar_height,
|
||||
bg_normal = beautiful.tiled_titlebar_bg_normal,
|
||||
bg_focus = beautiful.tiled_titlebar_bg_focus,
|
||||
}) : setup {
|
||||
{
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
{ -- Middle
|
||||
{
|
||||
{
|
||||
{
|
||||
widget = wibox.widget.textbox,
|
||||
},
|
||||
layout = wibox.layout.flex.horizontal,
|
||||
},
|
||||
bg = beautiful.tiled_titlebar_center,
|
||||
forced_width = 80,
|
||||
shape = drag_bar_shape,
|
||||
widget = wibox.container.background,
|
||||
},
|
||||
layout = wibox.layout.align.horizontal,
|
||||
buttons = buttons,
|
||||
},
|
||||
{ -- Right
|
||||
layout = wibox.layout.fixed.horizontal()
|
||||
},
|
||||
expand = "outside",
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
client.connect_signal("request::titlebars", function(c)
|
||||
create_titlebar(c, true)
|
||||
end
|
||||
)
|
||||
|
||||
-- Enable sloppy focus, so that focus follows mouse.
|
||||
client.connect_signal("mouse::enter", function(c)
|
||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||
end)
|
||||
|
||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||
-- }}}
|
||||
|
||||
client.connect_signal("property::floating", function(c)
|
||||
if c.floating then
|
||||
--awful.titlebar.show(c)
|
||||
create_titlebar(c, true)
|
||||
else
|
||||
--awful.titlebar.hide(c)
|
||||
create_titlebar(c, false)
|
||||
end
|
||||
end)
|
||||
|
||||
function dynamic_title(c)
|
||||
if c.floating or c.first_tag.layout.name == "floating" then
|
||||
--awful.titlebar.show(c)
|
||||
create_titlebar(c, true)
|
||||
else
|
||||
--awful.titlebar.hide(c)
|
||||
create_titlebar(c, false)
|
||||
end
|
||||
end
|
||||
|
||||
tag.connect_signal("property::layout", function(t)
|
||||
local clients = t:clients()
|
||||
for k,c in pairs(clients) do
|
||||
if c.floating or c.first_tag.layout.name == "floating" then
|
||||
--awful.titlebar.show(c)
|
||||
create_titlebar(c, true)
|
||||
else
|
||||
--awful.titlebar.hide(c)
|
||||
create_titlebar(c, false)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
client.connect_signal("manage", dynamic_title)
|
||||
client.connect_signal("tagged", dynamic_title)
|
|
@ -1,3 +0,0 @@
|
|||
Background images:
|
||||
Mikael Eriksson <mikael_eriksson@miffe.org>
|
||||
Licensed under CC-BY-SA-3.0
|
Before Width: | Height: | Size: 218 KiB |
Before Width: | Height: | Size: 262 KiB |
Before Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 263 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 866 B |
Before Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 345 B |
Before Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 328 B |
Before Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 193 B |
|
@ -1,148 +0,0 @@
|
|||
---------------------------
|
||||
-- awesome theme --
|
||||
---------------------------
|
||||
|
||||
local theme_assets = require("beautiful.theme_assets")
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
|
||||
local themes_path = string.format("%s/.config/awesome/themes/galaxymenu", os.getenv("HOME"))
|
||||
|
||||
local theme = {}
|
||||
|
||||
theme.font = "DejaVu Sans Condensed Regular 10"
|
||||
|
||||
theme.bg_normal = "#373B41"
|
||||
theme.bg_focus = "#004B25"
|
||||
theme.bg_urgent = "#C41113"
|
||||
theme.bg_minimize = "#444444"
|
||||
theme.bg_systray = "#00000000"
|
||||
|
||||
theme.fg_normal = "#43B9EC"
|
||||
theme.fg_focus = "#ffffff"
|
||||
theme.fg_urgent = "#ffffff"
|
||||
theme.fg_minimize = "#ffffff"
|
||||
|
||||
theme.useless_gap = dpi(3)
|
||||
theme.border_width = dpi(1)
|
||||
theme.border_normal = "#000000"
|
||||
theme.border_focus = "#00FF80"
|
||||
theme.border_marked = "#91231c"
|
||||
|
||||
theme.tiled_titlebar_height = dpi(5)
|
||||
theme.tiled_titlebar_center = "#CECECE"
|
||||
theme.tiled_titlebar_bg_normal = theme.bg_systray
|
||||
theme.tiled_titlebar_bg_focus = "#02709fBB"
|
||||
|
||||
|
||||
-- overriding the one when
|
||||
-- defined, the sets are:
|
||||
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
|
||||
-- tasklist_[bg|fg]_[focus|urgent]
|
||||
-- titlebar_[bg|fg]_[normal|focus]
|
||||
theme.titlebar_bg_focus = "#03723A"
|
||||
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
|
||||
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
|
||||
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
|
||||
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
|
||||
-- Example:
|
||||
--theme.taglist_bg_focus = "#ff0000"
|
||||
|
||||
-- Generate taglist squares:
|
||||
local taglist_square_size = dpi(4)
|
||||
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
||||
taglist_square_size, theme.fg_normal
|
||||
)
|
||||
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
|
||||
taglist_square_size, theme.fg_normal
|
||||
)
|
||||
|
||||
-- Variables set for theming notifications:
|
||||
-- notification_font
|
||||
-- notification_[bg|fg]
|
||||
-- notification_[width|height|margin]
|
||||
-- notification_[border_color|border_width|shape|opacity]
|
||||
-- Variables set for theming the menu:
|
||||
-- menu_[bg|fg]_[normal|focus]
|
||||
-- menu_[border_color|border_width]
|
||||
theme.menu_submenu_icon = themes_path.."/submenu.png"
|
||||
theme.menu_height = dpi(20)
|
||||
theme.menu_width = dpi(100)
|
||||
theme.menu_text_color_contrast = "#002477"
|
||||
|
||||
theme.taglist_fg_focus = theme.menu_text_color_contrast
|
||||
theme.taglist_bg_focus = "#79B7D1"
|
||||
theme.taglist_fg_urgent = theme.menu_text_color_contrast
|
||||
theme.taglist_fg_occupied = theme.menu_text_color_contrast
|
||||
theme.taglist_bg_occupied = "#3286AA"
|
||||
theme.taglist_bg_empty = theme.bg_normal
|
||||
|
||||
|
||||
-- You can add as many variables as
|
||||
-- you wish and access them by using
|
||||
-- beautiful.variable in your rc.lua
|
||||
--theme.bg_widget = "#cc0000"
|
||||
|
||||
-- Define the image to load
|
||||
theme.titlebar_close_button_normal = themes_path.."/titlebar/close_normal.png"
|
||||
theme.titlebar_close_button_focus = themes_path.."/titlebar/close_focus.png"
|
||||
|
||||
theme.titlebar_minimize_button_normal = themes_path.."/titlebar/minimize_normal.png"
|
||||
theme.titlebar_minimize_button_focus = themes_path.."/titlebar/minimize_focus.png"
|
||||
|
||||
theme.titlebar_ontop_button_normal_inactive = themes_path.."/titlebar/ontop_normal_inactive.png"
|
||||
theme.titlebar_ontop_button_focus_inactive = themes_path.."/titlebar/ontop_focus_inactive.png"
|
||||
theme.titlebar_ontop_button_normal_active = themes_path.."/titlebar/ontop_normal_active.png"
|
||||
theme.titlebar_ontop_button_focus_active = themes_path.."/titlebar/ontop_focus_active.png"
|
||||
|
||||
theme.titlebar_sticky_button_normal_inactive = themes_path.."/titlebar/sticky_normal_inactive.png"
|
||||
theme.titlebar_sticky_button_focus_inactive = themes_path.."/titlebar/sticky_focus_inactive.png"
|
||||
theme.titlebar_sticky_button_normal_active = themes_path.."/titlebar/sticky_normal_active.png"
|
||||
theme.titlebar_sticky_button_focus_active = themes_path.."/titlebar/sticky_focus_active.png"
|
||||
|
||||
theme.titlebar_floating_button_normal_inactive = themes_path.."/titlebar/floating_normal_inactive.png"
|
||||
theme.titlebar_floating_button_focus_inactive = themes_path.."/titlebar/floating_focus_inactive.png"
|
||||
theme.titlebar_floating_button_normal_active = themes_path.."/titlebar/floating_normal_active.png"
|
||||
theme.titlebar_floating_button_focus_active = themes_path.."/titlebar/floating_focus_active.png"
|
||||
|
||||
--when not focused, but maximized
|
||||
theme.titlebar_maximized_button_normal_inactive = themes_path.."/titlebar/maximized_normal_inactive.png"
|
||||
--when focused and not maximized
|
||||
theme.titlebar_maximized_button_focus_inactive = themes_path.."/titlebar/maximized_focus_inactive.png"
|
||||
--when not focused or maximized
|
||||
theme.titlebar_maximized_button_normal_active = themes_path.."/titlebar/maximized_normal_active.png"
|
||||
--when focused and maximized
|
||||
theme.titlebar_maximized_button_focus_active = themes_path.."/titlebar/maximized_focus_active.png"
|
||||
|
||||
--theme.wallpaper = themes_path.."/background.png"
|
||||
|
||||
-- You can use your own layout icons like this:
|
||||
theme.layout_fairh = themes_path.."/layouts/fairhw.png"
|
||||
theme.layout_fairv = themes_path.."/layouts/fairvw.png"
|
||||
theme.layout_floating = themes_path.."/layouts/floatingw.png"
|
||||
theme.layout_magnifier = themes_path.."/layouts/magnifierw.png"
|
||||
theme.layout_max = themes_path.."/layouts/maxw.png"
|
||||
theme.layout_fullscreen = themes_path.."/layouts/fullscreenw.png"
|
||||
theme.layout_tilebottom = themes_path.."/layouts/tilebottomw.png"
|
||||
theme.layout_tileleft = themes_path.."/layouts/tileleftw.png"
|
||||
theme.layout_tile = themes_path.."/layouts/tilew.png"
|
||||
theme.layout_tiletop = themes_path.."/layouts/tiletopw.png"
|
||||
theme.layout_spiral = themes_path.."/layouts/spiralw.png"
|
||||
theme.layout_dwindle = themes_path.."/layouts/dwindlew.png"
|
||||
theme.layout_cornernw = themes_path.."/layouts/cornernww.png"
|
||||
theme.layout_cornerne = themes_path.."/layouts/cornernew.png"
|
||||
theme.layout_cornersw = themes_path.."/layouts/cornersww.png"
|
||||
theme.layout_cornerse = themes_path.."/layouts/cornersew.png"
|
||||
|
||||
-- Generate Awesome icon:
|
||||
theme.awesome_icon = theme_assets.awesome_icon(
|
||||
theme.menu_height, theme.bg_focus, theme.fg_focus
|
||||
)
|
||||
|
||||
-- Define the icon theme for application icons. If not set then the icons
|
||||
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
|
||||
theme.icon_theme = nil
|
||||
|
||||
return theme
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 386 B |
Before Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 758 B |
Before Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 758 B |
Before Width: | Height: | Size: 9.5 MiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 924 KiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 3 MiB |
Before Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 3.9 MiB |
Before Width: | Height: | Size: 6.1 MiB |
Before Width: | Height: | Size: 1,014 KiB |
Before Width: | Height: | Size: 4.7 MiB |
Before Width: | Height: | Size: 5.1 MiB |
|
@ -1,119 +0,0 @@
|
|||
# Volume widget
|
||||
|
||||
Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box:
|
||||
|
||||
![types](screenshots/variations.png)
|
||||
|
||||
From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc`
|
||||
|
||||
A right-click on the widget opens a popup where you can choose a sink/source:
|
||||
![sink-sources](screenshots/volume-sink-sources.png)
|
||||
|
||||
Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default).
|
||||
|
||||
### Features
|
||||
|
||||
- switch between sinks/sources by right click on the widget;
|
||||
- more responsive than previous versions of volume widget, which were refreshed once a second;
|
||||
- 5 predefined customizable looks;
|
||||
|
||||
## Installation
|
||||
|
||||
Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**:
|
||||
|
||||
```lua
|
||||
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
|
||||
...
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
...
|
||||
-- default
|
||||
volume_widget(),
|
||||
-- customized
|
||||
volume_widget{
|
||||
widget_type = 'arc'
|
||||
},
|
||||
```
|
||||
|
||||
Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`.
|
||||
|
||||
### Shortcuts
|
||||
|
||||
To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget:
|
||||
|
||||
```lua
|
||||
awful.key({ modkey }, "]", function() volume_widget:inc(5) end),
|
||||
awful.key({ modkey }, "[", function() volume_widget:dec(5) end),
|
||||
awful.key({ modkey }, "\\", function() volume_widget:toggle() end),
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
It is possible to customize the widget by providing a table with all or some of the following config parameters:
|
||||
|
||||
### Generic parameter
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) |
|
||||
| `step` | `5` | How much the volume is raised or lowered at once (in %) |
|
||||
| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` |
|
||||
| `device` | `pulse` | Select the device name to control |
|
||||
|
||||
Depends on the chosen widget type add parameters from the corresponding section below:
|
||||
|
||||
#### `icon` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `icon_dir`| `./icons`| Path to the folder with icons |
|
||||
|
||||
_Note:_ if you are changing icons, the folder should contain following .svg images:
|
||||
- audio-volume-high-symbolic
|
||||
- audio-volume-medium-symbolic
|
||||
- audio-volume-low-symbolic
|
||||
- audio-volume-muted-symbolic
|
||||
|
||||
#### `icon_and_text` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `icon_dir`| `./icons`| Path to the folder with icons |
|
||||
| `font` | `beautiful.font` | Font name and size, like `Play 12` |
|
||||
|
||||
#### `arc` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `thickness` | 2 | Thickness of the arc |
|
||||
| `main_color` | `beautiful.fg_color` | Color of the arc |
|
||||
| `bg_color` | `#ffffff11` | Color of the arc's background |
|
||||
| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute |
|
||||
| `size` | 18 | Size of the widget |
|
||||
|
||||
#### `horizontal_bar` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `main_color` | `beautiful.fg_normal` | Color of the bar |
|
||||
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
|
||||
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
|
||||
| `width` | `50` | The bar width |
|
||||
| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
|
||||
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
|
||||
| `with_icon` | `true` | Show volume icon|
|
||||
|
||||
_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins.
|
||||
|
||||
#### `vertical_bar` parameters
|
||||
|
||||
| Name | Default | Description |
|
||||
|---|---|---|
|
||||
| `main_color` | `beautiful.fg_normal` | Color of the bar |
|
||||
| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute |
|
||||
| `bg_color` | `'#ffffff11'` | Color of the bar's background |
|
||||
| `width` | `10` | The bar width |
|
||||
| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) |
|
||||
| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc |
|
||||
| `with_icon` | `true` | Show volume icon|
|
Before Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 72 KiB |
|
@ -1,105 +0,0 @@
|
|||
|
||||
|
||||
local utils = {}
|
||||
|
||||
local function split(string_to_split, separator)
|
||||
if separator == nil then separator = "%s" end
|
||||
local t = {}
|
||||
|
||||
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
function utils.extract_sinks_and_sources(pacmd_output)
|
||||
local sinks = {}
|
||||
local sources = {}
|
||||
local device
|
||||
local properties
|
||||
local ports
|
||||
local in_sink = false
|
||||
local in_source = false
|
||||
local in_device = false
|
||||
local in_properties = false
|
||||
local in_ports = false
|
||||
for line in pacmd_output:gmatch("[^\r\n]+") do
|
||||
if string.match(line, 'source%(s%) available.') then
|
||||
in_sink = false
|
||||
in_source = true
|
||||
end
|
||||
if string.match(line, 'sink%(s%) available.') then
|
||||
in_sink = true
|
||||
in_source = false
|
||||
end
|
||||
|
||||
if string.match(line, 'index:') then
|
||||
in_device = true
|
||||
in_properties = false
|
||||
device = {
|
||||
id = line:match(': (%d+)'),
|
||||
is_default = string.match(line, '*') ~= nil
|
||||
}
|
||||
if in_sink then
|
||||
table.insert(sinks, device)
|
||||
elseif in_source then
|
||||
table.insert(sources, device)
|
||||
end
|
||||
end
|
||||
|
||||
if string.match(line, '^\tproperties:') then
|
||||
in_device = false
|
||||
in_properties = true
|
||||
properties = {}
|
||||
device['properties'] = properties
|
||||
end
|
||||
|
||||
if string.match(line, 'ports:') then
|
||||
in_device = false
|
||||
in_properties = false
|
||||
in_ports = true
|
||||
ports = {}
|
||||
device['ports'] = ports
|
||||
end
|
||||
|
||||
if string.match(line, 'active port:') then
|
||||
in_device = false
|
||||
in_properties = false
|
||||
in_ports = false
|
||||
device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','')
|
||||
end
|
||||
|
||||
if in_device then
|
||||
local t = split(line, ': ')
|
||||
local key = t[1]:gsub('\t+', ''):lower()
|
||||
local value = t[2]:gsub('^<', ''):gsub('>$', '')
|
||||
device[key] = value
|
||||
end
|
||||
|
||||
if in_properties then
|
||||
local t = split(line, '=')
|
||||
local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "")
|
||||
local value
|
||||
if t[2] == nil then
|
||||
value = t[2]
|
||||
else
|
||||
value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '')
|
||||
end
|
||||
properties[key] = value
|
||||
end
|
||||
|
||||
if in_ports then
|
||||
local t = split(line, ': ')
|
||||
local key = t[1]
|
||||
if key ~= nil then
|
||||
key = key:gsub('\t+', '')
|
||||
end
|
||||
ports[key] = t[2]
|
||||
end
|
||||
end
|
||||
|
||||
return sinks, sources
|
||||
end
|
||||
|
||||
return utils
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>
|
Before Width: | Height: | Size: 354 B |
|
@ -1,228 +0,0 @@
|
|||
-------------------------------------------------
|
||||
-- The Ultimate Volume Widget for Awesome Window Manager
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2020 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local spawn = require("awful.spawn")
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
local watch = require("awful.widget.watch")
|
||||
local utils = require("awesome-wm-widgets.volume-widget.utils")
|
||||
|
||||
|
||||
local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]]
|
||||
local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end
|
||||
local function INC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%+' end
|
||||
local function DEC_VOLUME_CMD(device, step) return 'amixer -D ' .. device .. ' sset Master ' .. step .. '%-' end
|
||||
local function TOG_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sset Master toggle' end
|
||||
|
||||
|
||||
local widget_types = {
|
||||
icon_and_text = require("awesome-wm-widgets.volume-widget.widgets.icon-and-text-widget"),
|
||||
icon = require("awesome-wm-widgets.volume-widget.widgets.icon-widget"),
|
||||
arc = require("awesome-wm-widgets.volume-widget.widgets.arc-widget"),
|
||||
horizontal_bar = require("awesome-wm-widgets.volume-widget.widgets.horizontal-bar-widget"),
|
||||
vertical_bar = require("awesome-wm-widgets.volume-widget.widgets.vertical-bar-widget")
|
||||
}
|
||||
local volume = {}
|
||||
|
||||
local rows = { layout = wibox.layout.fixed.vertical }
|
||||
|
||||
local popup = awful.popup{
|
||||
bg = beautiful.bg_normal,
|
||||
ontop = true,
|
||||
visible = false,
|
||||
shape = gears.shape.rounded_rect,
|
||||
border_width = 1,
|
||||
border_color = beautiful.bg_focus,
|
||||
maximum_width = 400,
|
||||
offset = { y = 5 },
|
||||
widget = {}
|
||||
}
|
||||
|
||||
local function build_main_line(device)
|
||||
if device.active_port ~= nil and device.ports[device.active_port] ~= nil then
|
||||
return device.properties.device_description .. ' · ' .. device.ports[device.active_port]
|
||||
else
|
||||
return device.properties.device_description
|
||||
end
|
||||
end
|
||||
|
||||
local function build_rows(devices, on_checkbox_click, device_type)
|
||||
local device_rows = { layout = wibox.layout.fixed.vertical }
|
||||
for _, device in pairs(devices) do
|
||||
|
||||
local checkbox = wibox.widget {
|
||||
checked = device.is_default,
|
||||
color = beautiful.bg_normal,
|
||||
paddings = 2,
|
||||
shape = gears.shape.circle,
|
||||
forced_width = 20,
|
||||
forced_height = 20,
|
||||
check_color = beautiful.fg_urgent,
|
||||
widget = wibox.widget.checkbox
|
||||
}
|
||||
|
||||
checkbox:connect_signal("button::press", function()
|
||||
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
|
||||
on_checkbox_click()
|
||||
end)
|
||||
end)
|
||||
|
||||
local row = wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
checkbox,
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
{
|
||||
text = build_main_line(device),
|
||||
align = 'left',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
left = 10,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
spacing = 8,
|
||||
layout = wibox.layout.align.horizontal
|
||||
},
|
||||
margins = 4,
|
||||
layout = wibox.container.margin
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
|
||||
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
|
||||
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
|
||||
|
||||
local old_cursor, old_wibox
|
||||
row:connect_signal("mouse::enter", function()
|
||||
local wb = mouse.current_wibox
|
||||
old_cursor, old_wibox = wb.cursor, wb
|
||||
wb.cursor = "hand1"
|
||||
end)
|
||||
row:connect_signal("mouse::leave", function()
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end)
|
||||
|
||||
row:connect_signal("button::press", function()
|
||||
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
|
||||
on_checkbox_click()
|
||||
end)
|
||||
end)
|
||||
|
||||
table.insert(device_rows, row)
|
||||
end
|
||||
|
||||
return device_rows
|
||||
end
|
||||
|
||||
local function build_header_row(text)
|
||||
return wibox.widget{
|
||||
{
|
||||
markup = "<b>" .. text .. "</b>",
|
||||
align = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
bg = beautiful.bg_normal,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
end
|
||||
|
||||
local function rebuild_popup()
|
||||
spawn.easy_async(LIST_DEVICES_CMD, function(stdout)
|
||||
|
||||
local sinks, sources = utils.extract_sinks_and_sources(stdout)
|
||||
|
||||
for i = 0, #rows do rows[i]=nil end
|
||||
|
||||
table.insert(rows, build_header_row("SINKS"))
|
||||
table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink"))
|
||||
table.insert(rows, build_header_row("SOURCES"))
|
||||
table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source"))
|
||||
|
||||
popup:setup(rows)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
local function worker(user_args)
|
||||
|
||||
local args = user_args or {}
|
||||
|
||||
local mixer_cmd = args.mixer_cmd or 'pavucontrol'
|
||||
local widget_type = args.widget_type
|
||||
local refresh_rate = args.refresh_rate or 1
|
||||
local step = args.step or 5
|
||||
local device = args.device or 'pulse'
|
||||
|
||||
if widget_types[widget_type] == nil then
|
||||
volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args)
|
||||
else
|
||||
volume.widget = widget_types[widget_type].get_widget(args)
|
||||
end
|
||||
|
||||
local function update_graphic(widget, stdout)
|
||||
local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off]
|
||||
if mute == 'off' then widget:mute()
|
||||
elseif mute == 'on' then widget:unmute()
|
||||
end
|
||||
local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%)
|
||||
volume_level = string.format("% 3d", volume_level)
|
||||
widget:set_volume_level(volume_level)
|
||||
end
|
||||
|
||||
function volume:inc(s)
|
||||
spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
|
||||
end
|
||||
|
||||
function volume:dec(s)
|
||||
spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
|
||||
end
|
||||
|
||||
function volume:toggle()
|
||||
spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end)
|
||||
end
|
||||
|
||||
function volume:mixer()
|
||||
if mixer_cmd then
|
||||
spawn.easy_async(mixer_cmd)
|
||||
end
|
||||
end
|
||||
|
||||
volume.widget:buttons(
|
||||
awful.util.table.join(
|
||||
awful.button({}, 3, function()
|
||||
if popup.visible then
|
||||
popup.visible = not popup.visible
|
||||
else
|
||||
rebuild_popup()
|
||||
popup:move_next_to(mouse.current_widget_geometry)
|
||||
end
|
||||
end),
|
||||
awful.button({}, 4, function() volume:inc() end),
|
||||
awful.button({}, 5, function() volume:dec() end),
|
||||
awful.button({}, 2, function() volume:mixer() end),
|
||||
awful.button({}, 1, function() volume:toggle() end)
|
||||
)
|
||||
)
|
||||
|
||||
watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget)
|
||||
|
||||
return volume.widget
|
||||
end
|
||||
|
||||
return setmetatable(volume, { __call = function(_, ...) return worker(...) end })
|
|
@ -1,46 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
local widget = {}
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local thickness = args.thickness or 2
|
||||
local main_color = args.main_color or beautiful.fg_color
|
||||
local bg_color = args.bg_color or '#ffffff11'
|
||||
local mute_color = args.mute_color or beautiful.fg_urgent
|
||||
local size = args.size or 18
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
id = "icon",
|
||||
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
|
||||
resize = true,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
max_value = 100,
|
||||
thickness = thickness,
|
||||
start_angle = 4.71238898, -- 2pi*3/4
|
||||
forced_height = size,
|
||||
forced_width = size,
|
||||
bg = bg_color,
|
||||
paddings = 2,
|
||||
widget = wibox.container.arcchart,
|
||||
set_volume_level = function(self, new_value)
|
||||
self.value = new_value
|
||||
end,
|
||||
mute = function(self)
|
||||
self.colors = { mute_color }
|
||||
end,
|
||||
unmute = function(self)
|
||||
self.colors = { main_color }
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
|
||||
return widget
|
|
@ -1,58 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
local gears = require("gears")
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
local widget = {}
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local main_color = args.main_color or beautiful.fg_normal
|
||||
local mute_color = args.mute_color or beautiful.fg_urgent
|
||||
local bg_color = args.bg_color or '#ffffff11'
|
||||
local width = args.width or 50
|
||||
local margins = args.margins or 10
|
||||
local shape = args.shape or 'bar'
|
||||
local with_icon = args.with_icon == true and true or false
|
||||
|
||||
local bar = wibox.widget {
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
visible = with_icon,
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
id = 'bar',
|
||||
max_value = 100,
|
||||
forced_width = width,
|
||||
color = main_color,
|
||||
margins = { top = margins, bottom = margins },
|
||||
background_color = bg_color,
|
||||
shape = gears.shape[shape],
|
||||
widget = wibox.widget.progressbar,
|
||||
},
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_volume_level = function(self, new_value)
|
||||
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
|
||||
end,
|
||||
mute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(mute_color)
|
||||
end,
|
||||
unmute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(main_color)
|
||||
end
|
||||
}
|
||||
|
||||
return bar
|
||||
end
|
||||
|
||||
return widget
|
|
@ -1,59 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
local widget = {}
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local font = args.font or beautiful.font
|
||||
local icon_dir = args.icon_dir or ICON_DIR
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place
|
||||
},
|
||||
{
|
||||
id = 'txt',
|
||||
font = font,
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_volume_level = function(self, new_value)
|
||||
self:get_children_by_id('txt')[1]:set_text(new_value)
|
||||
local volume_icon_name
|
||||
if self.is_muted then
|
||||
volume_icon_name = 'audio-volume-muted-symbolic'
|
||||
else
|
||||
local new_value_num = tonumber(new_value)
|
||||
if (new_value_num >= 0 and new_value_num < 33) then
|
||||
volume_icon_name="audio-volume-low-symbolic"
|
||||
elseif (new_value_num < 66) then
|
||||
volume_icon_name="audio-volume-medium-symbolic"
|
||||
else
|
||||
volume_icon_name="audio-volume-high-symbolic"
|
||||
end
|
||||
end
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
|
||||
end,
|
||||
mute = function(self)
|
||||
self.is_muted = true
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
|
||||
end,
|
||||
unmute = function(self)
|
||||
self.is_muted = false
|
||||
end
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
|
||||
return widget
|
|
@ -1,46 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
|
||||
local widget = {}
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local icon_dir = args.icon_dir or ICON_DIR
|
||||
|
||||
return wibox.widget {
|
||||
{
|
||||
id = "icon",
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
layout = wibox.container.place,
|
||||
set_volume_level = function(self, new_value)
|
||||
local volume_icon_name
|
||||
if self.is_muted then
|
||||
volume_icon_name = 'audio-volume-muted-symbolic'
|
||||
else
|
||||
local new_value_num = tonumber(new_value)
|
||||
if (new_value_num >= 0 and new_value_num < 33) then
|
||||
volume_icon_name="audio-volume-low-symbolic"
|
||||
elseif (new_value_num < 66) then
|
||||
volume_icon_name="audio-volume-medium-symbolic"
|
||||
else
|
||||
volume_icon_name="audio-volume-high-symbolic"
|
||||
end
|
||||
end
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
|
||||
end,
|
||||
mute = function(self)
|
||||
self.is_muted = true
|
||||
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
|
||||
end,
|
||||
unmute = function(self)
|
||||
self.is_muted = false
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
return widget
|
|
@ -1,64 +0,0 @@
|
|||
local wibox = require("wibox")
|
||||
local beautiful = require('beautiful')
|
||||
local gears = require("gears")
|
||||
|
||||
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
|
||||
|
||||
local widget = {}
|
||||
|
||||
function widget.get_widget(widgets_args)
|
||||
local args = widgets_args or {}
|
||||
|
||||
local main_color = args.main_color or beautiful.fg_normal
|
||||
local mute_color = args.mute_color or beautiful.fg_urgent
|
||||
local bg_color = args.bg_color or '#ffffff11'
|
||||
local width = args.width or 10
|
||||
local margins = args.height or 2
|
||||
local shape = args.shape or 'bar'
|
||||
local with_icon = args.with_icon == true and true or false
|
||||
|
||||
local bar = wibox.widget {
|
||||
{
|
||||
{
|
||||
id = "icon",
|
||||
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
|
||||
resize = false,
|
||||
widget = wibox.widget.imagebox,
|
||||
},
|
||||
valign = 'center',
|
||||
visible = with_icon,
|
||||
layout = wibox.container.place,
|
||||
},
|
||||
{
|
||||
{
|
||||
id = 'bar',
|
||||
max_value = 100,
|
||||
forced_width = width,
|
||||
forced_height = 5,
|
||||
margins = { top = margins, bottom = margins },
|
||||
color = main_color,
|
||||
background_color = bg_color,
|
||||
shape = gears.shape[shape],
|
||||
widget = wibox.widget.progressbar,
|
||||
},
|
||||
forced_width = width,
|
||||
direction = 'east',
|
||||
layout = wibox.container.rotate,
|
||||
},
|
||||
spacing = 4,
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
set_volume_level = function(self, new_value)
|
||||
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
|
||||
end,
|
||||
mute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(mute_color)
|
||||
end,
|
||||
unmute = function(self)
|
||||
self:get_children_by_id('bar')[1]:set_color(main_color)
|
||||
end
|
||||
}
|
||||
|
||||
return bar
|
||||
end
|
||||
|
||||
return widget
|
|
@ -1,65 +0,0 @@
|
|||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local keys = require("key_conf")
|
||||
|
||||
local clientkeys = keys.clientkeys
|
||||
local clientbuttons = keys.clientbuttons
|
||||
|
||||
-- {{{ Rules
|
||||
-- Rules to apply to new clients (through the "manage" signal).
|
||||
awful.rules.rules = {
|
||||
-- All clients will match this rule.
|
||||
{ rule = { },
|
||||
properties = { border_width = beautiful.border_width,
|
||||
border_color = beautiful.border_normal,
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
keys = clientkeys,
|
||||
buttons = clientbuttons,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
||||
}
|
||||
},
|
||||
|
||||
-- Floating clients.
|
||||
{ rule_any = {
|
||||
instance = {
|
||||
"DTA", -- Firefox addon DownThemAll.
|
||||
"copyq", -- Includes session name in class.
|
||||
"pinentry",
|
||||
},
|
||||
class = {
|
||||
"constellation",
|
||||
"Arandr",
|
||||
"Blueman-manager",
|
||||
"Gpick",
|
||||
"Kruler",
|
||||
"MessageWin", -- kalarm.
|
||||
"Sxiv",
|
||||
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
|
||||
"Wpa_gui",
|
||||
"veromix",
|
||||
"xtightvncviewer"},
|
||||
|
||||
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
||||
-- and the name shown there might not match defined rules here.
|
||||
name = {
|
||||
"Event Tester", -- xev.
|
||||
},
|
||||
role = {
|
||||
"AlarmWindow", -- Thunderbird's calendar.
|
||||
"ConfigManager", -- Thunderbird's about:config.
|
||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||
}
|
||||
}, properties = { floating = true }},
|
||||
|
||||
-- Add titlebars to normal clients and dialogs
|
||||
{ rule_any = {type = { "normal", "dialog" }
|
||||
}, properties = { titlebars_enabled = true }
|
||||
},
|
||||
|
||||
-- Set Firefox to always map on the tag named "2" on screen 1.
|
||||
-- { rule = { class = "Firefox" },
|
||||
-- properties = { screen = 1, tag = "2" } },
|
||||
}
|
||||
-- }}}
|