aboutsummaryrefslogtreecommitdiff
path: root/home-manager/wm
diff options
context:
space:
mode:
authorspl3g <spleefer6@yandex.ru>2023-12-31 15:08:06 +0300
committerspl3g <spleefer6@yandex.ru>2025-05-01 14:56:39 +0300
commitb8a5c62b112859f463a53ac97b43f7f8cdc544a9 (patch)
tree8b320bc9631fbd60ffe4b701e6afee148bb2313a /home-manager/wm
parent7db487dba2262af7b7822d110122ff496070ca92 (diff)
uhm
Diffstat (limited to 'home-manager/wm')
-rw-r--r--home-manager/wm/bspwm/default.nix33
-rw-r--r--home-manager/wm/default.nix12
-rw-r--r--home-manager/wm/hyprland/cat.pngbin15467 -> 0 bytes
-rw-r--r--home-manager/wm/hyprland/default.nix31
-rw-r--r--home-manager/wm/hyprland/hyprland.conf198
-rwxr-xr-xhome-manager/wm/hyprland/scripts/battery-level.sh22
-rwxr-xr-xhome-manager/wm/hyprland/scripts/hshot45
-rwxr-xr-xhome-manager/wm/hyprland/scripts/kill7
-rwxr-xr-xhome-manager/wm/hyprland/scripts/rnew.fish8
-rwxr-xr-xhome-manager/wm/hyprland/scripts/rofi-modes20
10 files changed, 0 insertions, 376 deletions
diff --git a/home-manager/wm/bspwm/default.nix b/home-manager/wm/bspwm/default.nix
deleted file mode 100644
index 8aab6d7..0000000
--- a/home-manager/wm/bspwm/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-let
- workspaces = [
- "α"
- "β"
- "γ"
- "δ"
- "ε"
- ];
- monitors = {
- "^1" = workspaces;
- "^2" = workspaces;
- };
- settings = {
- focused_border_color = "#908caa";
- normal_border_color = "#363a4f";
- presel_feedback_color = "#752f20";
- border_width = 3;
- window_gap = 12;
- focus_follows_pointer = true;
- split_ratio = 0.5;
- };
- startupPrograms = [
- "picom -b"
- "emacs --daemon"
- "feh --bg-fill ~/dotfiles/cat.png"
- ];
-in
-{
- xsession.windowManager.bspwm = {
- enable = true;
- inherit monitors settings startupPrograms;
- };
-}
diff --git a/home-manager/wm/default.nix b/home-manager/wm/default.nix
deleted file mode 100644
index 105564d..0000000
--- a/home-manager/wm/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-let
- more = { pkgs, inputs, ... }: {
- home.packages = with pkgs; [
- kile-wl
- ];
- };
-in
-[
- # ./bspwm
- ./hyprland
- more
-]
diff --git a/home-manager/wm/hyprland/cat.png b/home-manager/wm/hyprland/cat.png
deleted file mode 100644
index 5657a78..0000000
--- a/home-manager/wm/hyprland/cat.png
+++ /dev/null
Binary files differ
diff --git a/home-manager/wm/hyprland/default.nix b/home-manager/wm/hyprland/default.nix
deleted file mode 100644
index 42e97a0..0000000
--- a/home-manager/wm/hyprland/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ pkgs, config, ... }:
-let
- configFile = builtins.readFile ./hyprland.conf;
- scripts = ''
- $scripts=${./scripts}
- '';
- overrides = ''
- exec-once=swww init && swww img ${./cat.png}
- '';
- extraConfig = scripts + configFile + overrides;
-
-in
-{
- home.packages = with pkgs; [
- swww
- brightnessctl
- slurp
- grim
- cliphist
- wtype
- webcord
- xdg-desktop-portal-hyprland
- swaylock
- ];
- wayland.windowManager.hyprland = {
- enable = true;
- package = pkgs.hyprland;
- recommendedEnvironment = true;
- inherit extraConfig;
- };
-}
diff --git a/home-manager/wm/hyprland/hyprland.conf b/home-manager/wm/hyprland/hyprland.conf
deleted file mode 100644
index a950187..0000000
--- a/home-manager/wm/hyprland/hyprland.conf
+++ /dev/null
@@ -1,198 +0,0 @@
-layerrule = blur, waybar
-monitor = eDP-1,preferred,auto,1
-monitor = ,highres,auto,1,mirror,eDP-1
-
-input {
- kb_file=
- kb_layout = us,ru
- kb_variant=
- kb_model=
- kb_options = grp:win_space_toggle
- kb_rules=
-
- follow_mouse = 1
-
- touchpad {
- natural_scroll = yes
- clickfinger_behavior = yes
- scroll_factor = 0.8
- # disable_while_typing = no
- }
-
- sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
-}
-
-general {
- gaps_in = 5
- gaps_out = 20
- border_size = 3
- col.active_border = 0xFF6e6a86
- col.inactive_border = 0xFF363a4f
- apply_sens_to_raw = 0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
- layout = dwindle
-}
-
-decoration {
- rounding = 7
- drop_shadow = false
- shadow_range = 5
- shadow_offset = [100, 100]
-}
-
-animations {
- enabled = 1
- bezier = overshot,0.13,0.99,0.29,1.1,
- animation = fade,1,4,default
- animation = workspaces,1,4,default,fade
- animation = windows,1,4,overshot,popin 95%
-}
-
-dwindle {
- pseudotile = 0 # enable pseudotiling on dwindle
-}
-
-gestures {
- workspace_swipe = yes
-}
-
-windowrulev2 = tile, class:^(Spotify)$
-windowrulev2 = float, title:^(calcure)$
-windowrulev2 = move 611 46, title:^(calcure)$
-windowrulev2 = size 702 360, title:^(calcure)$
-windowrulev2 = float, title:^(btop)$
-windowrulev2 = move 1180 46, title:^(btop)$
-windowrulev2 = size 724 460, title:^(btop)$
-windowrulev2 = float, title:^(blue)$
-windowrulev2 = move 1180 46, title:^(blue)$
-windowrulev2 = size 724 460, title:^(blue)$
-windowrulev2 = float, class:^(connman-gtk)$
-windowrulev2 = move 1262 46, class:^(connman-gtk)$
-windowrulev2 = size 650 401, class:^(connman-gtk)$
-windowrulev2 = float, title:^(Firrfox — Sharing Indicator)$
-windowrulev2 = nofullscreenrequest, title:^(Firefox — Sharing Indicator)$
-windowrulev2 = noborder, title:^(Firefox — Sharing Indicator)$
-windowrulev2 = rounding 0, title:^(Firefox — Sharing Indicator)$
-windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$
-windowrulev2 = float, title:^(firefox)$, title:^(Picture-in-Picture)$
-windowrulev2 = pin, title:^(firefox)$, title:^(Picture-in-Picture)$
-
-# some nice mouse binds
-bindm = SUPER,mouse:272,movewindow
-bindm = SUPER,mouse:273,resizewindow
-
-# Binds
-bind = SUPER_SHIFT,Q,exec,$scripts/kill
-bind = SUPER_SHIFT,E,exit,
-bind = ,0x1008FF2A,exec,nwg-bar
-bind = SUPER,V,togglefloating,
-bind = SUPER_SHIFT,V,centerwindow
-bind = SUPER,P,pseudo,
-bind = SUPER,F,fullscreen,0
-bind = SUPER_SHIFT,F,fakefullscreen
-bind = SUPER,M,fullscreen,1
-bind = SUPER,N,exec,killall -SIGUSR1 waybar
-bind = SUPER_SHIFT,N,exec,killall -SIGUSR2 waybar
-
-# Lockscreen
-bind = SUPER_SHIFT,P,exec,bash -c ~/Games/swaylock-blur.sh
-
-# Change colume
-bind = ,0x1008FF11,exec,wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ wpctl set-volume _ 5%-
-bind = ,0x1008FF13,exec,wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ wpctl set-volume _ 5%+
-bind = ,0x1008FF12,exec,wpctl status | grep '*' -m 1 | awk '{print $3 - 0}' | xargs -I _ wpctl set-mute _ toggle
-
-# Change brightness
-bind = ,0x1008FF02,exec,brightnessctl s +5%
-bind = ,0x1008FF03,exec,brightnessctl s 5%-
-
-# App binds
-bind = SUPER,Q,exec,alacritty
-bind = SUPER,B,exec,firefox
-bind = SUPER_SHIFT,R,exec,nautilus
-bind = SUPER,T,exec,telegram-desktop
-bind = SUPER,E,exec,emacsclient -c -a "emacs"
-bind = SUPER_CONTROL,E,exec,emacs
-
-# Rofi
-bind = SUPER,D,exec,killall rofi || rofi -show-icons -show drun
-bind = SUPER,C,exec,$scripts/rofi-modes
-
-# Screenshots
-bind = ,Print,exec,$scripts/hshot -m
-bind = CONTROL,Print,exec,$scripts/hshot -m -c
-bind = SHIFT,Print,exec,$scripts/hshot -s
-bind = CONTROL_SHIFT,Print,exec,$scripts/hshot -s -c
-bind = ALT,Print,exec,$scripts/hshot -w
-bind = ALT_CONTROL,Print,exec,$scripts/hshot -w -c
-
-# Cycle through windows
-bind = SUPER,J,movefocus,d
-bind = SUPER,K,movefocus,u
-bind = SUPER,H,movefocus,l
-bind = SUPER,L,movefocus,r
-
-# Resize windows
-# bind = SUPER_CONTROL,K,resizeactive,0 -50
-# bind = SUPER_CONTROL,J,resizeactive,0 50
-# bind = SUPER_CONTROL,H,resizeactive,-50 0
-# bind = SUPER_CONTROL,L,resizeactive,50 0
-bind = SUPER_CONTROL,K,splitratio,0.5
-bind = SUPER_CONTROL,J,splitratio,-0.5
-
-
-# Move windows
-bind = SUPER_SHIFT,J,movewindow,d
-bind = SUPER_SHIFT,K,movewindow,u
-bind = SUPER_SHIFT,H,movewindow,l
-bind = SUPER_SHIFT,L,movewindow,r
-
-# Move through workspaces
-bind = SUPER,1,workspace,1
-bind = SUPER,2,workspace,2
-bind = SUPER,3,workspace,3
-bind = SUPER,4,workspace,4
-bind = SUPER,5,workspace,5
-bind = SUPER,6,workspace,6
-bind = SUPER,7,workspace,7
-bind = SUPER,8,workspace,8
-bind = SUPER,9,workspace,9
-bind = SUPER,0,workspace,10
-
-# Move app to workspace
-bind = ALT,1,movetoworkspace,1
-bind = ALT,2,movetoworkspace,2
-bind = ALT,3,movetoworkspace,3
-bind = ALT,4,movetoworkspace,4
-bind = ALT,5,movetoworkspace,5
-bind = ALT,6,movetoworkspace,6
-bind = ALT,7,movetoworkspace,7
-bind = ALT,8,movetoworkspace,8
-bind = ALT,9,movetoworkspace,9
-bind = ALT,0,movetoworkspace,10
-
-# Move app to workspace silent
-bind = SUPER_SHIFT,1,movetoworkspacesilent,1
-bind = SUPER_SHIFT,2,movetoworkspacesilent,2
-bind = SUPER_SHIFT,3,movetoworkspacesilent,3
-bind = SUPER_SHIFT,4,movetoworkspacesilent,4
-bind = SUPER_SHIFT,5,movetoworkspacesilent,5
-bind = SUPER_SHIFT,6,movetoworkspacesilent,6
-bind = SUPER_SHIFT,7,movetoworkspacesilent,7
-bind = SUPER_SHIFT,8,movetoworkspacesilent,8
-bind = SUPER_SHIFT,9,movetoworkspacesilent,9
-bind = SUPER_SHIFT,0,movetoworkspacesilent,10
-
-# Mouse binds
-bind = SUPER,mouse_down,workspace,e+1
-bind = SUPER,mouse_up,workspace,e-1
-bind = SUPER,up,workspace,e+1
-
-# Startup apps
-exec-once = mako
-exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
-exec-once = /usr/lib/polkit-kde-authentication-agent-1
-exec-once = emacs --daemon
-exec-once = wl-paste --type text --watch cliphist store
-exec-once = wl-paste --type image --watch cliphist store
-exec-once = hyprctl setcursor Bibata-Modern-Ice 13
-exec-once = swww init \ No newline at end of file
diff --git a/home-manager/wm/hyprland/scripts/battery-level.sh b/home-manager/wm/hyprland/scripts/battery-level.sh
deleted file mode 100755
index cc2d5cd..0000000
--- a/home-manager/wm/hyprland/scripts/battery-level.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-while true; do
- # Check the battery level and charging status
- battery_info=$(acpi -b)
-
- # Extract the battery level from the output of `acpi`
- battery_level=$(echo $battery_info | grep -o "[0-9]*%" | sed "s/%//")
-
- # Check if the laptop is charging
- if [[ $battery_info == *"Charging"* ]]; then
- # If the laptop is charging, do nothing
- :
- else
- # If the battery level is less than 15%, send a notification
- if [ "$battery_level" -lt 15 ]; then
- notify-send "Battery Low" "Battery level is at $battery_level%. Charge your laptop."
- fi
- fi
-
- # Sleep for 5 minutes before checking the battery level again
- sleep 300
-done
diff --git a/home-manager/wm/hyprland/scripts/hshot b/home-manager/wm/hyprland/scripts/hshot
deleted file mode 100755
index 0d02b9c..0000000
--- a/home-manager/wm/hyprland/scripts/hshot
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-declare -a cmd
-
-usage() {
- echo -e "-m | monitor\n-s | slurp\n-w | active window\n-c | add copy"
-}
-
-monitor() {
- cmd=("grim -o \"\$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')\"")
-}
-
-slurp() {
- cmd=("grim -g \"\$(slurp)\"")
-}
-
-window() {
- cmd=("grim -g \"\$(hyprctl activewindow -j | jq -j '\"\(.at | .[0]),\(.at | .[1]) \(.size | .[0])x\(.size | .[1])\"')\"")
-}
-
-copy() {
- if [[ -n ${cmd[0]} ]]; then
- cmd+=("- | wl-copy")
- else
- usage
- fi
-}
-
-while getopts ":mswc" opt; do
- case ${opt} in
- m) monitor;;
- s) slurp;;
- w) window;;
- c) copy;;
- *) usage
- exit 1;;
- esac
-done
-
-if [[ -z $1 ]]; then
- usage
- exit 1
-fi
-
-bash -c "${cmd[*]}"
diff --git a/home-manager/wm/hyprland/scripts/kill b/home-manager/wm/hyprland/scripts/kill
deleted file mode 100755
index 40ab4a9..0000000
--- a/home-manager/wm/hyprland/scripts/kill
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [[ $(hyprctl activewindow -j | jq -r '.class') =~ (kitty) ]]; then
- kill $(hyprctl activewindow -j | jq '.pid') -s 9
-else
- hyprctl dispatch killactive
-fi
diff --git a/home-manager/wm/hyprland/scripts/rnew.fish b/home-manager/wm/hyprland/scripts/rnew.fish
deleted file mode 100755
index 743d7fd..0000000
--- a/home-manager/wm/hyprland/scripts/rnew.fish
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env fish
-
-ranger $argv
-set quit_cd_wd_file "$HOME/.ranger_quit_cd_wd"
-if test -s "$quit_cd_wd_file"
- kitty -d "$(cat $quit_cd_wd_file)" --detach
- true >"$quit_cd_wd_file"
-end
diff --git a/home-manager/wm/hyprland/scripts/rofi-modes b/home-manager/wm/hyprland/scripts/rofi-modes
deleted file mode 100755
index 1a5bd2e..0000000
--- a/home-manager/wm/hyprland/scripts/rofi-modes
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-case $(echo -e "bitwarden\nclipboard\nemoji\ncalc" | rofi -dmenu) in
- emoji) arg=emoji;;
- calc) arg=calc;;
- clipboard) cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy
- exit;;
- bitwarden) if [[ $XDG_BACKEND == "wayland" ]]; then
- typer=wtype
- clip=wl-copy
- else
- typer=xdotool
- clip=xclip
- fi
- rofi-rbw --typer $typer --clip $clip
- exit;;
- *)exit;;
-esac
-
-rofi -modi $arg -show $arg