diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 5afe7c0..44215d3 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -4,7 +4,7 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=eDP-1, 1920x1080, 0x0, 1 -monitor=HDMI-A-1, 1920x1080, 0x-1080, 1 +monitor=HDMI-A-1, 1920x1080, -1920x0, 1 ################### ### MY PROGRAMS ### @@ -17,8 +17,9 @@ $terminal = kitty $fastTerminal = kitty --single-instance $fileManager = thunar $menu = $HOME/.config/rofi-wayland/launchers/type-6/launcher.sh -$browser = zen-browser -$privateBrowser = zen-browser --private-window +$browser = env GTK_THEME=Adwaita:light zen-browser +$privateBrowser = env GTK_THEME=Adwaita:light zen-browser --private-window +$passwordManager = keepassxc ################# ### AUTOSTART ### @@ -296,6 +297,7 @@ bind = $mainMod, Q, exec, $browser bind = $mainMod SHIFT, Q, exec, $privateBrowser bind = $mainMod, Backslash, exec, $fastTerminal bind = $mainMod, Space, exec, $menu +bind = $mainMod, X, exec, $passwordManager # Open floating terminal bind = $mainMod SHIFT, Return, exec, [float; size 800 600; move center] $fastTerminal --class kitty-float @@ -442,6 +444,9 @@ bind = $mainMod CTRL, L, layoutmsg, preselect r bind = $mainMod CTRL, J, layoutmsg, preselect d bind = $mainMod CTRL, K, layoutmsg, preselect u +# Toggle layout type +bind = $mainMod SHIFT, X, exec, hyprctl keyword general:layout "$(hyprctl getoption general:layout | grep -q 'dwindle' && echo 'master' || echo 'dwindle')" + # Window grouping bind = $mainMod CTRL ALT, M, togglegroup bind = $mainMod, comma, changegroupactive, b @@ -465,12 +470,18 @@ bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPrev, exec, playerctl previous +# Toggle waybar +bind = $mainMod SHIFT, B, exec, ~/.config/hypr/scripts/toggle_waybar.sh + # Toggle grayscale mode bind = $mainMod CTRL, G, exec, ~/.config/hypr/scripts/grayscale-toggle.sh # Game mode bind = $mainMod SHIFT, G, exec, ~/.config/hypr/scripts/gamemode.sh +# Cycle cpu frequency mode +bind = $mainMod CTRL, C, exec, ~/.config/hypr/scripts/cpufreq.sh + # Pin window bind = $mainMod CTRL, Y, pin, active diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 05200b9..56789db 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,4 +1,4 @@ -wallpaper = eDP-1,/home/greg/Pictures/Wallpapers/current/art-sakura-sea-volcano-red.jpg -wallpaper = HDMI-A-1,/home/greg/Pictures/Wallpapers/current/art-sakura-sea-volcano-red.jpg +wallpaper = eDP-1,/home/greg/Pictures/Wallpapers/current/japan_red_bridge2.jpg +wallpaper = HDMI-A-1,/home/greg/Pictures/Wallpapers/current/japan_red_bridge2.jpg ipc = on diff --git a/hypr/scripts/cpufreq.sh b/hypr/scripts/cpufreq.sh new file mode 100755 index 0000000..b9c976b --- /dev/null +++ b/hypr/scripts/cpufreq.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +CURRENT=$(sudo cpupower frequency-info | grep 'current policy: frequency should be within 400 MHz and' | awk '{printf "%.2f%s", $10, substr($11, 1, length($11)-1)}') + +echo Current freq is $CURRENT + +set_cmd() { + sudo cpupower frequency-set --max $1MHz + notify-send -t 800 "$1MHz CPU Power" +} + +if [ $CURRENT = "400.00MHz" ]; then + set_cmd 600 + exit 0 +fi + +if [ $CURRENT = "600.00MHz" ]; then + set_cmd 1000 + exit 0 +fi + +if [ $CURRENT = "1000.00MHz" ]; then + set_cmd 2000 + exit 0 +fi + +if [ $CURRENT = "2.00GHz" ]; then + set_cmd 4200 + exit 0 +fi + +if [ $CURRENT = "4.20GHz" ]; then + set_cmd 400 + exit 0 +fi + +notify-send CPU-Power Error: value is $CURRENT +exit 1 diff --git a/hypr/scripts/gamemode.sh b/hypr/scripts/gamemode.sh index 9bf4ebc..cadf618 100755 --- a/hypr/scripts/gamemode.sh +++ b/hypr/scripts/gamemode.sh @@ -5,8 +5,6 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then keyword animations:enabled 0;\ keyword decoration:shadow:enabled 0;\ keyword decoration:blur:enabled 0;\ - keyword general:gaps_in 0;\ - keyword general:gaps_out 0;\ keyword general:border_size 1;\ keyword decoration:rounding 0" exit diff --git a/hypr/scripts/toggle_waybar.sh b/hypr/scripts/toggle_waybar.sh new file mode 100755 index 0000000..c5359ae --- /dev/null +++ b/hypr/scripts/toggle_waybar.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +PROGRAM="waybar" + +if pgrep -x "$PROGRAM" > /dev/null; then + pkill -x $PROGRAM +else + $PROGRAM & +fi