.config files

This commit is contained in:
Joshua Perry 2023-07-06 19:26:47 +01:00
commit 52a9d18aaf
55 changed files with 669 additions and 0 deletions

7
.config/dunst/dunstrc Normal file
View File

@ -0,0 +1,7 @@
[global]
font = "OpenDyslexic Nerd Font"
follow = mouse
background = "#17002FBF"
foreground = "#04FFF7"
frame_color = "#17002FBF"
corner_radius= 10

21
.config/eww/colors.scss Normal file
View File

@ -0,0 +1,21 @@
$text_color: #04FFF7;
$clock_background: linear-gradient(0deg, rgba(218,34,255,1) 0%, rgba(151,51,238) 100%);
$workspace_button_background: linear-gradient(0deg, rgba(168,192,255,1) 0%, rgba(63,43,150,1) 100%);
$volume_scale_color: rgba(247,121,125);
$hardware_background: linear-gradient(0deg, rgba(255,226,89,1) 0%, rgba(255,167,81,1) 100%);
$ram_scale_color: #C6FFDD;
$disk_scale_color: #12C2E9;
$battery_scale_color: #FF0099;
$font: OpenDyslexic Nerd Font;
$bar_background: transparent;
$drop_shadow_color: gray;
$notification_draw_background: $clock_background;

18
.config/eww/eww.scss Normal file
View File

@ -0,0 +1,18 @@
@import "colors.scss";
@import "widgets/clock/clock.scss";
@import "widgets/hardware_stats/hardware-tab/hardware.scss";
@import "widgets/active_window/active_window.scss";
@import "widgets/workspaces/workspaces.scss";
@import "widgets/volume/volume.scss";
@import "widgets/notification-draw/notification-draw.scss";
* {
all: unset;
font-family: $font;
font-weight: bold;
}
.bar {
background-color: $bar_background;
}

43
.config/eww/eww.yuck Normal file
View File

@ -0,0 +1,43 @@
(include "widgets/hardware_stats/hardware-tab/hardware_tab.yuck")
(include "widgets/bar/bar.yuck")
(include "widgets/active_window/active_window.yuck")
(defwindow bar
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "100%"
:height "30px"
:anchor "top center")
:stacking "fg"
:windowtype "dock"
:wm-ignore false
:exclusive true
(box
(active_window)
(bar)))
(defwindow hardware_stats
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "0px"
:height "100px"
:anchor "right top")
:stacking "fg"
:focusable false
:wm-ignore false
(box
(hardware_tab)))
(defwindow notification_draw
:monitor 0
:geometry (geometry :x "0%"
:y "0px"
:width "0px"
:height "100%"
:anchor "top right")
:stacking "fg"
:focusable false
:wm-ignore false
(box))

View File

@ -0,0 +1,4 @@
.active_window {
margin-right: -10em;
color: $text_color;
}

View File

@ -0,0 +1,10 @@
(defwidget active_window []
(box :orientation "h"
:halign "end"
:space-evenly false
:class "active_window"
{active_window_name == "" ? "" : "${active_window_name}: ${active_window_title}"}))
(defpoll active_window_name :interval "1s" "hyprctl activewindow | awk 'FNR==9{print substr($0,9)}'")
(defpoll active_window_title :interval "1s" "hyprctl activewindow | awk 'FNR==10{print substr($0,9,40)}'")

View File

@ -0,0 +1,14 @@
(include "widgets/clock/clock.yuck")
(include "widgets/hardware_stats/hardware-tab/hardware_button.yuck")
(include "widgets/volume/volume.yuck")
(include "widgets/workspaces/workspaces.yuck")
(defwidget bar []
(box :orientation "h"
:class "bar"
:halign "end"
:space-evenly "false"
(volume_button)
(hardware_button)
(workspaces_button)
(clock)))

View File

@ -0,0 +1,12 @@
.clock {
color: $text_color;
background: $clock_background;
/* Shaping and positioning */
border-radius: 10em; /* Pill-Shaped */
padding-right: 1em;
padding-left: 1em;
margin-right: 0.25em;
margin-top: 0.25em;
margin-bottom: 0.25em;
box-shadow: 1px 0px 1px 1px $drop_shadow_color;
}

