Skip to content

Commit

Permalink
build: Add Waybar and Clipse
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmoy committed Jun 19, 2024
1 parent b2b5fcc commit cf95d9b
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 3 deletions.
4 changes: 4 additions & 0 deletions home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
outputs.homeManagerModules.starship
outputs.homeManagerModules.foot
outputs.homeManagerModules.hyprland
outputs.homeManagerModules.waybar
outputs.homeManagerModules.zsh
outputs.homeManagerModules.ion
outputs.homeManagerModules.nushell
Expand Down Expand Up @@ -65,12 +66,15 @@
# Enable home-manager
programs.home-manager.enable = true;

programs.alacritty.enable = true;

modules = {
ssh.enable = true;
git.enable = true;
starship.enable = true;
foot.enable = true;
hyprland.enable = true;
waybar.enable = true;
zsh.enable = true;
ion.enable = true;
nushell.enable = true;
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
starship = import ./starship/default.nix;
foot = import ./foot.nix;
hyprland = import ./hyprland/default.nix;
waybar = import ./waybar/default.nix;
zsh = import ./zsh/default.nix;
ion = import ./ion/default.nix;
nushell = import ./nushell/default.nix;
Expand Down
6 changes: 5 additions & 1 deletion modules/home-manager/hyprland/hyprland.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ $menu = wofi --show drun
# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
exec-once = waybar

exec-once = clipse -listen

#############################
### ENVIRONMENT VARIABLES ###
Expand Down Expand Up @@ -182,7 +184,7 @@ $mainMod = SUPER # Sets "Windows" key as main modifier
bind = $mainMod, T, exec, $terminal
bind = $mainMod, W, killactive,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, V, exec, LIBGL_ALWAYS_SOFTWARE=1 alacritty --class floating -e nu -c 'clipse'
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
Expand Down Expand Up @@ -249,3 +251,5 @@ windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
windowrulev2 = float, title:(1Password)
windowrulev2 = size 70% 70%, title:(1Password)
windowrulev2 = center, title:(1Password)

windowrulev2 = float, class:(floating)
43 changes: 43 additions & 0 deletions modules/home-manager/waybar/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.waybar;
in {
options.modules.waybar = {enable = mkEnableOption "waybar";};
config = mkIf cfg.enable {
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
# output = [
# "eDP-1"
# "HDMI-A-1"
# ];
# modules-left = [ "sway/workspaces" "sway/mode" "wlr/taskbar" ];
# modules-center = [ "sway/window" "custom/hello-from-waybar" ];
# modules-right = [ "mpd" "custom/mymodule#with-css-id" "temperature" ];

# "sway/workspaces" = {
# disable-scroll = true;
# all-outputs = true;
# };
# "custom/hello-from-waybar" = {
# format = "hello {}";
# max-length = 40;
# interval = "once";
# exec = pkgs.writeShellScript "hello-from-waybar" ''
# echo "from within waybar"
# '';
# };
};
};
};
};
}
5 changes: 3 additions & 2 deletions nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@
};
};

services.spice-vdagentd.enable = true;
services.spice-webdavd.enable = true;
# services.spice-vdagentd.enable = true;
# services.spice-webdavd.enable = true;

# Enable automatic login for the user.
services.displayManager.autoLogin.enable = true;
Expand Down Expand Up @@ -176,6 +176,7 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
clipse
devenv
];

Expand Down

0 comments on commit cf95d9b

Please sign in to comment.