add fuzzel, hyprland, qmlls to lspconfig, blur to quickshell bar
This commit is contained in:
@@ -0,0 +1,124 @@
|
|||||||
|
# output=<not set>
|
||||||
|
# font=monospace
|
||||||
|
# dpi-aware=auto
|
||||||
|
use-bold=yes
|
||||||
|
# message=
|
||||||
|
# message-mode=wrap
|
||||||
|
# prompt="> "
|
||||||
|
placeholder="Choose an application from the list"
|
||||||
|
icon-theme=kora-grey
|
||||||
|
icons-enabled=yes
|
||||||
|
# hide-before-typing=no
|
||||||
|
# fields=filename,name,generic
|
||||||
|
# password-character=*
|
||||||
|
# filter-desktop=no
|
||||||
|
# match-mode=fzf
|
||||||
|
# sort-result=yes
|
||||||
|
# match-counter=no
|
||||||
|
# delayed-filter-ms=300
|
||||||
|
# delayed-filter-limit=20000
|
||||||
|
show-actions=no
|
||||||
|
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
|
||||||
|
# launch-prefix=<not set>
|
||||||
|
# list-executables-in-path=no
|
||||||
|
|
||||||
|
anchor=center
|
||||||
|
# x-margin=0
|
||||||
|
# y-margin=0
|
||||||
|
# lines=15
|
||||||
|
# minimal-lines=no
|
||||||
|
width=45
|
||||||
|
tabs=2
|
||||||
|
# horizontal-pad=40
|
||||||
|
# vertical-pad=8
|
||||||
|
# inner-pad=0
|
||||||
|
|
||||||
|
# scaling-filter=box
|
||||||
|
# image-size-ratio=0.5
|
||||||
|
|
||||||
|
# gamma-correct-blending=no
|
||||||
|
# line-height=<use font metrics>
|
||||||
|
# letter-spacing=0
|
||||||
|
|
||||||
|
# layer=overlay
|
||||||
|
# keyboard-focus=exclusive
|
||||||
|
# exit-on-keyboard-focus-loss=yes
|
||||||
|
|
||||||
|
# cache=<not set>
|
||||||
|
|
||||||
|
# render-workers=<number of logical CPUs>
|
||||||
|
# match-workers=<number of logical CPUs>
|
||||||
|
|
||||||
|
# enable-mouse=yes
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
background=1e1e2edd
|
||||||
|
text=cdd6f4ff
|
||||||
|
prompt=bac2deff
|
||||||
|
placeholder=7f849cff
|
||||||
|
input=cdd6f4ff
|
||||||
|
match=f38ba8ff
|
||||||
|
selection-text=ff2400
|
||||||
|
selection-match=f38ba8ff
|
||||||
|
counter=7f849cff
|
||||||
|
border=f38ba8ff
|
||||||
|
|
||||||
|
[border]
|
||||||
|
width=0
|
||||||
|
radius=10
|
||||||
|
|
||||||
|
[dmenu]
|
||||||
|
# mode=text # text|index
|
||||||
|
# exit-immediately-if-empty=no
|
||||||
|
|
||||||
|
[key-bindings]
|
||||||
|
# cancel=Escape Control+g Control+c Control+bracketleft
|
||||||
|
# execute=Return KP_Enter Control+y
|
||||||
|
# execute-or-next=Tab
|
||||||
|
# execute-input=Shift+Return Shift+KP_Enter
|
||||||
|
# cursor-left=Left Control+b
|
||||||
|
# cursor-left-word=Control+Left Mod1+b
|
||||||
|
# cursor-right=Right Control+f
|
||||||
|
# cursor-right-word=Control+Right Mod1+f
|
||||||
|
# cursor-home=Home Control+a
|
||||||
|
# cursor-end=End Control+e
|
||||||
|
# delete-line=Control+Shift+BackSpace
|
||||||
|
# delete-prev=BackSpace Control+h
|
||||||
|
# delete-prev-word=Mod1+BackSpace Control+BackSpace Control+w
|
||||||
|
# delete-line-backward=Control+u
|
||||||
|
# delete-next=Delete KP_Delete Control+d
|
||||||
|
# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
|
||||||
|
# delete-line-forward=Control+k
|
||||||
|
# prev=Up Control+p
|
||||||
|
# prev-with-wrap=ISO_Left_Tab
|
||||||
|
# prev-page=Page_Up KP_Page_Up
|
||||||
|
# next=Down Control+n
|
||||||
|
# next-with-wrap=none
|
||||||
|
# next-page=Page_Down KP_Page_Down
|
||||||
|
# expunge=Shift+Delete
|
||||||
|
# clipboard-paste=Control+v XF86Paste
|
||||||
|
# primary-paste=Shift+Insert Shift+KP_Insert
|
||||||
|
|
||||||
|
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
|
||||||
|
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
|
||||||
|
# with 12, and so on.
|
||||||
|
|
||||||
|
# custom-1=Mod1+1
|
||||||
|
# custom-2=Mod1+2
|
||||||
|
# custom-3=Mod1+3
|
||||||
|
# custom-4=Mod1+4
|
||||||
|
# custom-5=Mod1+5
|
||||||
|
# custom-6=Mod1+6
|
||||||
|
# custom-7=Mod1+7
|
||||||
|
# custom-8=Mod1+8
|
||||||
|
# custom-9=Mod1+9
|
||||||
|
# custom-10=Mod1+0
|
||||||
|
# custom-11=Mod1+exclam
|
||||||
|
# custom-12=Mod1+at
|
||||||
|
# custom-13=Mod1+numbersign
|
||||||
|
# custom-14=Mod1+dollar
|
||||||
|
# custom-15=Mod1+percent
|
||||||
|
# custom-16=Mod1+dead_circumflex
|
||||||
|
# custom-17=Mod1+ampersand
|
||||||
|
# custom-18=Mod1+asterix
|
||||||
|
# custom-19=Mod1+parentleft
|
||||||
Executable
+28
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Changes the wallpaper to a randomly chosen image in a given directory
|
||||||
|
# at a set interval.
|
||||||
|
|
||||||
|
DEFAULT_INTERVAL=300 # In seconds
|
||||||
|
|
||||||
|
if [ $# -lt 1 ] || [ ! -d "$1" ]; then
|
||||||
|
printf "Usage:\n\t\e[1m%s\e[0m \e[4mDIRECTORY\e[0m [\e[4mINTERVAL\e[0m]\n" "$0"
|
||||||
|
printf "\tChanges the wallpaper to a randomly chosen image in DIRECTORY every\n\tINTERVAL seconds (or every %d seconds if unspecified)." "$DEFAULT_INTERVAL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# See awww-img(1)
|
||||||
|
RESIZE_TYPE="stretch"
|
||||||
|
export AWWW_TRANSITION_FPS="${AWWW_TRANSITION_FPS:-144}"
|
||||||
|
export AWWW_TRANSITION_STEP="${AWWW_TRANSITION_STEP:-2}"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
find "$1" -type f \
|
||||||
|
| while read -r img; do
|
||||||
|
echo "$(</dev/urandom tr -dc a-zA-Z0-9 | head -c 8):$img"
|
||||||
|
done \
|
||||||
|
| sort -n | cut -d':' -f2- \
|
||||||
|
| while read -r img; do
|
||||||
|
awww img --resize="$RESIZE_TYPE" "$img"
|
||||||
|
sleep "${2:-$DEFAULT_INTERVAL}"
|
||||||
|
done
|
||||||
|
done
|
||||||
@@ -0,0 +1,369 @@
|
|||||||
|
|
||||||
|
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
|
-- AUTOGENERATED HYPRLAND CONFIG. --
|
||||||
|
-- EDIT THIS CONFIG ACCORDING TO THE WIKI INSTRUCTIONS. --
|
||||||
|
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
|
|
||||||
|
|
||||||
|
-- This is an example Hyprland Lua config file.
|
||||||
|
-- Refer to the wiki for more information.
|
||||||
|
-- https://wiki.hypr.land/Configuring/Start/
|
||||||
|
|
||||||
|
-- Please note not all available settings / options are set here.
|
||||||
|
-- For a full list, see the wiki
|
||||||
|
|
||||||
|
-- You can (and should!!) split this configuration into multiple files
|
||||||
|
-- Create your files separately and then require them like this:
|
||||||
|
-- require("myColors")
|
||||||
|
|
||||||
|
|
||||||
|
------------------
|
||||||
|
---- MONITORS ----
|
||||||
|
------------------
|
||||||
|
|
||||||
|
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
||||||
|
hl.env("XDG_SESSION_TYPE", "wayland")
|
||||||
|
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
|
||||||
|
hl.env("LIBVA_DRIVER_NAME", "nvidia")
|
||||||
|
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
|
||||||
|
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
|
||||||
|
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
|
||||||
|
|
||||||
|
hl.monitor({
|
||||||
|
output = "HDMI-A-2",
|
||||||
|
mode = "2560x1440@143.99899",
|
||||||
|
position = "1920x0",
|
||||||
|
scale = "1.25",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.monitor({
|
||||||
|
output = "DP-4",
|
||||||
|
mode = "1920x1080@143.99",
|
||||||
|
position = "0x0",
|
||||||
|
scale = "auto",
|
||||||
|
})
|
||||||
|
|
||||||
|
local terminal = "alacritty"
|
||||||
|
local fileManager = "thunar"
|
||||||
|
local menu = "fuzzel"
|
||||||
|
|
||||||
|
hl.on("hyprland.start", function ()
|
||||||
|
-- gentoo specific
|
||||||
|
hl.exec_cmd("/usr/libexec/hyprpolkitagent")
|
||||||
|
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
|
||||||
|
|
||||||
|
hl.exec_cmd("awww-daemon")
|
||||||
|
hl.exec_cmd("mako")
|
||||||
|
hl.exec_cmd("/home/frosty/.config/hypr/awww_randomize.sh /home/frosty/.wallpapers/2k")
|
||||||
|
hl.exec_cmd("wl-paste --watch cliphist store")
|
||||||
|
hl.exec_cmd("hyprctl setcursor Adwaita 24")
|
||||||
|
hl.exec_cmd("qs -d -p ~/.config/quickshell/shell.qml")
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
---- ENVIRONMENT VARIABLES ----
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/
|
||||||
|
|
||||||
|
hl.env("XCURSOR_SIZE", "24")
|
||||||
|
hl.env("HYPRCURSOR_SIZE", "24")
|
||||||
|
hl.env("DISPLAY", ":0")
|
||||||
|
hl.env("USE_X11", "false")
|
||||||
|
-----------------------
|
||||||
|
----- PERMISSIONS -----
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/
|
||||||
|
-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly
|
||||||
|
-- for security reasons
|
||||||
|
|
||||||
|
-- hl.config({
|
||||||
|
-- ecosystem = {
|
||||||
|
-- enforce_permissions = true,
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow")
|
||||||
|
-- hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow")
|
||||||
|
-- hl.permission("/usr/(bin|local/bin)/hyprpm", "plugin", "allow")
|
||||||
|
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
---- LOOK AND FEEL ----
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
-- Refer to https://wiki.hypr.land/Configuring/Basics/Variables/
|
||||||
|
hl.config({
|
||||||
|
general = {
|
||||||
|
gaps_in = 4,
|
||||||
|
gaps_out = 5,
|
||||||
|
|
||||||
|
border_size = 1,
|
||||||
|
|
||||||
|
col = {
|
||||||
|
active_border = "rgba(0DB7D455)",
|
||||||
|
inactive_border = "rgba(595959aa)",
|
||||||
|
},
|
||||||
|
|
||||||
|
resize_on_border = true,
|
||||||
|
no_focus_fallback = true,
|
||||||
|
allow_tearing = true,
|
||||||
|
layout = "scrolling",
|
||||||
|
},
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 10,
|
||||||
|
rounding_power = 2.5,
|
||||||
|
|
||||||
|
-- Change transparency of focused and unfocused windows
|
||||||
|
active_opacity = 1.0,
|
||||||
|
inactive_opacity = 1.0,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
enabled = true,
|
||||||
|
range = 4,
|
||||||
|
render_power = 3,
|
||||||
|
color = 0xee1a1a1a,
|
||||||
|
},
|
||||||
|
|
||||||
|
blur = {
|
||||||
|
enabled = true,
|
||||||
|
xray = true,
|
||||||
|
size = 3,
|
||||||
|
passes = 1,
|
||||||
|
vibrancy = 0.1696,
|
||||||
|
},
|
||||||
|
|
||||||
|
dim_inactive=true,
|
||||||
|
dim_strength=0.1,
|
||||||
|
dim_special=0.2,
|
||||||
|
},
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "us",
|
||||||
|
follow_mouse = 2,
|
||||||
|
off_window_axis_events = 2,
|
||||||
|
},
|
||||||
|
animations = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 0,
|
||||||
|
vrr = 0,
|
||||||
|
disable_hyprland_logo = true,
|
||||||
|
disable_splash_rendering = true,
|
||||||
|
mouse_move_enables_dpms = true,
|
||||||
|
key_press_enables_dpms = true
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Default curves and animations, see https://wiki.hypr.land/Configuring/Advanced-and-Cool/Animations/
|
||||||
|
hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } })
|
||||||
|
hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } })
|
||||||
|
hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } })
|
||||||
|
hl.curve("almostLinear", { type = "bezier", points = { {0.5, 0.5}, {0.75, 1} } })
|
||||||
|
hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } })
|
||||||
|
|
||||||
|
-- Default springs
|
||||||
|
hl.curve("easy", { type = "spring", mass = 1, stiffness = 238.1191, dampening = 24.21279333 })
|
||||||
|
|
||||||
|
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||||
|
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" })
|
||||||
|
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", style = "popin 87%" })
|
||||||
|
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||||
|
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||||
|
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||||
|
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||||
|
|
||||||
|
-- Ref https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||||
|
-- "Smart gaps" / "No gaps when only"
|
||||||
|
-- uncomment all if you wish to use that.
|
||||||
|
-- hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 })
|
||||||
|
-- hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 })
|
||||||
|
-- hl.window_rule({
|
||||||
|
-- name = "no-gaps-wtv1",
|
||||||
|
-- match = { float = false, workspace = "w[tv1]" },
|
||||||
|
-- border_size = 0,
|
||||||
|
-- rounding = 0,
|
||||||
|
-- })
|
||||||
|
-- hl.window_rule({
|
||||||
|
-- name = "no-gaps-f1",
|
||||||
|
-- match = { float = false, workspace = "f[1]" },
|
||||||
|
-- border_size = 0,
|
||||||
|
-- rounding = 0,
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Layouts/Dwindle-Layout/ for more
|
||||||
|
hl.config({
|
||||||
|
dwindle = {
|
||||||
|
preserve_split = true, -- You probably want this
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Layouts/Master-Layout/ for more
|
||||||
|
hl.config({
|
||||||
|
master = {
|
||||||
|
new_status = "master",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/ for more
|
||||||
|
hl.config({
|
||||||
|
scrolling = {
|
||||||
|
fullscreen_on_one_column = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
----------------
|
||||||
|
---- MISC ----
|
||||||
|
----------------
|
||||||
|
|
||||||
|
---------------
|
||||||
|
---- INPUT ----
|
||||||
|
---------------
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.gesture({
|
||||||
|
fingers = 3,
|
||||||
|
direction = "horizontal",
|
||||||
|
action = "workspace"
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Example per-device config
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ for more
|
||||||
|
hl.device({
|
||||||
|
name = "epic-mouse-v1",
|
||||||
|
sensitivity = -0.5,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
---- KEYBINDINGS ----
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
local mainMod = "SUPER" -- Sets "Windows" key as main modifier
|
||||||
|
|
||||||
|
-- Example binds, see https://wiki.hypr.land/Configuring/Basics/Binds/ for more
|
||||||
|
hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd(terminal))
|
||||||
|
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd(menu))
|
||||||
|
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'"))
|
||||||
|
hl.bind(mainMod .. " + SPACE", hl.dsp.window.float({ action = "toggle" }))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen_state({ internal="1", client="1", action = "toggle"}))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + Q", hl.dsp.window.close())
|
||||||
|
|
||||||
|
-- change focus
|
||||||
|
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
|
||||||
|
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
|
||||||
|
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" }))
|
||||||
|
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" }))
|
||||||
|
|
||||||
|
-- move workspaces
|
||||||
|
hl.bind(mainMod .. " + SHIFT + LEFT", hl.dsp.window.swap({ direction = "left"}))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + RIGHT", hl.dsp.window.swap({ direction = "right"}))
|
||||||
|
|
||||||
|
-- Switch workspaces with mainMod + [0-9]
|
||||||
|
-- Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
for i = 1, 10 do
|
||||||
|
local key = i % 10 -- 10 maps to key 0
|
||||||
|
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i}))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
||||||
|
end
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + MINUS", hl.dsp.workspace.toggle_special("magic"))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + MINUS", hl.dsp.window.move({ workspace = "special:magic" }))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Scroll through existing workspaces with mainMod + scroll
|
||||||
|
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||||
|
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||||
|
|
||||||
|
-- Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||||
|
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||||
|
|
||||||
|
-- Laptop multimedia keys for volume and LCD brightness
|
||||||
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
|
||||||
|
|
||||||
|
-- Requires playerctl
|
||||||
|
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
||||||
|
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||||
|
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||||
|
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
---- WINDOWS AND WORKSPACES ----
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
-- See https://wiki.hypr.land/Configuring/Basics/Window-Rules/
|
||||||
|
-- and https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/
|
||||||
|
|
||||||
|
-- Example window rules that are useful
|
||||||
|
|
||||||
|
local suppressMaximizeRule = hl.window_rule({
|
||||||
|
-- Ignore maximize requests from all apps. You'll probably like this.
|
||||||
|
name = "suppress-maximize-events",
|
||||||
|
match = { class = ".*" },
|
||||||
|
|
||||||
|
suppress_event = "maximize",
|
||||||
|
})
|
||||||
|
-- suppressMaximizeRule:set_enabled(false)
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
-- Fix some dragging issues with XWayland
|
||||||
|
name = "fix-xwayland-drags",
|
||||||
|
match = {
|
||||||
|
class = "^$",
|
||||||
|
title = "^$",
|
||||||
|
xwayland = true,
|
||||||
|
float = true,
|
||||||
|
fullscreen = false,
|
||||||
|
pin = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
no_focus = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Layer rules also return a handle.
|
||||||
|
-- local overlayLayerRule = hl.layer_rule({
|
||||||
|
-- name = "no-anim-overlay",
|
||||||
|
-- match = { namespace = "^my-overlay$" },
|
||||||
|
-- no_anim = true,
|
||||||
|
-- })
|
||||||
|
-- overlayLayerRule:set_enabled(false)
|
||||||
|
|
||||||
|
-- Hyprland-run windowrule
|
||||||
|
hl.window_rule({
|
||||||
|
name = "move-hyprland-run",
|
||||||
|
match = { class = "hyprland-run" },
|
||||||
|
|
||||||
|
move = "20 monitor_h-120",
|
||||||
|
float = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
require("rules")
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
hl.window_rule({match = {title = "^(Open File)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(Open File)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(Select a File)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(Select a File)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(Choose wallpaper)(.*)$" }, size = {"(monitor_w*0.60)", "(monitor_h*0.65)"} })
|
||||||
|
hl.window_rule({match = {title = "^(Open Folder)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(Open Folder)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(Save As)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(Save As)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(Library)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(Library)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(File Upload)(.*)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(File Upload)(.*)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(.*)(wants to save)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(.*)(wants to save)$" }, float = true})
|
||||||
|
hl.window_rule({match = {title = "^(.*)(wants to open)$" }, center = true})
|
||||||
|
hl.window_rule({match = {title = "^(.*)(wants to open)$" }, float = true})
|
||||||
|
|
||||||
|
hl.window_rule({match = {title = "(.*)(Settings)(.*)$" },float = true})
|
||||||
@@ -225,7 +225,8 @@ return {
|
|||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"wgsl_analyzer",
|
"wgsl_analyzer",
|
||||||
"julials",
|
"julials",
|
||||||
"pyright"
|
"pyright",
|
||||||
|
"qmlls"
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
+53
-25
@@ -7,6 +7,7 @@ import QtQuick.Layouts
|
|||||||
|
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
import Quickshell.DBusMenu
|
import Quickshell.DBusMenu
|
||||||
|
|
||||||
Scope {
|
Scope {
|
||||||
id: root
|
id: root
|
||||||
property string time
|
property string time
|
||||||
@@ -26,15 +27,16 @@ Scope {
|
|||||||
command: ["sh", "-c", "head -1 /proc/stat"]
|
command: ["sh", "-c", "head -1 /proc/stat"]
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
onRead: data => {
|
onRead: data => {
|
||||||
if (!data) return
|
if (!data)
|
||||||
var p = data.trim().split(/\s+/)
|
return;
|
||||||
var idle = parseInt(p[4]) + parseInt(p[5])
|
var p = data.trim().split(/\s+/);
|
||||||
var total = p.slice(1, 8).reduce((a, b) => a + parseInt(b), 0)
|
var idle = parseInt(p[4]) + parseInt(p[5]);
|
||||||
|
var total = p.slice(1, 8).reduce((a, b) => a + parseInt(b), 0);
|
||||||
if (lastCpuTotal > 0) {
|
if (lastCpuTotal > 0) {
|
||||||
cpuUsage = Math.round(100 * (1 - (idle - lastCpuIdle) / (total - lastCpuTotal)))
|
cpuUsage = Math.round(100 * (1 - (idle - lastCpuIdle) / (total - lastCpuTotal)));
|
||||||
}
|
}
|
||||||
lastCpuTotal = total
|
lastCpuTotal = total;
|
||||||
lastCpuIdle = idle
|
lastCpuIdle = idle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: running = true
|
Component.onCompleted: running = true
|
||||||
@@ -48,11 +50,12 @@ Scope {
|
|||||||
command: ["sh", "-c", "free | grep Mem"]
|
command: ["sh", "-c", "free | grep Mem"]
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
onRead: data => {
|
onRead: data => {
|
||||||
if (!data) return
|
if (!data)
|
||||||
var parts = data.trim().split(/\s+/)
|
return;
|
||||||
var total = parseInt(parts[1]) || 1
|
var parts = data.trim().split(/\s+/);
|
||||||
var used = parseInt(parts[2]) || 0
|
var total = parseInt(parts[1]) || 1;
|
||||||
memUsage = Math.round(100 * used / total)
|
var used = parseInt(parts[2]) || 0;
|
||||||
|
memUsage = Math.round(100 * used / total);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component.onCompleted: running = true
|
Component.onCompleted: running = true
|
||||||
@@ -63,8 +66,8 @@ Scope {
|
|||||||
running: true
|
running: true
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
cpuProc.running = true
|
cpuProc.running = true;
|
||||||
memProc.running = true
|
memProc.running = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,12 +75,11 @@ Scope {
|
|||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
|
id: barRoot
|
||||||
required property var modelData
|
required property var modelData
|
||||||
screen: modelData
|
screen: modelData
|
||||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(screen)
|
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(screen)
|
||||||
|
|
||||||
id: barRoot
|
|
||||||
|
|
||||||
// Theme
|
// Theme
|
||||||
property color colBg: "#150d16"
|
property color colBg: "#150d16"
|
||||||
property color colFg: "#f5dbc4"
|
property color colFg: "#f5dbc4"
|
||||||
@@ -90,6 +92,10 @@ Scope {
|
|||||||
property string fontFamily: "Inter"
|
property string fontFamily: "Inter"
|
||||||
property int fontSize: 16
|
property int fontSize: 16
|
||||||
|
|
||||||
|
BackgroundEffect.blurRegion: Region {
|
||||||
|
item: barRoot.contentItem
|
||||||
|
}
|
||||||
|
|
||||||
anchors.bottom: true
|
anchors.bottom: true
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
@@ -113,7 +119,11 @@ Scope {
|
|||||||
text: modelData.id
|
text: modelData.id
|
||||||
|
|
||||||
color: isActive ? barRoot.colRed : barRoot.colFg
|
color: isActive ? barRoot.colRed : barRoot.colFg
|
||||||
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
|
font {
|
||||||
|
family: root.fontFamily
|
||||||
|
pixelSize: root.fontSize
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -130,34 +140,53 @@ Scope {
|
|||||||
property var timeStr: Qt.formatDateTime(sysClock.date, timeFmt)
|
property var timeStr: Qt.formatDateTime(sysClock.date, timeFmt)
|
||||||
|
|
||||||
color: barRoot.colFg
|
color: barRoot.colFg
|
||||||
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
|
font {
|
||||||
|
family: root.fontFamily
|
||||||
|
pixelSize: root.fontSize
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
text: timeStr
|
text: timeStr
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: { clock.timeFmt = (clock.timeFmt === "h:mm:ss AP") ? "ddd, MMM d - h:mm:ss AP" : "h:mm:ss AP" }
|
onClicked: {
|
||||||
|
clock.timeFmt = (clock.timeFmt === "h:mm:ss AP") ? "ddd, MMM d - h:mm:ss AP" : "h:mm:ss AP";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillWidth: true }
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
// CPU
|
// CPU
|
||||||
Text {
|
Text {
|
||||||
text: "CPU: " + cpuUsage + "%"
|
text: "CPU: " + cpuUsage + "%"
|
||||||
color: barRoot.colFg
|
color: barRoot.colFg
|
||||||
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
|
font {
|
||||||
|
family: root.fontFamily
|
||||||
|
pixelSize: root.fontSize
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle { width: 1; height: 16; color: root.colMuted }
|
Rectangle {
|
||||||
|
width: 1
|
||||||
|
height: 16
|
||||||
|
color: root.colMuted
|
||||||
|
}
|
||||||
|
|
||||||
// Memory
|
// Memory
|
||||||
Text {
|
Text {
|
||||||
text: "Mem: " + memUsage + "%"
|
text: "Mem: " + memUsage + "%"
|
||||||
color: barRoot.colFg
|
color: barRoot.colFg
|
||||||
font { family: root.fontFamily; pixelSize: root.fontSize; bold: true }
|
font {
|
||||||
|
family: root.fontFamily
|
||||||
|
pixelSize: root.fontSize
|
||||||
|
bold: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
spacing: 5
|
spacing: 5
|
||||||
Repeater {
|
Repeater {
|
||||||
@@ -174,7 +203,6 @@ Scope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user