View File

@ -0,0 +1,14 @@
(defwidget clock []
(eventbox :halign "end"
:onhover "eww update clock_hover=true"
:onhoverlost "eww update clock_hover=false"
:onclick notification_cmd
(box :class "clock"
{clock_hover ? clock_time_s : clock_time_ns})))
(defvar clock_hover false)
(defvar notification_cmd "widgets/notification-draw/toggle-notification-draw")
(defpoll clock_time_ns :interval "1s" "date '+\%H:\%M'")
(defpoll clock_time_s :interval "1s" "date '+\%H:\%M:\%S'")

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,3 @@
.battery-scale {
color: $battery_scale_color;
}

View File

@ -0,0 +1,15 @@
(defwidget battery []
(circular-progress :class "battery-scale"
:value {EWW_BATTERY["BAT0"].capacity}
:start-at 75
:thickness 2.5
:clockwise true
(box :orientation "v"
(box :class "hardware"
(image
:image-width 16
:path {matches(EWW_BATTERY["BAT0"].status, "Full")? bat_full_icon : matches(EWW_BATTERY["BAT0"].status, "Charging") ? bat_charging_icon : bat_icon})))))
(defvar bat_full_icon "widgets/hardware_stats/battery/full-icon.png")
(defvar bat_charging_icon "widgets/hardware_stats/battery/charging-icon.png")
(defvar bat_icon "widgets/hardware_stats/battery/battery-icon.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,3 @@
.disk-scale {
color: $disk_scale_color;
}

View File

@ -0,0 +1,11 @@
(defwidget disk_used []
(circular-progress :class "disk-scale"
:value {EWW_DISK["/"].used_perc}
:start-at 75
:thickness 2.5
:clockwise true
(image
:path disk_icon
:image-width 16)))
(defvar disk_icon "widgets/hardware_stats/disk-used/disk-icon.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,37 @@
@import "../ram-used/ram-used.scss";
@import "../disk-used/disk-used.scss";
@import "../battery/battery.scss";
.hardware_button {
border-radius: 100em; /* Circle shaped */
background: $hardware_background;
/* Positioning */
margin-top: 0.25em;
margin-right: 0.25em;
margin-bottom: 0.25em;
box-shadow: 1px 0px 1px 1px $drop_shadow_color;
}
.hardware_icon {
padding: 0.25em;
}
.hardware_tab {
background: $hardware_background;
border-radius: 1em;
padding: 0.5em;
margin-top: 0.5em;
margin-right: 0.5em;
}
.hardware_tab > box {
margin-bottom: 0.25em;
}
.hardware {
font-size: 0.4em;
}
.hardware_text {
color: $text_color;
}

View File

@ -0,0 +1,18 @@
(defwidget hardware_button []
(box :class "hardware_button"
(eventbox
:onhover "${update_hardware_reveal}true"
:onhoverlost "${hardware_clicked ? "echo" : "${update_hardware_reveal}false"}"
:onclick "${hardware_clicked ? "${update_hardware_clicked}false" : "${update_hardware_clicked}true"}"
(image
:class "hardware_icon"
:path hardware_icon
:image-width 16
))))
(defvar hardware_clicked false)
(defvar update_hardware_clicked "eww update hardware_clicked=")
(defvar update_hardware_reveal "eww update hardware_reveal=")
(defvar hardware_icon "widgets/hardware_stats/hardware-tab/button-icon.png")

View File

@ -0,0 +1,21 @@
(include "widgets/hardware_stats/ram-used/ram-used.yuck")
(include "widgets/hardware_stats/disk-used/disk-used.yuck")
(include "widgets/hardware_stats//temps/temps.yuck")
(include "widgets/hardware_stats/network-used/network-used.yuck")
(include "widgets/hardware_stats/battery/battery.yuck")
(defwidget hardware_tab []
(revealer
:reveal hardware_reveal
:transition "slideleft"
:duration "500ms"
(box :class "hardware_tab" :orientation "v"
(box :orientation "h"
(ram_used)
(disk_used))
(box :orientation "h"
(battery)
(temps))
(network_used))))
(defvar hardware_reveal false)

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,15 @@
(defwidget network_used []
(box :orientation "h"
(box :class "hardware_text"
(image
:path net_up_icon
:image-width 16)
"${EWW_NET["wlan0"].NET_UP / 1000} kB/s")
(box :class "hardware_text"
(image
:path net_down_icon
:image-width 16)
"${EWW_NET["wlan0"].NET_DOWN / 1000 } kB/s")))
(defvar net_up_icon "widgets/hardware_stats/network-used/up-icon.png")
(defvar net_down_icon "widgets/hardware_stats/network-used/down-icon.png")

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,3 @@
.ram-scale {
color: $ram_scale_color;
}

View File

@ -0,0 +1,11 @@
(defwidget ram_used []
(circular-progress :class "ram-scale"
:value {EWW_RAM.used_mem_perc}
:start-at 75
:thickness 2.5
:clockwise true
(image
:path ram_icon
:image-width 24)))
(defvar ram_icon "widgets/hardware_stats/ram-used/ram-icon.png")

View File

@ -0,0 +1,6 @@
(defwidget temps []
(box :orientation "v"
(box :class "hardware_text"
"CORE 0: ${EWW_TEMPS.CORETEMP_CORE_0}°C")
(box :class "hardware_text"
"CORE 1: ${EWW_TEMPS.CORETEMP_CORE_1}°C")))

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,16 @@
(defwidget notification_controls []
(box :orientation "h"
(eventbox
:onclick "dunstctl set-paused toggle && ${bell_toggle ? "${update_bell_toggle}false" : "${update_bell_toggle}true"}"
(image
:image-width 32
:path {bell_toggle ? muted_icon : normal_icon}))
(button
:onclick "dunstctl history-clear"
"Clear")
))
(defvar bell_toggle false)
(defvar update_bell_toggle "eww update bell_toggle=")
(defvar muted_icon "widgets/notification-draw/notification-controls/muted-icon.png")
(defvar normal_icon "widgets/notification-draw/notification-controls/normal-icon.png")

View File

@ -0,0 +1,4 @@
.draw {
background: $notification_draw_background;
padding: 1em;
}

View File

@ -0,0 +1,18 @@
(include "widgets/notification-draw/notification-controls/notification-controls.yuck")
(include "widgets/notification-draw/notifications.yuck")
(defwidget notification_draw []
(revealer
:reveal notification_reveal
:transition "slideleft"
:duration "500ms"
(box :class "draw"
:orientation "v"
:space-evenly false
(box "Notifications")
(notification_controls)
{notification_history == "[]" ? "All Caught Up!" : "" }
(notifications :json notification_history))))
(defvar notification_reveal false)
(defpoll notification_history :interval "1s" "dunstctl history | jq '.data[]'")

View File

@ -0,0 +1,4 @@
(defwidget notification [id text]
(box
text))

View File

@ -0,0 +1,8 @@
(include "widgets/notification-draw/notification.yuck")
(defwidget notifications [json]
(box :orientation "v"
(for entry in json
(notification
:id {entry.id,data}
:text {entry.summary.data}))))

View File

@ -0,0 +1,5 @@
if [ $(eww get notification_reveal) == true ]; then
eww update notification_reveal=false
else
eww update notification_reveal=true
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,8 @@
case $1 in
up)
amixer sset Master 5%+
;;
down)
amixer sset Master 5%-
;;
esac

