Skip to content

Commit

Permalink
fixed monitor config hyprland
Browse files Browse the repository at this point in the history
  • Loading branch information
n0noob committed Jun 17, 2024
1 parent 074fbc0 commit a3473de
Show file tree
Hide file tree
Showing 17 changed files with 160 additions and 14 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requires [gnu/stow](https://www.gnu.org/software/stow/) for dotfiles management.

Essentials:
```
# pacman -S paru stow
# pacman -S paru stow
```

In addition, following dependencies are required:
Expand All @@ -24,8 +24,16 @@ $ paru -S hyprland wofi waybar dunst wlogout polkit-gnome ttf-jetbrains-mono-ner

Some generic packages:
```
# paru -S mpv yt-dlp refind nwg-look-bin meld git code hyprshot fd fzf
# paru -S zsh mpv exa refind nwg-look-bin meld git code hyprshot fd fzf
```
# Manual installations and configurations

* Install [oh-my-zsh](https://ohmyz.sh/)
* Change default shell to `zsh`:
```
chsh -s $(which zsh)
```
* Change default theme using `nwg-look` utility in hyprland

## Home location
dotfiles home location:
Expand Down
1 change: 1 addition & 0 deletions home-dir/.screenlayout/handle-displays-home.sh
1 change: 1 addition & 0 deletions home-dir/.screenlayout/handle-displays.sh
1 change: 1 addition & 0 deletions home-dir/.screenlayout/triple-monitor.sh
22 changes: 11 additions & 11 deletions hypr/.config/hypr/hyprland.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

########################################################################################
AUTOGENERATED HYPR CONFIG.
PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
########################################################################################
# ########################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# ########################################################################################

#
# Please note not all available settings / options are set here.
Expand All @@ -14,8 +14,8 @@ OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.

# See https://wiki.hyprland.org/Configuring/Monitors/
# monitor=,preferred,auto,auto
monitor=HDMI-1, preferred, 0x0, 1
monitor=DP-1-0, preferred, 1920x0, 1
monitor=HDMI-A-1, preferred, 0x0, 1
monitor=DP-1, preferred, 1920x0, 1
monitor=eDP-1, preferred, 3840x0, 1

# trigger when the switch is turning on
Expand All @@ -35,7 +35,7 @@ exec-once = $HOME/.config/hypr/autostart
# Some default env vars.
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
# env = GBM_BACKEND,nvidia-drm
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
# Export this in /usr/share/wayland-sessions/hyprland.desktop
# env = WLR_NO_HARDWARE_CURSORS,1
Expand Down Expand Up @@ -130,9 +130,9 @@ misc {

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# device:epic-mouse-v1 {
# sensitivity = -0.5
# }

# Example windowrule v1
# windowrule = float, ^(kitty)$
Expand Down
1 change: 1 addition & 0 deletions setup-hyprland.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sudo sed -i -e 's/Exec=Hyprland/Exec=env WLR_NO_HARDWARE_CURSORS=1 Hyprland/g' /usr/share/wayland-sessions/hyprland.desktop
33 changes: 33 additions & 0 deletions wlogout/.config/wlogout/actions
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# Ask for confirmation
cdialog () {
yad --title='Confirm?' --center --fixed --undecorated --button=Yes:0 --button=No:1 --text="You sure you wanna $1?" --text-align=center --align=center --justify=center --buttons-layout=center
}

cdialog "$1"

if [[ "$?" == 0 ]]; then
sleep 0.25s
if [[ "$1" == 'shutdown' ]]; then
systemctl poweroff
elif [[ "$1" == 'reboot' ]]; then
systemctl reboot
elif [[ "$1" == 'hibernate' ]]; then
playerctl --all-players stop
~/.scripts/lock
sleep 0.5s
systemctl suspend-then-hibernate
elif [[ "$1" == 'lock' ]]; then
~/.scripts/lock
elif [[ "$1" == 'suspend' ]]; then
playerctl --all-players stop
~/.scripts/lock
sleep 0.5s
systemctl suspend
elif [[ "$1" == 'logout' ]]; then
hyprctl dispatch exit none
fi
else
exit
fi
Binary file added wlogout/.config/wlogout/icons/hibernate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wlogout/.config/wlogout/icons/lock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wlogout/.config/wlogout/icons/logout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wlogout/.config/wlogout/icons/reboot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wlogout/.config/wlogout/icons/shutdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wlogout/.config/wlogout/icons/suspend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions wlogout/.config/wlogout/launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

LAYOUT="$HOME/.config/wlogout/layout"
STYLE="$HOME/.config/wlogout/style.css"

if [[ ! `pidof wlogout` ]]; then
wlogout --layout ${LAYOUT} --css ${STYLE} \
--buttons-per-row 2 \
--column-spacing 70 \
--row-spacing 70 \
--margin-top 220 \
--margin-bottom 220 \
--margin-left 380 \
--margin-right 380
else
pkill wlogout
fi
24 changes: 24 additions & 0 deletions wlogout/.config/wlogout/layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"label": "lock",
"text": "Lock",
"action": "~/.config/wlogout/actions lock",
"keybind": "l"
}
{
"label": "reboot",
"text": "Reboot",
"action": "~/.config/wlogout/actions reboot",
"keybind": "r"
}
{
"label": "logout",
"text": "Logout",
"action": "~/.config/wlogout/actions logout",
"keybind": "e"
}
{
"label": "shutdown",
"text": "Shutdown",
"action": "~/.config/wlogout/actions shutdown",
"keybind": "s"
}
60 changes: 60 additions & 0 deletions wlogout/.config/wlogout/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/** ********** Fonts ********** **/
* {
font-family: "CaskaydiaCove Nerd Font", "Lato", sans-serif;
font-size: 15px;
font-weight: bold;
}

/** ********** Main Window ********** **/
window {
background-color: transparent;
}

/** ********** Buttons ********** **/
button {
background-color: #161925;
color: #cdd6f4;
border: 2px solid #282838;
border-radius: 20px;
background-repeat: no-repeat;
background-position: center;
background-size: 35%;
transition: all 0.2s ease-in-out;
}

button:focus,
button:active,
button:hover {
color: #FFFFFF;
background-color: #b4befe;
outline-style: none;
}

/** ********** Icons ********** **/
#lock {
background-image: image(url("icons/lock.png"), url("/usr/share/wlogout/icons/lock.png"));
}

#logout {
background-image: image(url("icons/logout.png"), url("/usr/share/wlogout/icons/logout.png"));
}

/*
#suspend {
background-image: image(url("icons/suspend.png"), url("/usr/share/wlogout/icons/suspend.png"));
}
*/

/*
#hibernate {
background-image: image(url("icons/hibernate.png"), url("/usr/share/wlogout/icons/hibernate.png"));
}
*/

#shutdown {
background-image: image(url("icons/shutdown.png"), url("/usr/share/wlogout/icons/shutdown.png"));
}

#reboot {
background-image: image(url("icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png"));
}
2 changes: 1 addition & 1 deletion wofi/.config/wofi/config
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ content_halign=fill
insensitive=true
allow_images=true
image_size=28
gtk_dark=false
gtk_dark=true
term=kitty

0 comments on commit a3473de

Please sign in to comment.