This commit is contained in:
Stephan Raabe 2023-08-20 17:34:53 +02:00
parent 585834d31d
commit 18131d6f2a
10 changed files with 150 additions and 46 deletions

View File

@ -46,9 +46,9 @@ echo ""
# ------------------------------------------------------
echo ""
echo "-> Install main packages"
packagesPacman=("waybar");
packagesPacman=("waybar" "grim" "slurp");
packagesYay=("hyprland-git" "swww");
packagesYay=("hyprland-git" "swww" "swaylock");
# ------------------------------------------------------
# Install required packages

15
hypr/gtk.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"

View File

@ -21,6 +21,7 @@ exec-once = waybar
exec-once = swww init
exec-once = ~/dotfiles/scripts/updatewal-swww.sh
exec-once = dunst
exec-once = ~/dotfiles/hypr/gtk.sh
# -----------------------------------------------------
# Load pywal color file
@ -73,6 +74,10 @@ decoration {
size = 3
passes = 1
}
active_opacity = 1.0
inactive_opacity = 0.9
fullscreen_opacity = 1.0
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
@ -121,8 +126,7 @@ device:epic-mouse-v1 {
# -----------------------------------------------------
# Window rules
# -----------------------------------------------------
windowrule = tile,title:^(Outlook)(.*)$
windowrule = tile,title:^(Microsoft)(.*)$
windowrule = tile,^(Brave-browser)$
# -----------------------------------------------------
# Key bindings
@ -130,6 +134,7 @@ windowrule = tile,title:^(Microsoft)(.*)$
$mainMod = SUPER
bind = $mainMod, RETURN, exec, alacritty
bind = $mainMod, Q, killactive
bind = $mainMod, F, fullscreen
bind = $mainMod CTRL, Q, exec, ~/dotfiles/scripts/powermenu-hypr.sh
bind = $mainMod, E, exec, dolphin
bind = $mainMod, T, togglefloating
@ -143,6 +148,7 @@ bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, PRINT, exec, ~/dotfiles/scripts/grim.sh
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3

38
scripts/grim.sh Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
# ____ _ _
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
#
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
DIR="$HOME/Pictures/screenshots/"
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
# option1="Selected window (delay 3 sec)"
option2="Selected area"
option3="Fullscreen (delay 3 sec)"
# options="$option1\n$option2\n$option3"
options="$option2\n$option3"
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "Take Screenshot")
case $choice in
$option1)
scrot $DIR$NAME -d 3 -e 'xclip -selection clipboard -t image/png -i $f' -c -z -u
notify-send "Screenshot created" "Mode: Selected window"
;;
$option2)
grim -g "$(slurp)" $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
notify-send "Screenshot created" "Mode: Selected area"
;;
$option3)
sleep 3
grim $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
notify-send "Screenshot created" "Mode: Fullscreen"
;;
esac

View File

@ -9,5 +9,12 @@
# by Stephan Raabe (2023)
# -----------------------------------------------------
tmp=$(virsh --connect qemu:///system list | grep " win11 " | awk '{ print $3}')
if ([ "x$tmp" == "x" ] || [ "x$tmp" != "xrunning" ])
then
virsh --connect qemu:///system start win11
echo "Virtual Machine win11 is starting..."
sleep 3
fi
looking-glass-client &
exit

View File

@ -22,7 +22,7 @@ choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "P
case $choice in
$option1)
slock ;;
swaylock ;;
$option2)
hyprctl dispatch exit ;;
$option3)

View File

@ -0,0 +1,3 @@
$background = rgb({background.strip})
$color11 = rgb({color11.strip})
$color14 = rgb({color14.strip})

View File

@ -1,20 +1,20 @@
@define-color foreground #bfc0c0;
@define-color background #010304;
@define-color cursor #bfc0c0;
@define-color foreground #c2c3c4;
@define-color background #0d0f16;
@define-color cursor #c2c3c4;
@define-color color0 #010304;
@define-color color1 #325A65;
@define-color color2 #24636E;
@define-color color3 #466D76;
@define-color color4 #35817E;
@define-color color5 #347985;
@define-color color6 #4CAFB5;
@define-color color7 #bfc0c0;
@define-color color8 #404242;
@define-color color9 #325A65;
@define-color color10 #24636E;
@define-color color11 #466D76;
@define-color color12 #35817E;
@define-color color13 #347985;
@define-color color14 #4CAFB5;
@define-color color15 #bfc0c0;
@define-color color0 #0d0f16;
@define-color color1 #9B93B3;
@define-color color2 #D1939D;
@define-color color3 #99A3CF;
@define-color color4 #ADB2D5;
@define-color color5 #C7B9D2;
@define-color color6 #B2C2DE;
@define-color color7 #c2c3c4;
@define-color color8 #494b50;
@define-color color9 #9B93B3;
@define-color color10 #D1939D;
@define-color color11 #99A3CF;
@define-color color12 #ADB2D5;
@define-color color13 #C7B9D2;
@define-color color14 #B2C2DE;
@define-color color15 #c2c3c4;

View File

@ -2,28 +2,57 @@
"layer": "top", // Waybar at top layer
"height": 30, // Waybar height (to be removed for auto height)
"spacing": 4, // Gaps between modules (4px)
"modules-left": ["custom/appmenu", "wlr/workspaces"],
"modules-center": ["hyprland/window"],
"modules-right": ["hyprland/language", "keyboard-state", "pulseaudio", "cpu", "memory", "battery", "clock", "custom/exit", "tray"],
"modules-left": [
"custom/appmenu",
"wlr/workspaces",
"custom/brave",
"custom/outlook",
"custom/teams",
"custom/calculator",
"custom/chatgpt",
"custom/lookingglass"
],
"modules-center": [
"hyprland/window"
],
"modules-right": [
"hyprland/language",
"keyboard-state",
"pulseaudio",
"cpu",
"memory",
"battery",
"clock",
"custom/exit",
"tray"
],
"wlr/workspaces" : {
"on-click": "activate"
},
//"hyprland/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "warp-on-scroll": false,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
//},
"custom/outlook": {
"format": "",
"on-click": "brave --app=https://outlook.office.com/mail/"
},
"custom/teams": {
"format": "",
"on-click": "brave --app=https://teams.microsoft.com/go"
},
"custom/brave": {
"format": "",
"on-click": "brave"
},
"custom/chatgpt": {
"format": "",
"on-click": "brave --app=https://chat.openai.com"
},
"custom/calculator": {
"format": "",
"on-click": "~/dotfiles/scripts/calculator.sh"
},
"custom/lookingglass": {
"format": "",
"on-click": "~/dotfiles/scripts/looking-glass.sh"
},
"custom/appmenu": {
"format": "",
"on-click": "~/dotfiles/scripts/applauncher.sh"

View File

@ -40,7 +40,7 @@ button:hover {
}
#workspaces button {
padding: 0 5px;
padding: 0 10px;
color: #ffffff;
}
@ -90,9 +90,11 @@ button:hover {
#window,
#workspaces {
margin: 0 4px;
margin: 0 10px 0 6px;
}
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
@ -105,6 +107,10 @@ button:hover {
margin-left:10;
}
#custom-brave, #custom-outlook, #custom-teams, #custom-chatgpt, #custom-calculator {
margin-right:10px;
}
#custom-exit {
margin-right: 10px;
}