View File

@ -0,0 +1,8 @@
.volume_button {
margin-top: 0.25em;
margin-right: 0.25em;
}
.scale {
color: $volume_scale_color;
}

View File

@ -0,0 +1,27 @@
(defwidget volume_button []
(eventbox
:onscroll "widgets/volume/setvolume {}"
:onclick "amixer sset Master ${mute_save} && ${muted ? '${update_mute_save}\'0%\' && ${update_muted}false' : '${update_mute_save}${volume_percent} && ${update_muted}true' }"
(box :class "volume_button"
(circular-progress :class "scale"
:value {replace(volume_percent, "%", "")}
:start-at 75
:thickness 2.5
:clockwise true
:width 24
(image
:image-width 16
:path {replace(volume_percent, "%", "") == 100 ? vol_high_icon : replace(volume_percent, "%", "") <= 0 ? vol_mute_icon : replace(volume_percent, "%", "") <= 25 ? vol_low_icon : replace(volume_percent, "%", "") <= 75 ? vol_mid_icon : vol_high_icon})))))
(defpoll volume_percent :interval "0.1s" "awk -F\"[][]\" '/Mono:/ { print $2 }' <(amixer sget Master)")
(defvar mute_save "0%")
(defvar muted false)
(defvar update_mute_save "eww update mute_save=")
(defvar update_muted "eww update muted=")
(defvar vol_high_icon "widgets/volume/high-icon.png")
(defvar vol_mute_icon "widgets/volume/mute-icon.png")
(defvar vol_low_icon "widgets/volume/low-icon.png")
(defvar vol_mid_icon "widgets/volume/mid-icon.png")

