Add rofi-calc and qalculate back to replace anyrun

Remove some program keybinds
This commit is contained in:
Evie Litherland-Smith 2023-09-11 08:28:50 +01:00
parent ec8cead209
commit 0546a98547
6 changed files with 19 additions and 106 deletions

View file

@ -1,26 +1,5 @@
{ {
"nodes": { "nodes": {
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1691439091,
"narHash": "sha256-TfyjuHyt7+6pnwFPgSZQoKGSMEWRKNF+OQ+XTA/dahg=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "59e0bf6e570bb5461b0f3a1f62b15165e37a08a9",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"catppuccin-alacritty": { "catppuccin-alacritty": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -133,27 +112,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -236,7 +194,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"anyrun": "anyrun",
"catppuccin-alacritty": "catppuccin-alacritty", "catppuccin-alacritty": "catppuccin-alacritty",
"catppuccin-bat": "catppuccin-bat", "catppuccin-bat": "catppuccin-bat",
"catppuccin-fish": "catppuccin-fish", "catppuccin-fish": "catppuccin-fish",

View file

@ -11,10 +11,6 @@
url = "github:hyprwm/Hyprland"; url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
catppuccin-alacritty = { catppuccin-alacritty = {
url = "github:catppuccin/alacritty"; url = "github:catppuccin/alacritty";
@ -178,7 +174,6 @@
extraSpecialArgs = { extraSpecialArgs = {
inherit hostName user shell inputs catppuccin-themes; inherit hostName user shell inputs catppuccin-themes;
hyprland = inputs.hyprland; hyprland = inputs.hyprland;
anyrun = inputs.anyrun;
wallpapers = inputs.wallpapers; wallpapers = inputs.wallpapers;
}; };
users.${user} = let users.${user} = let
@ -218,8 +213,6 @@
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = { extraSpecialArgs = {
inherit hostName user shell inputs catppuccin-themes; inherit hostName user shell inputs catppuccin-themes;
hyprland = inputs.hyprland;
anyrun = inputs.anyrun;
wallpapers = inputs.wallpapers; wallpapers = inputs.wallpapers;
}; };
modules = [ modules = [

View file

@ -1,27 +0,0 @@
{ pkgs, anyrun, ... }:
let anyrunPackages = anyrun.packages.${pkgs.system};
in {
imports = [ anyrun.homeManagerModules.default ];
home.packages = with pkgs; [ rink ];
programs.anyrun = {
enable = true;
config = {
plugins = with anyrunPackages; [
applications
dictionary
rink
shell
stdin
symbols
translate
];
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = true;
showResultsImmediately = false;
maxEntries = null;
};
};
}

View file

@ -1,6 +1,5 @@
{ config, pkgs, anyrun, theme, ... }: { config, pkgs, theme, ... }:
let let
anyrunPackage = anyrun.packages.${pkgs.system}.anyrun;
emacsPackage = pkgs.emacs29-pgtk; emacsPackage = pkgs.emacs29-pgtk;
firefoxPackage = pkgs.firefox-wayland; firefoxPackage = pkgs.firefox-wayland;
rofiPackage = pkgs.rofi-wayland; rofiPackage = pkgs.rofi-wayland;
@ -90,30 +89,19 @@ in ''
bind = SUPER SHIFT, P, exec, pkill rofi || ${rofiPackage}/bin/rofi -show power-menu bind = SUPER SHIFT, P, exec, pkill rofi || ${rofiPackage}/bin/rofi -show power-menu
# Common program shortcuts # Common program shortcuts
bind = SUPER, E, exec, ${emacsPackage}/bin/emacsclient -c -a 'emacs'
bind = SUPER, B, exec, pkill rofi || ${rofiPackage}/bin/rofi -show filebrowser
bind = SUPER, Space, exec, pkill rofi || ${rofiPackage}/bin/rofi -show combi bind = SUPER, Space, exec, pkill rofi || ${rofiPackage}/bin/rofi -show combi
bind = SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty bind = SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty
bind = SUPER SHIFT, Return, exec, pkill rofi || ${rofiPackage}/bin/rofi -show run bind = SUPER SHIFT, Return, exec, pkill rofi || ${rofiPackage}/bin/rofi -show run
bind = SUPER ALT, Space, submap, launch
bind = SUPER, E, exec, ${emacsPackage}/bin/emacsclient -c -a 'emacs'
bind = SUPER ALT, W, exec, [workspace 2] ${firefoxPackage}/bin/firefox bind = SUPER ALT, W, exec, [workspace 2] ${firefoxPackage}/bin/firefox
bind = SUPER ALT, F, exec, [workspace 4] ${pkgs.xfce.thunar}/bin/thunar bind = SUPER ALT, F, exec, [workspace 4] ${pkgs.alacritty}/bin/alacritty -e mc
bind = SUPER ALT, Z, exec, [workspace 4] ${pkgs.zotero}/bin/zotero
bind = SUPER ALT, S, exec, [workspace 5] ${pkgs.alacritty}/bin/alacritty -e ncspot bind = SUPER ALT, S, exec, [workspace 5] ${pkgs.alacritty}/bin/alacritty -e ncspot
submap = launch
bind = , W, exec, [workspace 2 silent] ${firefoxPackage}/bin/firefox
bind = , F, exec, [workspace 4 silent] ${pkgs.xfce.thunar}/bin/thunar
bind = , Z, exec, [workspace 4 silent] ${pkgs.zotero}/bin/zotero
bind = , S, exec, [workspace 5 silent] ${pkgs.alacritty}/bin/alacritty -e ncspot
bind = , Space, submap, reset
bind = SUPER, Space, submap, reset
bind = SUPER ALT, Space, submap, reset
submap = reset
# Misc useful binds # Misc useful binds
bind=,Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" bind=,Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"
bind=,XF86Calculator,exec,${anyrunPackage}/bin/anyrun bind=,XF86Calculator,exec,pkill rofi || ${rofiPackage}/bin/rofi -show calc
# Sound # Sound
bindl=,XF86AudioMute,exec,${pkgs.pamixer}/bin/pamixer -t bindl=,XF86AudioMute,exec,${pkgs.pamixer}/bin/pamixer -t
bindl=,XF86AudioMicMute,exec,${pkgs.pamixer}/bin/pamixer --default-source -t bindl=,XF86AudioMicMute,exec,${pkgs.pamixer}/bin/pamixer --default-source -t
@ -149,6 +137,8 @@ in ''
windowrule = move 100%-820 10%,(nm-connection-editor) windowrule = move 100%-820 10%,(nm-connection-editor)
windowrule = float,(Pinentry) windowrule = float,(Pinentry)
windowrule = center,(Pinentry) windowrule = center,(Pinentry)
windowrule = float,(thunar)
windowrule = center,(thunar)
windowrule = nofullscreenrequest,(org.remmina.Remmina) windowrule = nofullscreenrequest,(org.remmina.Remmina)
windowrule = nomaximizerequest,(org.remmina.Remmina) windowrule = nomaximizerequest,(org.remmina.Remmina)
windowrulev2 = float,title:(File|Picture-in-Picture),class:(firefox) windowrulev2 = float,title:(File|Picture-in-Picture),class:(firefox)
@ -179,7 +169,6 @@ in ''
bind = SUPER, F, workspace, 4 bind = SUPER, F, workspace, 4
bind = SUPER SHIFT, F, movetoworkspace, 4 bind = SUPER SHIFT, F, movetoworkspace, 4
windowrule = workspace 4,^(libreoffice).* windowrule = workspace 4,^(libreoffice).*
windowrule = workspace 4,(thunar)
windowrulev2 = workspace 4,title:(Open),class:(soffice) windowrulev2 = workspace 4,title:(Open),class:(soffice)
# 5: [s]potify (or mu[s]ic) # 5: [s]potify (or mu[s]ic)
@ -214,10 +203,10 @@ in ''
windowrule = workspace 9,(steam) windowrule = workspace 9,(steam)
# Special workspaces # Special workspaces
bind = SUPER, comma, workspace, -1 bind = SUPER, comma, workspace, m-1
bind = SUPER SHIFT, comma, movetoworkspace, -1 bind = SUPER SHIFT, comma, movetoworkspace, r-1
bind = SUPER, period, workspace, +1 bind = SUPER, period, workspace, m+1
bind = SUPER SHIFT, period, movetoworkspace, +1 bind = SUPER SHIFT, period, movetoworkspace, r+1
bind = SUPER, N, workspace, empty bind = SUPER, N, workspace, empty
bind = SUPER SHIFT, N, movetoworkspace, empty bind = SUPER SHIFT, N, movetoworkspace, empty
bind = SUPER, minus, togglespecialworkspace bind = SUPER, minus, togglespecialworkspace

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, hyprland, anyrun, wallpapers, catppuccin-themes, ... }: { config, lib, pkgs, hyprland, wallpapers, catppuccin-themes, ... }:
{ {
imports = [ imports = [
@ -7,7 +7,6 @@
./waybar/default.nix ./waybar/default.nix
./swaync/default.nix ./swaync/default.nix
./rofi/default.nix ./rofi/default.nix
./anyrun/default.nix
./swaylock.nix ./swaylock.nix
./gtk.nix ./gtk.nix
]; ];
@ -41,7 +40,7 @@
hidpi = true; hidpi = true;
}; };
extraConfig = import ./config.nix { extraConfig = import ./config.nix {
inherit config pkgs anyrun; inherit config pkgs;
theme = catppuccin-themes.hyprland; theme = catppuccin-themes.hyprland;
}; };
}; };

View file

@ -1,15 +1,15 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
let icon-theme = config.gtk.iconTheme.name; let icon-theme = config.gtk.iconTheme.name;
in { in {
home.packages = with pkgs; [ rofi-power-menu ]; home.packages = with pkgs; [ rofi-power-menu libqalculate ];
programs.rofi = { programs.rofi = {
enable = true; enable = true;
location = "center"; location = "center";
pass.enable = true; pass.enable = true;
plugins = with pkgs; [ rofi-calc ];
extraConfig = { extraConfig = {
modi = modi = "window,run,drun,ssh,filebrowser,calc,combi";
"window,run,drun,ssh,combi,power-menu:${pkgs.rofi-power-menu}/bin/rofi-power-menu"; combi-modi = "window,drun,ssh,filebrowser";
combi-modi = "window,drun,ssh";
sort = true; sort = true;
sorting-method = "fzf"; sorting-method = "fzf";
matching = "fuzzy"; matching = "fuzzy";
@ -23,6 +23,8 @@ in {
display-run = " 󰅴 Run "; display-run = " 󰅴 Run ";
display-drun = " 󱓞 Launch "; display-drun = " 󱓞 Launch ";
display-ssh = " 󰢹 SSH "; display-ssh = " 󰢹 SSH ";
display-filebrowser = " 󰝰 Files ";
display-calc = " 󰪚 Calculator ";
display-combi = " 󰛡 Combi "; display-combi = " 󰛡 Combi ";
}; };
theme = ./theme.rasi; theme = ./theme.rasi;