Add scratchpad

This commit is contained in:
2023-02-19 21:37:32 +09:00
parent f44967305f
commit 8064878b1e
40 changed files with 67 additions and 268 deletions
Generated
+1 -193
View File
@@ -65,49 +65,6 @@
"type": "github"
}
},
"hyprland-protocols_2": {
"inputs": {
"nixpkgs": [
"xremap",
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1671839510,
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprland_2": {
"inputs": {
"hyprland-protocols": "hyprland-protocols_2",
"nixpkgs": "nixpkgs_2",
"wlroots": "wlroots_2",
"xdph": "xdph_2"
},
"locked": {
"lastModified": 1673526825,
"narHash": "sha256-GukJtWwrkkf3ApkBTc7tW7DcsS1gKHWWs7OJYnv9om8=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "cbd31ba481c5be65e015647851eef4b396869073",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"jq": {
"flake": false,
"locked": {
@@ -124,25 +81,6 @@
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1671096816,
"narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
"owner": "nmattia",
"repo": "naersk",
"rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
"type": "github"
},
"original": {
"owner": "nmattia",
"ref": "master",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1675942811,
@@ -159,52 +97,6 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1672791794,
"narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9813adc7f7c0edd738c6bdd8431439688bb0cb3d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1673525234,
"narHash": "sha256-fMP37VTeqSzC8JYoQJinLOnHfjriE5uKInLWJRz5K3E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "92f9580a4c369b4b51a7b6a5e77da43720134c9f",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1673525234,
"narHash": "sha256-fMP37VTeqSzC8JYoQJinLOnHfjriE5uKInLWJRz5K3E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "92f9580a4c369b4b51a7b6a5e77da43720134c9f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1676375128,
@@ -226,8 +118,7 @@
"hyprland": "hyprland",
"jq": "jq",
"nixpkgs": "nixpkgs",
"nur": "nur",
"xremap": "xremap"
"nur": "nur"
}
},
"utils": {
@@ -263,24 +154,6 @@
"type": "gitlab"
}
},
"wlroots_2": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1671183014,
"narHash": "sha256-oMWT5Zbe/3HFINAk38jNVxiZ4PCYvPJj2Jo4iiyBtm0=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "dc7cc98cf21a8dc19ab8895505500e3700646af0",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
@@ -305,71 +178,6 @@
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"xdph_2": {
"inputs": {
"hyprland-protocols": [
"xremap",
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"xremap",
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673116118,
"narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"xremap": {
"inputs": {
"hyprland": "hyprland_2",
"naersk": "naersk",
"nixpkgs": "nixpkgs_4",
"xremap": "xremap_2"
},
"locked": {
"lastModified": 1673542172,
"narHash": "sha256-UycT73yMNhyvuetDMmEZ47NWLavyDy5MhKjZukrVpWk=",
"owner": "xremap",
"repo": "nix-flake",
"rev": "1212aa09e65f437282456f89ef637c27430dd67d",
"type": "github"
},
"original": {
"owner": "xremap",
"repo": "nix-flake",
"type": "github"
}
},
"xremap_2": {
"flake": false,
"locked": {
"lastModified": 1673511384,
"narHash": "sha256-uHLzTXHB8/o/gO/ujWwIM/V5Ob23D2Har9S0o09tApg=",
"owner": "k0kubun",
"repo": "xremap",
"rev": "dac4e87a3c0465d1a17f5699ab30bd31e7fdc4bf",
"type": "github"
},
"original": {
"owner": "k0kubun",
"ref": "v0.8.0",
"repo": "xremap",
"type": "github"
}
}
},
"root": "root",
-20
View File
@@ -12,7 +12,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
nur.url = "github:nix-community/NUR";
xremap.url = "github:xremap/nix-flake";
jq = {
url = "github:reegnz/jq-zsh-plugin";
flake = false;
@@ -24,7 +23,6 @@
home-manager,
hyprland,
nur,
xremap,
...
} @ rawInput: let
user = "zoriya";
@@ -95,24 +93,6 @@
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
})
xremap.nixosModules.default
{
services.xremap = {
serviceMode = "user";
userName = user;
config = {
modmap = {
application = "eww";
remap = {
Esc = {
launch = "eww close pannel-close && eww close pannel";
};
};
};
};
};
}
];
};
in {
+2 -4
View File
@@ -2,7 +2,5 @@
(defwidget window []
(box
:class {title != "" ? "floating module" : ""}
(label :text "${title}"
)
))
:class {(title != "" && title != 'null') ? "floating module" : ""}
(label :text {title != 'null' ? title : ""})))
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
spaces (){
hyprctl workspaces -j | jq -c 'map(.id) | sort'
hyprctl workspaces -j | jq -c 'map(.id | select(. > 0)) | sort'
}
spaces
+1 -1
View File
@@ -45,4 +45,4 @@
@import "bar/eww";
@import "pannel/scss/_init.scss";
@import "panel/scss/_init.scss";
+1 -1
View File
@@ -1,2 +1,2 @@
(include "./bar/eww.yuck")
(include "./pannel/yuck/_init.yuck")
(include "./panel/yuck/_init.yuck")
+2 -2
View File
@@ -10,6 +10,6 @@ swipe:
right:
command: "hyprctl dispatch cyclenext"
up:
command: ''bash -c "eww open pannel-closer && eww open pannel"''
command: ''bash -c "eww open panel-closer && eww open panel"''
down:
command: ''bash -c "eww close pannel-closer && eww close pannel"''
command: ''bash -c "eww close panel-closer && eww close panel"''
+29
View File
@@ -0,0 +1,29 @@
(include "./panel/yuck/_env.yuck")
(include "./panel/yuck/cards/_cardimage.yuck")
(include "./panel/yuck/cards/_cardprog.yuck")
(include "./panel/yuck/cards/_cardscr.yuck")
(include "./panel/yuck/cards/_cardradial.yuck")
(include "./panel/yuck/_stats.yuck")
(include "./panel/yuck/_music.yuck")
(include "./panel/yuck/_layout.yuck")
(defwidget closer [window]
(eventbox :onclick "eww close ${window} && eww close ${window}-closer"))
(defwindow panel-closer
:monitor 0
:geometry (geometry :width "100%" :height "100%")
:stacking "fg"
:focusable false
(closer :window "panel"))
(defwindow panel :stacking "fg"
:windowtype "normal"
:wm-ignore true
:monitor 0
:geometry (geometry :width "26%" :height "100%" :anchor "right bottom")
(panel_layout))
;; vim:ft=yuck
@@ -1,4 +1,4 @@
(defwidget pannel_layout []
(defwidget panel_layout []
(box :class "disclose-closer"
(box :orientation "vertical"
:space-evenly false
@@ -1,5 +1,5 @@
(deflisten music :initial '{"title": "", "status": "󰐍"}' "./pannel/music.sh")
(deflisten music_cover "./pannel/music.sh cover")
(deflisten music :initial '{"title": "", "status": "󰐍"}' "./panel/music.sh")
(deflisten music_cover "./panel/music.sh cover")
; TODO: Use a hook on change instead of polling.
(defpoll volume :interval "5s" "pamixer --get-volume")
-29
View File
@@ -1,29 +0,0 @@
(include "./pannel/yuck/_env.yuck")
(include "./pannel/yuck/cards/_cardimage.yuck")
(include "./pannel/yuck/cards/_cardprog.yuck")
(include "./pannel/yuck/cards/_cardscr.yuck")
(include "./pannel/yuck/cards/_cardradial.yuck")
(include "./pannel/yuck/_stats.yuck")
(include "./pannel/yuck/_music.yuck")
(include "./pannel/yuck/_layout.yuck")
(defwidget closer [window]
(eventbox :onclick "eww close ${window} && eww close ${window}-closer"))
(defwindow pannel-closer
:monitor 0
:geometry (geometry :width "100%" :height "100%")
:stacking "fg"
:focusable false
(closer :window "pannel"))
(defwindow pannel :stacking "fg"
:windowtype "normal"
:wm-ignore true
:monitor 0
:geometry (geometry :width "26%" :height "100%" :anchor "right bottom")
(pannel_layout))
;; vim:ft=yuck
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
eww windows | grep '*panel' > /dev/null
[[ $? -eq 0 ]] \
&& (eww close panel-closer && eww close panel) \
|| (eww open panel-closer && eww open panel)
+1 -1
View File
@@ -14,7 +14,7 @@ in {
enable = true;
difftastic = {
enable = true;
#display = "inline";
display = "inline";
};
signing = {
signByDefault = true;
+19 -13
View File
@@ -3,10 +3,12 @@ exec-once=discord
exec-once=eww open bar
exec-once=fusuma -c .config/fusuma/config.yaml
exec-once=/home/zoriya/.config/hypr/wallpaper.sh init
exec-once=kitty --class=scratchpad
autogenerated = 0
monitor=,2880x1800@90,auto,1.60
monitor=eDP-1,2880x1800@90,auto,1.60
workspace=eDP-1,4
#monitor=,preffered,auto,auto
input {
@@ -94,15 +96,15 @@ misc {
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2=workspace 5 silent,class:^(discord)$
windowrulev2=workspace 3 silent,class:^(discord)$
windowrulev2=float,title:^(Discord Updater)$
windowrulev2=workspace 5 silent,title:^(Discord Updater)$
windowrulev2=workspace 3 silent,title:^(Discord Updater)$
windowrulev2=workspace special:scratchpad silent,class:^(scratchpad)$
windowrulev2=nofullscreenrequest,class:^(zoom)$
windowrulev2=float,class:^(zoom)$
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
@@ -112,7 +114,7 @@ bind = $mainMod, K, cyclenext,
bind = $mainMod SHIFT, J, swapnext, prev
bind = $mainMod SHIFT, K, swapnext,
bind = $mainMod, H, splitratio, -0.05
bind = $mainMod, H, splitratio, +0.05
bind = $mainMod, L, splitratio, +0.05
#bind = $mainMod, U, addmaster,
#bind = $mainMod, I, removemaster,
bind = $mainMod, ENTER, bringactivetotop,
@@ -123,12 +125,13 @@ bind = $mainMod, T, fullscreen, 1
bind = $mainMod, F, fullscreen, 0
bind = $mainMod SHIFT, F, fakefullscreen,
bind = $mainMod, \, togglespecialworkspace,
bind = $mainMod, backslash, togglespecialworkspace, special:default
bind = $mainMod, V, togglefloating,
bind = $mainMod, E, exec, kitty
bind = $mainMod, R, exec, google-chrome-stable
bind = $mainMod, P, exec, rofi -show run
bindr = SUPER, SUPER_L, exec, ~/.config/eww/togglepanel.sh
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
@@ -147,6 +150,8 @@ bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod, S, togglespecialworkspace, default
bind = $mainMod, backslash, togglespecialworkspace, scratchpad
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
@@ -159,14 +164,15 @@ bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
bind = $mainMod SHIFT, S, movetoworkspace, special:default
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind=,XF86MonBrightnessUp,exec,brightnessctl set 10%+
bind=,XF86MonBrightnessDown,exec,brightnessctl set 10%-
bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +10%
bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -10%
bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle
bind=,XF86AudioMicMute,exec,pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindl=,XF86MonBrightnessUp,exec,brightnessctl set 10%+
bindl=,XF86MonBrightnessDown,exec,brightnessctl set 10%-
bindl=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +10%
bindl=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -10%
bindl=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle
bindl=,XF86AudioMicMute,exec,pactl set-source-mute @DEFAULT_SOURCE@ toggle
+1
View File
@@ -54,6 +54,7 @@ in {
# Misc
s = "git status";
op = "xdg-open";
wp = "~/.config/hypr/wallpaper.sh";
py = "nix-shell -p python3";
jctl = "sudo journalctl -n 1000 -fu";
};