View File

@ -0,0 +1,18 @@
case $1 in
up)
if [ "$2" -eq "$3" ]; then
hyprctl dispatch workspace 1
else
new=$(($2+1))
hyprctl dispatch workspace $new
fi
;;
down)
if [ "$2" -eq 1 ]; then
hyprctl dispatch workspace $3
else
new=$(($2-1))
hyprctl dispatch workspace $new
fi
;;
esac

View File

@ -0,0 +1,10 @@
.workspace_button {
margin-top: 0.25em;
margin-right: 0.25em;
margin-bottom: 0.25em;
color: $text_color;
border-radius: 1em;
background: $workspace_button_background;
padding: 0.25em;
box-shadow: 1px 0px 1px 1px $drop_shadow_color;
}

View File

@ -0,0 +1,11 @@
(defwidget workspaces_button []
(eventbox
:onscroll "${setworkspace_cmd} {} ${workspace_active} ${workspace_total}"
:onclick "hyprctl dispatch workspace ${workspace_total + 1}"
(box :class "workspace_button"
"${workspace_active}/${workspace_total}")))
(defpoll workspace_total :interval "1s" "hyprctl workspaces | grep ID | awk 'BEGIN{max=0}{if(($3)>max) max=($3)}END {print max}'")
(defpoll workspace_active :interval "1s" "hyprctl activeworkspace | grep ID | awk 'END {print $3}'")
(defvar setworkspace_cmd "widgets/workspaces/setworkspace")

113
.config/hypr/hyprland.conf Normal file
View File

@ -0,0 +1,113 @@
monitor=,preferred,auto,auto
# Source a file (multi-file configs)
source = ~/.config/hypr/prefs/app_shortcut_commands.conf
source = ~/.config/hypr/prefs/settings.conf
source = ~/.config/hypr/prefs/shortcuts.conf
source = ~/.config/hypr/prefs/startup.conf
# Execute your favorite apps at launch
exec-once = $authentication_agent & $wallpaper_manager & $notification_manager & $widgets
env = XCURSOR_SIZE,24
input {
kb_layout = $keyboard_layout
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
gaps_in = $inside_gaps
gaps_out = $outside_gaps
border_size = $border_size
col.active_border = $active_border_color
col.inactive_border = $inactive_border_color
layout = dwindle
}
decoration {
rounding = 10
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = on
inactive_opacity = 0.75
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
new_is_master = true
}
gestures {
workspace_swipe = off
}
bind = $open_terminal, exec, $terminal_emulator
bind = $close_window, killactive,
bind = $exit_hyprland, exit,
bind = $open_file_explorer, exec, $file_explorer
bind = $toggle_floating, togglefloating,
bindr = $open_app_launcher,exec, $app_launcher
bind = $toggle_tile_split, togglesplit, # dwindle
bind = $open_browser, exec, $browser
bind = $lock_screen, exec ,$lockscreen_manager
bind = $window_to_new_workspace, $move_to_new_workspace
bind = $cycle_workspace, exec, $cycle_workspaces
bind = $maximise_window, fullscreen
bind = $fake_maximise, fakefullscreen
bind = $toggle_notifications, exec, $toggle_notification_draw
binde = $volume_down, exec, $volume_down_percent
binde = $volume_up, exec, $volume_up_percent
bind = $volume_mute, exec, $volume_mute_cmd
binde = $brightness_up, exec, $brightness_up_percent
binde = $brightness_down, exec, $brightness_down_percent
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View File

@ -0,0 +1,2 @@
preload = ~/.config/hypr/wallpapers/bg.jpg
wallpaper = eDP-1,~/.config/hypr/wallpapers/bg.jpg

View File

@ -0,0 +1,22 @@
$terminal_emulator=kitty
$file_explorer=dolphin
$browser=firefox
$app_launcher=rofi -config ~/.config/rofi/runner.rasi -show
$lockscreen_manager=swaylock
$volume_percent=amixer sset Master
$volume_up_percent=$volume_percent 5%+
$volume_down_percent=$volume_percent 5%-
$volume_mute_cmd=$volume_percent 0%
$brightness_percent=brightnessctl set
$brightness_up_percent=$brightness_percent 10%+
$brightness_down_percent=$brightness_percent 10%-
$move_to_new_workspace=movetoworkspacesilent ,empty
$cycle_workspaces=~/.config/eww/widgets/workspaces/setworkspace up $(eww get workspace_active) $(eww get workspace_total)
$toggle_notification_draw=~/.config/eww/widgets/notification-draw/toggle-notification-draw

View File

@ -0,0 +1,7 @@
$keyboard_layout=gb
$outside_gaps=10
$inside_gaps=5
$border_size=3.5
$active_border_color=rgb(da22ff) rgb(9733ee) 45deg
$inactive_border_color=rgba(595959aa)

View File

@ -0,0 +1,33 @@
$mainMod= SUPER
$open_terminal= $mainMod, T
$close_window= $mainMod, Q
$exit_hyprland= $mainMod, O
$open_file_explorer= $mainMod, E
$toggle_floating= $mainMod, F
$open_app_launcher= $mainMod, SUPER_L
$toggle_tile_split= $mainMod, J
$open_browser= $mainMod, B
$lock_screen= $mainMod, L
$maximise_window= $mainMod, M
$fake_maximise= SUPER_SHIFT, M
$volume_up=, code:123
$volume_down=, code:122
$volume_mute=, code:121
$brightness_up=, code:233
$brightness_down=, code:232
$window_to_new_workspace= $mainMod, W
$cycle_workspace= $mainMod, Tab
$toggle_notifications= $mainMod, N

View File

@ -0,0 +1,7 @@
$wallpaper_manager=hyprpaper
$authentication_agent=/usr/lib/polkit-kde-authentication-agent-1
$notification_manager=dunst -c ~/.config/dunst/dunstrc
$widgets=eww --restart open bar && eww open hardware_stats && eww open notification_draw

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

17
.config/kitty/kitty.conf Normal file
View File

@ -0,0 +1,17 @@
font_family OpenDyslexicM Nerd Font
font_size 7.5
background_opacity 0.5
background #17002F
foreground #04FFF7
cursor #04FFF7
color0 #04FFF7
color1 #27388f
color2 #4D99DE
color3 #4DDEDA
color4 #DE68AF
color5 #8861DE
color6 #DEDA4D
color7 #667EEA
color8 #04FFF7

45
.config/rofi/runner.rasi Normal file
View File

@ -0,0 +1,45 @@
configuration {
show-icons: true;
modi: "drun";
drun-display-format: "{name}";
cycle: true;
display-drun: ">>> ";
}
* {
font: "OpenDyslexic Nerd Font 12";
foreground: #04FFF7;
background: rgba(23,0,47,0.75);
}
inputbar {
children: [prompt,entry];
}
entry {
placeholder: "{App Name}";
}
element.alternate.normal {
background-color: transparent;
}
element.normal.normal {
background-color: transparent;
}
element.selected.normal {
background-color: #9733EE;
border-radius: 10;
}
window {
y-offset: 50;
location: center;
anchor: center;
border: 0;
}
listview {
lines: 5;
}