Initial commit
@ -0,0 +1,10 @@
|
||||
[submodule "dotbot"]
|
||||
path = dotbot
|
||||
url = https://github.com/anishathalye/dotbot
|
||||
ignore = dirty
|
||||
[submodule "dotbot-yay"]
|
||||
path = dotbot-yay
|
||||
url = https://github.com/oxson/dotbot-yay
|
||||
[submodule "dotbot-vscode"]
|
||||
path = dotbot-vscode
|
||||
url = https://github.com/hujianxin/dotbot-vscode
|
@ -0,0 +1,14 @@
|
||||
# Guusvanmeerveld's dotfiles
|
||||
|
||||
## Install
|
||||
|
||||
### Essential Packages + Applications
|
||||
|
||||
```bash
|
||||
sh packs+apps.sh
|
||||
```
|
||||
|
||||
### Essential packages only
|
||||
```bash
|
||||
sh packs.sh
|
||||
```
|
@ -0,0 +1,67 @@
|
||||
- yay:
|
||||
# Docker
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
# Chromium
|
||||
- ungoogled-chromium
|
||||
|
||||
# Spotifyd
|
||||
- spotify-tui-bin
|
||||
- spotifyd
|
||||
|
||||
- discord
|
||||
|
||||
- syncthing-bin
|
||||
|
||||
# Development
|
||||
- android-studio
|
||||
- vscodium-bin
|
||||
- vscodium-bin-marketplace
|
||||
|
||||
- steam
|
||||
|
||||
- multimc-bin
|
||||
|
||||
- thunderbird
|
||||
|
||||
# Utils
|
||||
- htop
|
||||
- bottom
|
||||
|
||||
- neofetch
|
||||
|
||||
- doggo-bin
|
||||
- net-tools
|
||||
|
||||
- unzip
|
||||
|
||||
- openssh
|
||||
|
||||
- vscode:
|
||||
esbenp.prettier-vscode:
|
||||
status: install
|
||||
ms-vscode.atom-keybindings:
|
||||
status: install
|
||||
pkief.material-icon-theme:
|
||||
status: install
|
||||
dart-code.dart-code:
|
||||
status: install
|
||||
dart-code.flutter:
|
||||
status: install
|
||||
orta.vscode-jest:
|
||||
status: install
|
||||
ms-azuretools.vscode-docker:
|
||||
status: install
|
||||
syler.sass-indented:
|
||||
status: install
|
||||
redhat.vscode-xml:
|
||||
status: install
|
||||
dbaeumer.vscode-eslint:
|
||||
status: install
|
||||
seansassenrath.vscode-theme-superonedark:
|
||||
status: install
|
||||
mosbasik.sxhkdrc-syntax:
|
||||
status: install
|
||||
dlasagno.rasi:
|
||||
status: install
|
@ -0,0 +1,8 @@
|
||||
# Docker
|
||||
alias d="docker"
|
||||
alias dc="docker-compose up -d"
|
||||
|
||||
# yay
|
||||
alias debloat="yay -c"
|
||||
|
||||
alias aliases="micro ~/.aliases"
|
@ -0,0 +1 @@
|
||||
xsetroot -cursor_name left_ptr
|
@ -0,0 +1,26 @@
|
||||
# Instant prompt
|
||||
# source "${XDG_CACHE_HOME:-~/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
|
||||
# ZSH var
|
||||
export ZSH=~/.oh-my-zsh
|
||||
|
||||
# Theme
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Aliases
|
||||
source ~/.aliases
|
||||
|
||||
# Plugins
|
||||
plugins=(git colorize docker yarn vscode sudo alias-finder archlinux zsh-histdb zsh-autosuggestions)
|
||||
|
||||
# Oh-my-zsh
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Keybinds
|
||||
bindkey "^z" undo
|
||||
bindkey "^y" redo
|
||||
bindkey "^H" backward-kill-word
|
||||
bindkey "^ " autosuggest-accept
|
||||
|
||||
# Powerlevel10k
|
||||
source ~/.p10k.zsh
|
@ -0,0 +1,26 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Compose key
|
||||
setxkbmap -option compose:rctrl
|
||||
|
||||
# Polybar
|
||||
~/.config/polybar/launch.sh
|
||||
|
||||
# Picom
|
||||
picom --config ~/.config/picom/picom.conf &
|
||||
|
||||
# Wallpaper
|
||||
feh --bg-center ~/dotfiles/wallpaper.jpg
|
||||
|
||||
# Kill sxhkd & start a new instance
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
|
||||
# Define workspaces
|
||||
bspc monitor -d I II III IV V VI VII VIII IX X
|
||||
|
||||
bspc config border_width 1
|
||||
bspc config window_gap 6
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
@ -0,0 +1,13 @@
|
||||
Privacy Pass|ajhmfdgkijocedmfjonnpjfojldioehi
|
||||
DuckDuckGo Privacy Essentials|bkdgflcldnnnapblkhphbgpggdiikppg
|
||||
Magister Auto-Login|cekhhgcjpkahghpgeafhmkkjhidodplk
|
||||
uBlock Origin|cjpalhdlnbpafiamejdnhcphjbkeiagm
|
||||
Dark Reader|eimadpbcbfnmbkopoojfekhnkhdbieeh
|
||||
I don't care about cookies|fihnjjcciajhdojfnbdddfaoknhalnja
|
||||
NordVPN — #1 VPN Chrome Extension: Get a VPN|fjoaledfpmneenckfbpdfhkmimnjocfa
|
||||
JSON Viewer|gbmdgpbipfallnflgajpaliibnhdgobh
|
||||
Return YouTube Dislike|gebbhagfogifgggkldgodflihgfeippi
|
||||
GNOME Shell integration|gphhapmejobijbbhgpjhcjognlahblep
|
||||
SponsorBlock for YouTube - Skip Sponsorships|mnjggcdmjocbbbhaepdhchncahnbgone
|
||||
Bitwarden - Free Password Manager|nngceckbapebfimnlniiiahkandclblb
|
||||
Chromium Web Store|ocaahdebbfolfmndjeplogmgcagdmblk|https://raw.githubusercontent.com/NeverDecaf/chromium-web-store/master/updates.xml
|
@ -0,0 +1,3 @@
|
||||
--enable-features=WebUIDarkMode,Commander,BackForwardCache:enable_same_site/true,ContentSettingsRedesign,FormControlsRefresh,OmniboxSuggestionButtonRow,ParallelDownloading,QuietNotificationPrompts,ReaderMode
|
||||
--force-dark-mode
|
||||
--force-device-scale-factor=1.2
|
@ -0,0 +1,2 @@
|
||||
[icon theme]
|
||||
Inherits=mcmojave-cursors
|
@ -0,0 +1 @@
|
||||
keyserver hkp://keyserver.ubuntu.com
|
@ -0,0 +1,2 @@
|
||||
gtk-icon-theme-name = "Equilux"
|
||||
gtk-theme-name = "Equilux"
|
@ -0,0 +1,7 @@
|
||||
[Settings]
|
||||
gtk-icon-theme-name = Equilux
|
||||
gtk-theme-name = Equilux
|
||||
|
||||
gtk-cursor-theme-name = mcmojave-cursors
|
||||
|
||||
gtk-application-prefer-dark-theme = true
|
@ -0,0 +1,5 @@
|
||||
font_family Fira Code
|
||||
|
||||
font_size 15.0
|
||||
|
||||
background #303030
|
@ -0,0 +1 @@
|
||||
{}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"Alt-/": "lua:comment.comment",
|
||||
"CtrlUnderscore": "lua:comment.comment"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"colorscheme": "material-tc",
|
||||
"mkparents": true,
|
||||
"saveundo": true,
|
||||
"tabmovement": true,
|
||||
"tabsize": 2
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
Architecture = auto
|
||||
|
||||
Color
|
||||
ILoveCandy
|
||||
|
||||
CheckSpace
|
||||
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[community]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[home_ungoogled_chromium_Arch]
|
||||
SigLevel = Required TrustAll
|
||||
Server = https://download.opensuse.org/repositories/home:/ungoogled_chromium/Arch/$arch
|
@ -0,0 +1,3 @@
|
||||
dropdown_menu = { shadow = false; };
|
||||
popup_menu = { shadow = false; };
|
||||
utility = { shadow = false; };
|
@ -0,0 +1,119 @@
|
||||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/polybar/polybar
|
||||
;
|
||||
; The README contains a lot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[sectione/base]
|
||||
include-directory = ~/.config/polybar/modules
|
||||
|
||||
[colors]
|
||||
transparent = #00000000
|
||||
background = #303030
|
||||
background-alt = #282828
|
||||
|
||||
foreground = #dfdfdf
|
||||
foreground-alt = #bbb
|
||||
primary = #d32f2f
|
||||
secondary = #1976d2
|
||||
tertiary = #2e7d32
|
||||
alert = #bd2c40
|
||||
|
||||
[constants]
|
||||
height = 40
|
||||
margin-top = 10
|
||||
|
||||
[bar/workspace]
|
||||
font-0 = Roboto:pixelsize=13;1
|
||||
font-1 = Material Icons:pixelsize=15;4
|
||||
|
||||
width = 390
|
||||
height = ${constants.height}
|
||||
|
||||
radius = 20
|
||||
fixed-center = true
|
||||
|
||||
offset-x = 5
|
||||
offset-y = ${constants.margin-top}
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
modules-center = bspwm
|
||||
|
||||
wm-restack = bspwm
|
||||
|
||||
cursor-click = pointer
|
||||
|
||||
[bar/system]
|
||||
font-0 = Roboto:pixelsize=13;1
|
||||
font-1 = Material Icons:pixelsize=15;4
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
radius = 20
|
||||
fixed-center = true
|
||||
|
||||
offset-y = ${constants.margin-top}
|
||||
offset-x = 70%:10
|
||||
|
||||
padding-right = 5
|
||||
|
||||
width = 26.5%
|
||||
height = ${constants.height}
|
||||
|
||||
module-margin-right = 2
|
||||
module-margin-left = 2
|
||||
|
||||
modules-right = temperature memory cpu battery wlan eth date
|
||||
|
||||
wm-restack = bspwm
|
||||
|
||||
cursor-click = pointer
|
||||
|
||||
[bar/power]
|
||||
font-0 = Roboto:pixelsize=13;1
|
||||
font-1 = Material Icons:pixelsize=15;4
|
||||
|
||||
background = ${colors.primary}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
radius = 20
|
||||
fixed-center = true
|
||||
|
||||
offset-y = ${constants.margin-top}
|
||||
offset-x = 97%:10
|
||||
|
||||
width = ${constants.height}
|
||||
height = ${constants.height}
|
||||
|
||||
modules-center = powermenu
|
||||
|
||||
wm-restack = bspwm
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = default
|
||||
|
||||
click-left = ~/.config/polybar/scripts/power-menu.sh &
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
|
||||
[global/wm]
|
||||
margin-top = 5
|
||||
margin-bottom = 5
|
||||
|
||||
; vim:ft=dosini
|
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
# If all your bars have ipc enabled, you can also use
|
||||
# polybar-msg cmd quit
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
polybar workspace 2>&1 | tee -a /tmp/polybar.log & disown
|
||||
polybar system 2>&1 | tee -a /tmp/polybar.log & disown
|
||||
polybar power 2>&1 | tee -a /tmp/polybar.log & disown
|
||||
|
||||
echo "Polybar launched..."
|
@ -0,0 +1,3 @@
|
||||
[module/powermenu]
|
||||
type = custom/script
|
||||
exec = echo ''
|
@ -0,0 +1,63 @@
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
full-at = 100
|
||||
|
||||
format-charging-background = ${colors.tertiary}
|
||||
format-charging = <label-charging>
|
||||
|
||||
format-discharging-background = ${colors.secondary}
|
||||
format-discharging = <label-discharging>
|
||||
|
||||
label-charging = %percentage%
|
||||
|
||||
label-discharging = %percentage%
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
|
||||
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
|
||||
thermal-zone = 0
|
||||
|
||||
format = <label>
|
||||
format-background = ${colors.secondary}
|
||||
|
||||
label = %temperature-c%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = net1
|
||||
interval = 3.0
|
||||
|
||||
format-connected-background = ${colors.tertiary}
|
||||
format-connected = <label-connected>
|
||||
|
||||
label-connected = %essid%
|
||||
|
||||
format-disconnected = <label-disconnected>
|
||||
format-disconnected-background = ${colors.primary}
|
||||
|
||||
label-disconnected = %ifname%
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp1s0
|
||||
|
||||
interval = 3.0
|
||||
|
||||
label-connected =
|
||||
|
||||
label-disconnected =
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
time = %H:%M
|
||||
|
||||
date = %a %e %b
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
format = <label>
|
@ -0,0 +1,61 @@
|
||||
[module/backlight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label> <bar>
|
||||
label = BL
|
||||
|
||||
bar-width = 10
|
||||
bar-indicator = |
|
||||
bar-indicator-foreground = #fff
|
||||
bar-indicator-font = 2
|
||||
bar-fill = ─
|
||||
bar-fill-font = 2
|
||||
bar-fill-foreground = #9f78e1
|
||||
bar-empty = ─
|
||||
bar-empty-font = 2
|
||||
bar-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/backlight-acpi]
|
||||
inherit = module/backlight
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
|
||||
[module/alsa]
|
||||
type = internal/alsa
|
||||
|
||||
format-muted =
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume =
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 1
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 1
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 1
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
|
||||
format-background = ${colors.background}
|
||||
|
||||
label = %percentage:2%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
|
||||
format-background = ${colors.background}
|
||||
|
||||
label = %percentage_used%%
|
@ -0,0 +1,21 @@
|
||||
[constants]
|
||||
padding = 3
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline = ${colors.primary}
|
||||
label-focused-padding = ${constants.padding}
|
||||
|
||||
label-occupied = %index%
|
||||
label-occupied-padding = ${constants.padding}
|
||||
|
||||
label-urgent = %index%!
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = ${constants.padding}
|
||||
|
||||
label-empty = %index%
|
||||
label-empty-foreground = ${colors.foreground-alt}
|
||||
label-empty-padding = ${constants.padding}
|
@ -0,0 +1,105 @@
|
||||
* {
|
||||
accent: #d32f2f;
|
||||
background: #303030;
|
||||
background-text: #00000000;
|
||||
background-alt: #282828;
|
||||
foreground: #eeeeee;
|
||||
foreground-alt: #dedede;
|
||||
on: #66bb6a;
|
||||
off: #ef5350;
|
||||
}
|
||||
|
||||
* {
|
||||
/* General */
|
||||
|
||||
option-6-listview-spacing: 6px;
|
||||
menu-window-padding: 5px 5px;
|
||||
menu-element-padding: 3px 0px -3px 3px;
|
||||
}
|
||||
|
||||
#window {
|
||||
width: 2.8%;
|
||||
height: 23.7%;
|
||||
anchor: east;
|
||||
location: east;
|
||||
x-offset: -10px;
|
||||
y-offset: 0%;
|
||||
border: 0px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
* {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
font: @icon-font;
|
||||
}
|
||||
|
||||
#horibox {
|
||||
children: [ listview ];
|
||||
}
|
||||
|
||||
#listview {
|
||||
cycle: false;
|
||||
spacing: 2.5%;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
#element {
|
||||
orientation: horizontal;
|
||||
border: 0px;
|
||||
border-radius: 100%;
|
||||
background-color: @background-alt;
|
||||
}
|
||||
|
||||
element-text{
|
||||
background-color: @background-text;
|
||||
text-color: inherit;
|
||||
font: "Material Icons 32";
|
||||
margin: -3px -5px 3px -3px;
|
||||
}
|
||||
|
||||
element.selected {
|
||||
background-color: @accent;
|
||||
text-color: @foreground-alt;
|
||||
}
|
||||
|
||||
* {
|
||||
font: @text-font;
|
||||
}
|
||||
|
||||
#window {
|
||||
padding: @menu-window-padding;
|
||||
children: [ horibox ];
|
||||
}
|
||||
|
||||
listview {
|
||||
spacing: @option-6-listview-spacing;
|
||||
lines: 6;
|
||||
}
|
||||
|
||||
element {
|
||||
font: @icon-font;
|
||||
border: @menu-element-border;
|
||||
padding: @menu-element-padding;
|
||||
border-color: @background-alt;
|
||||
}
|
||||
|
||||
element.active,
|
||||
element.selected.urgent {
|
||||
background-color: @off;
|
||||
text-color: @foreground-alt;
|
||||
border-color: @on;
|
||||
}
|
||||
|
||||
element.selected.urgent {
|
||||
border-color: @accent;
|
||||
text-color: @foreground-alt;
|
||||
}
|
||||
|
||||
element.urgent,
|
||||
element.selected.active {
|
||||
background-color: @off;
|
||||
border-color: @accent;
|
||||
text-color: @foreground-alt;
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
## Author : Aditya Shakya (adi1090x)
|
||||
## Mail : adi1090x@gmail.com
|
||||
## Github : @adi1090x
|
||||
## Reddit : @adi1090x
|
||||
|
||||
rofi_command="rofi -theme $HOME/.config/polybar/scripts/color.rasi"
|
||||
|
||||
# Options
|
||||
shutdown=""
|
||||
reboot=""
|
||||
lock=""
|
||||
suspend=""
|
||||
logout=""
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
|
||||
|
||||
# Remapping movement
|
||||
xmodmap -e "keycode 32 = Return"
|
||||
xmodmap -e "keycode 44 = Down"
|
||||
xmodmap -e "keycode 45 = Up"
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 2)"
|
||||
|
||||
# Reset Remapping
|
||||
xmodmap -e "keycode 32 = o"
|
||||
xmodmap -e "keycode 44 = j"
|
||||
xmodmap -e "keycode 45 = k"
|
||||
|
||||
case $chosen in
|
||||
$shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
$reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
$lock)
|
||||
betterlockscreen -l &
|
||||
;;
|
||||
$suspend)
|
||||
amixer set Master mute
|
||||
betterlockscreen -l &
|
||||
sleep 0.5
|
||||
systemctl suspend
|
||||
;;
|
||||
$logout)
|
||||
bspc quit
|
||||
;;
|
||||
esac
|
@ -0,0 +1,6 @@
|
||||
configuration {
|
||||
combi-modi: "drun,window,ssh";
|
||||
font: "Fira Code 14";
|
||||
icon-theme: "Papirus";
|
||||
}
|
||||
@theme "./material.rasi"
|
@ -0,0 +1,44 @@
|
||||
* {
|
||||
background-color: #303030;
|
||||
border-color: #282828;
|
||||
text-color: #9e9e9e;
|
||||
spacing: 0;
|
||||
width: 512px;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
border: 1px 1px 0 1px;
|
||||
children: [prompt,entry];
|
||||
}
|
||||
|
||||
prompt {
|
||||
padding: 16px;
|
||||
border: 0 1px 0 0;
|
||||
}
|
||||
|
||||
textbox {
|
||||
background-color: #2e343f;
|
||||
border: 0 0 1px 0;
|
||||
border-color: #282C33;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
entry {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
listview {
|
||||
cycle: false;
|
||||
margin: 0 0 -1px 0;
|
||||
border: 1px;
|
||||
scrollbar: false;
|
||||
}
|
||||
|
||||
element {
|
||||
border: 0 0 1px 0;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: #2d2d2d;
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
# [Autologin]
|
||||
# Whether sddm should automatically log back into sessions when they exit
|
||||
# Relogin=false
|
||||
|
||||
# Name of session file for autologin session (if empty try last logged in)
|
||||
# Session=
|
||||
|
||||
# Username for autologin session
|
||||
# User=
|
||||
|
||||
|
||||
[General]
|
||||
# Halt command
|
||||
HaltCommand=/usr/bin/systemctl poweroff
|
||||
|
||||
# Input method module
|
||||
InputMethod=
|
||||
|
||||
# Comma-separated list of Linux namespaces for user session to enter
|
||||
Namespaces=
|
||||
|
||||
# Initial NumLock state. Can be on, off or none.
|
||||
# If property is set to none, numlock won't be changed
|
||||
# NOTE: Currently ignored if autologin is enabled.
|
||||
Numlock=none
|
||||
|
||||
# Reboot command
|
||||
RebootCommand=/usr/bin/systemctl reboot
|
||||
|
||||
|
||||
[Theme]
|
||||
# Current theme name
|
||||
Current=zune
|
||||
|
||||
# Cursor theme used in the greeter
|
||||
CursorTheme=
|
||||
|
||||
# Number of users to use as threshold
|
||||
# above which avatars are disabled
|
||||
# unless explicitly enabled with EnableAvatars
|
||||
DisableAvatarsThreshold=7
|
||||
|
||||
# Enable display of custom user avatars
|
||||
EnableAvatars=true
|
||||
|
||||
# Global directory for user avatars
|
||||
# The files should be named <username>.face.icon
|
||||
FacesDir=/usr/share/sddm/faces
|
||||
|
||||
# Font used in the greeter
|
||||
Font=
|
||||
|
||||
# Theme directory path
|
||||
ThemeDir=/usr/share/sddm/themes
|
||||
|
||||
|
||||
[Users]
|
||||
# Default $PATH for logged in users
|
||||
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
|
||||
|
||||
# Comma-separated list of shells.
|
||||
# Users with these shells as their default won't be listed
|
||||
HideShells=
|
||||
|
||||
# Comma-separated list of users that should not be listed
|
||||
HideUsers=
|
||||
|
||||
# Maximum user id for displayed users
|
||||
MaximumUid=60513
|
||||
|
||||
# Minimum user id for displayed users
|
||||
MinimumUid=1000
|
||||
|
||||
# Remember the session of the last successfully logged in user
|
||||
RememberLastSession=true
|
||||
|
||||
# Remember the last successfully logged in user
|
||||
RememberLastUser=true
|
||||
|
||||
# When logging in as the same user twice, restore the original session, rather than create a new one
|
||||
ReuseSession=true
|
||||
|
||||
|
||||
[Wayland]
|
||||
# Enable Qt's automatic high-DPI scaling
|
||||
EnableHiDPI=false
|
||||
|
||||
# Path to a script to execute when starting the desktop session
|
||||
SessionCommand=/usr/share/sddm/scripts/wayland-session
|
||||
|
||||
# Directory containing available Wayland sessions
|
||||
SessionDir=/usr/share/wayland-sessions
|
||||
|
||||
# Path to the user session log file
|
||||
SessionLogFile=.local/share/sddm/wayland-session.log
|
||||
|
||||
|
||||
[X11]
|
||||
# Path to a script to execute when starting the display server
|
||||
DisplayCommand=/usr/share/sddm/scripts/Xsetup
|
||||
|
||||
# Path to a script to execute when stopping the display server
|
||||
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
|
||||
|
||||
# Enable Qt's automatic high-DPI scaling
|
||||
EnableHiDPI=false
|
||||
|
||||
# The lowest virtual terminal number that will be used.
|
||||
MinimumVT=1
|
||||
|
||||
# Arguments passed to the X server invocation
|
||||
ServerArguments=-nolisten tcp
|
||||
|
||||
# Path to X server binary
|
||||
ServerPath=/usr/bin/X
|
||||
|
||||
# Path to a script to execute when starting the desktop session
|
||||
SessionCommand=/usr/share/sddm/scripts/Xsession
|
||||
|
||||
# Directory containing available X sessions
|
||||
SessionDir=/usr/share/xsessions
|
||||
|
||||
# Path to the user session log file
|
||||
SessionLogFile=.local/share/sddm/xorg-session.log
|
||||
|
||||
# Path to the Xauthority file
|
||||
UserAuthFile=.Xauthority
|
||||
|
||||
# Path to xauth binary
|
||||
XauthPath=/usr/bin/xauth
|
||||
|
||||
# Path to Xephyr binary
|
||||
XephyrPath=/usr/bin/Xephyr
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
[global]
|
||||
device_type = "computer"
|
||||
device_name = "Computer"
|
||||
|
||||
use_keyring = true
|
||||
|
||||
cache_path = "/home/guus/.spotifyd"
|
||||
|
||||
initial_volume = "50"
|
||||
|
||||
usempris = true
|
@ -0,0 +1,11 @@
|
||||
Host github.com
|
||||
User git
|
||||
HostName github.com
|
||||
PreferredAuthentications publickey
|
||||
IdentityFile ~/.ssh/github
|
||||
|
||||
Host gitlab.com
|
||||
User git
|
||||
HostName gitlab.com
|
||||
PreferredAuthentications publickey
|
||||
IdentityFile ~/.ssh/gitlab
|
@ -0,0 +1,123 @@
|
||||
#
|
||||
# wm independent hotkeys
|
||||
#
|
||||
|
||||
# terminal emulator
|
||||
super + Return
|
||||
kitty
|
||||
|
||||
# program launcher
|
||||
super + @space
|
||||
rofi -show drun -show-icons
|
||||
|
||||
# make sxhkd reload its configuration files:
|
||||
super + Escape
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
#
|
||||
# system hotkeys
|
||||
#
|
||||
|
||||
super + alt + e
|
||||
systemctl poweroff
|
||||
|
||||
super + alt + r
|
||||
systemctl reboot
|
||||
|
||||
#
|
||||
# bspwm hotkeys
|
||||
#
|
||||
|
||||
# quit/restart bspwm
|
||||
super + shift + {q,r}
|
||||
bspc {quit,wm -r}
|
||||
|
||||
# close and kill
|
||||
super + {_,shift + }w
|
||||
bspc node -{c,k}
|
||||
|
||||
# alternate between the tiled and monocle layout
|
||||
super + m
|
||||
bspc desktop -l next
|
||||
|
||||
#
|
||||
# state/flags
|
||||
#
|
||||
|
||||
# set the window state
|
||||
super + {t,shift + t,s,f}
|
||||
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
|
||||
|
||||
# set the node flags
|
||||
super + ctrl + {m,x,y,z}
|
||||
bspc node -g {marked,locked,sticky,private}
|
||||
|
||||
#
|
||||
# focus/swap
|
||||
#
|
||||
|
||||
# focus the node in the given direction
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
# focus the node for the given path jump
|
||||
super + {p,b,comma,period}
|
||||
bspc node -f @{parent,brother,first,second}
|
||||
|
||||
# focus the next/previous window in the current desktop
|
||||
super + {_,shift + }c
|
||||
bspc node -f {next,prev}.local.!hidden.window
|
||||
|
||||
# focus the next/previous desktop in the current monitor
|
||||
super + bracket{left,right}
|
||||
bspc desktop -f {prev,next}.local
|
||||
|
||||
# focus the last node/desktop
|
||||
super + {grave,Tab}
|
||||
bspc {node,desktop} -f last
|
||||
|
||||
# focus the older or newer node in the focus history
|
||||
super + {o,i}
|
||||
bspc wm -h off; \
|
||||
bspc node {older,newer} -f; \
|
||||
bspc wm -h on
|
||||
|
||||
# focus or send to the given desktop
|
||||
super + {_,shift + }{1-9,0}
|
||||
bspc {desktop -f,node -d} '^{1-9,10}'
|
||||
|
||||
#
|
||||
# preselect
|
||||
#
|
||||
|
||||
# preselect the direction
|
||||
super + ctrl + {h,j,k,l}
|
||||
bspc node -p {west,south,north,east}
|
||||
|
||||
# preselect the ratio
|
||||
super + ctrl + {1-9}
|
||||
bspc node -o 0.{1-9}
|
||||
|
||||
# cancel the preselection for the focused node
|
||||
super + ctrl + space
|
||||
bspc node -p cancel
|
||||
|
||||
# cancel the preselection for the focused desktop
|
||||
super + ctrl + shift + space
|
||||
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
|
||||
|
||||
#
|
||||
# move/resize
|
||||
#
|
||||
|
||||
# expand a window by moving one of its side outward
|
||||
super + alt + {h,j,k,l}
|
||||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||
|
||||
# contract a window by moving one of its side inward
|
||||
super + alt + shift + {h,j,k,l}
|
||||
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
||||
|
||||
# move a floating window
|
||||
super + {Left,Down,Up,Right}
|
||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"window.zoomLevel": 2,
|
||||
"editor.codeLensFontFamily": "'Fira Code'",
|
||||
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
|
||||
"editor.inlayHints.fontFamily": "'Fira Code'",
|
||||
"debug.console.fontFamily": "'Fira Code'",
|
||||
"terminal.integrated.fontFamily": "Fira Code",
|
||||
"editor.fontLigatures": true,
|
||||
"editor.formatOnSave": true,
|
||||
"security.workspace.trust.enabled": false,
|
||||
"workbench.colorTheme": "Super One Dark",
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"explorer.confirmDelete": false,
|
||||
"files.associations": {
|
||||
"sxhkdrc": "sxhkdrc",
|
||||
"*.rasi": "rasi"
|
||||
},
|
||||
"atomKeymap.promptV3Features": true,
|
||||
"editor.multiCursorModifier": "ctrlCmd",
|
||||
"editor.formatOnPaste": true,
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
"workbench.startupEditor": "none",
|
||||
"git.enableSmartCommit": true,
|
||||
"git.confirmSync": false,
|
||||
"git.autofetch": true
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG="install.conf.yaml"
|
||||
DOTBOT_DIR="dotbot"
|
||||
|
||||
PLUGIN_YAY="dotbot-yay/yay.py"
|
||||
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
cd "${BASEDIR}"
|
||||
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
|
||||
git submodule update --init --recursive "${DOTBOT_DIR}"
|
||||
|
||||
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
|
@ -0,0 +1 @@
|
||||
./install -p dotbot-yay/yay.py -p dotbot-vscode/vscode.py -c applications.conf.yaml
|
@ -0,0 +1 @@
|
||||
./install -p dotbot-yay/yay.py -c packages.conf.yaml
|
@ -0,0 +1,13 @@
|
||||
- defaults:
|
||||
link:
|
||||
create: true
|
||||
relink: true
|
||||
|
||||
- link:
|
||||
# sddm
|
||||
/etc/sddm.conf.d/default.conf: config/sddm.conf
|
||||
|
||||
# System
|
||||
/etc/pacman.conf: config/pacman.conf
|
||||
|
||||
/usr/share/icons/default/index.theme: config/cursors.theme
|
@ -0,0 +1,43 @@
|
||||
- defaults:
|
||||
link:
|
||||
create: true
|
||||
relink: true
|
||||
|
||||
- clean: ["~"]
|
||||
|
||||
- link:
|
||||
# WM
|
||||
~/.config/bspwm/bspwmrc: config/bspwmrc
|
||||
~/.config/sxhkd/sxhkdrc: config/sxhkdrc
|
||||
~/.config/polybar: config/polybar
|
||||
~/.config/picom/picom.conf: config/picom.conf
|
||||
|
||||
# Shell
|
||||
~/.config/kitty/kitty.conf: config/kitty.conf
|
||||
~/.aliases: config/.aliases.sh
|
||||
~/.zshrc: config/.zshrc
|
||||
~/gpg.conf: config/gpg.conf
|
||||
~/.ssh/config: config/ssh
|
||||
~/.xinitrc: config/.xinitrc
|
||||
|
||||
# Micro
|
||||
~/.config/micro/settings.json: config/micro/settings.json
|
||||
~/.config/micro/bindings.json: config/micro/bindings.json
|
||||
|
||||
# Applications
|
||||
~/.config/spotifyd/spotifyd.conf: config/spotifyd.conf
|
||||
~/.gtkrc-2.0: config/gtk/2.ini
|
||||
~/.config/gtk-3.0/settings.ini: config/gtk/3.ini
|
||||
~/.config/VSCodium/User/settings.json: config/vscodium.json
|
||||
~/.config/chromium-flags.conf: config/chromium/flags
|
||||
~/.config/rofi: config/rofi/
|
||||
|
||||
# System
|
||||
|
||||
- shell:
|
||||
- [git submodule update --init --recursive, Installing submodules]
|
||||
- [scripts/install_yay.sh, Installing yay]
|
||||
# - [scripts/ungoogled_chromium, Setting up ungoogled chromium repo]
|
||||
|
||||
- create:
|
||||
- ~/.config
|
@ -0,0 +1,43 @@
|
||||
- yay:
|
||||
# Shell
|
||||
- kitty
|
||||
- zsh
|
||||
|
||||
# Theming
|
||||
- equilux-theme
|
||||
- mcmojave-cursors-git
|
||||
|
||||
# Xorg + video
|
||||
- sddm
|
||||
- xorg-server
|
||||
- xorg-xinit
|
||||
- xorg-xsetroot
|
||||
|
||||
# WM
|
||||
- bspwm
|
||||
- sxhkd
|
||||
- polybar
|
||||
- picom
|
||||
- feh
|
||||
- rofi
|
||||
- papirus-icon-theme
|
||||
- playerctl
|
||||
|
||||
# Qt
|
||||
- qt5-graphicaleffects
|
||||
- qt5-quickcontrols2
|
||||
|
||||
# Networking
|
||||
- networkmanager
|
||||
|
||||
# Fonts
|
||||
- ttf-roboto
|
||||
- ttf-fira-code
|
||||
- ttf-material-design-icons
|
||||
- noto-fonts-emoji
|
||||
|
||||
# Locales
|
||||
- locale-en-nl-git
|
||||
|
||||
# Development
|
||||
- flutter
|
@ -0,0 +1,6 @@
|
||||
./pre-install
|
||||
|
||||
./install-packages
|
||||
./install-applications
|
||||
|
||||
./post-install
|
@ -0,0 +1,31 @@
|
||||
sudo systemctl enable sddm
|
||||
|
||||
# NetworkManager
|
||||
sudo systemctl enable NetworkManager --now
|
||||
|
||||
# Flutter
|
||||
sudo gpasswd -a $USER flutterusers
|
||||
|
||||
# Spotifyd
|
||||
sudo systemctl enable spotifyd --machine=$USER@.host --user --now
|
||||
|
||||
# Syncthing
|
||||
sudo systemctl enable --now syncthing@$USER
|
||||
|
||||
# sddm
|
||||
sudo cp themes/zune /usr/share/sddm/themes/ -r
|
||||
|
||||
# Micro
|
||||
micro -plugin install quoter filemanager
|
||||
|
||||
# Docker
|
||||
sudo usermod -aG docker guus
|
||||
|
||||
# ZSH
|
||||
scripts/install-z.sh
|
||||
|
||||
# Update user
|
||||
scripts/chuser.sh
|
||||
|
||||
# Set locale
|
||||
scripts/set_locale.sh
|
@ -0,0 +1,2 @@
|
||||
./install
|
||||
sudo ./install -c "install-root.conf.yaml"
|
@ -0,0 +1 @@
|
||||
sudo chsh -s /bin/zsh guus
|
@ -0,0 +1,20 @@
|
||||
# Install ohmyzsh
|
||||
if [ -d "$ZSH" ]; then
|
||||
echo "ohmyzsh is installed"
|
||||
else
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||||
fi
|
||||
|
||||
mkdir -p ~/.oh-my-zsh/custom/plugins
|
||||
|
||||
export PLUGINS=~/.oh-my-zsh/custom/plugins
|
||||
export THEMES=~/.oh-my-zsh/themes
|
||||
|
||||
# Install zsh-histdb
|
||||
git -C $PLUGINS/zsh-histdb pull || git clone https://github.com/larkery/zsh-histdb $PLUGINS/zsh-histdb
|
||||
|
||||
# Install zsh-autosuggestions
|
||||
git -C $PLUGINS/zsh-autosuggestions pull || git clone https://github.com/zsh-users/zsh-autosuggestions $PLUGINS/zsh-autosuggestions
|
||||
|
||||
# Install Powerlevel10k
|
||||
git -C $THEMES/powerlevel10k pull || git clone https://github.com/romkatv/powerlevel10k $THEMES/powerlevel10k
|
@ -0,0 +1,9 @@
|
||||
# Download
|
||||
git -C /tmp/yay pull || git clone https://aur.archlinux.org/yay /tmp/yay/
|
||||
|
||||
cd yay
|
||||
|
||||
# Install
|
||||
makepkg -sci --noconfirm
|
||||
|
||||
yay --answerclean None --answerdiff None --answeredit None --answerupgrade None --removemake --save
|
@ -0,0 +1,5 @@
|
||||
echo 'en_NL.UTF-8' > /etc/locale.gen
|
||||
|
||||
locale-gen
|
||||
|
||||
localectl set-locale en_NL.UTF-8
|
@ -0,0 +1,7 @@
|
||||
curl -s 'https://download.opensuse.org/repositories/home:/ungoogled_chromium/Arch/x86_64/home_ungoogled_chromium_Arch.key' | sudo pacman-key -a -
|
||||
echo '
|
||||
[home_ungoogled_chromium_Arch]
|
||||
SigLevel = Required TrustAll
|
||||
Server = https://download.opensuse.org/repositories/home:/ungoogled_chromium/Arch/$arch' | sudo tee --append /etc/pacman.conf
|
||||
|
||||
sudo pacman -Sy
|
@ -0,0 +1,9 @@
|
||||
__________ __ .__
|
||||
\______ \ ____ | | _|__| ____
|
||||
| _// _ \| |/ / |/ \
|
||||
| | ( <_> ) <| | | \
|
||||
|____|_ /\____/|__|_ \__|___| /
|
||||
\/ \/ \/
|
||||
|
||||
https://github.com/Rokin05
|
||||
https://www.opendesktop.org/member/494638/
|
@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
@ -0,0 +1,231 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Layouts 1.3
|
||||
import "components"
|
||||
|
||||
// ============================================================
|
||||
// BE AWARE, THIS IS A DELEGATE FILE of Skel (Main.qml)
|
||||
// You can access on Skel propriety here !
|
||||
// ============================================================
|
||||
|
||||
GridLayout {
|
||||
id: grid
|
||||
property bool newUser: false // Switch signal userlist < > usernameBox view.
|
||||
readonly property string usernameValue: newUser ? usernameBox.text : userlist.selectedUserLogin
|
||||
readonly property string passwordValue: passwordBox.text
|
||||
|
||||
// For Skel.qml & javascript function.
|
||||
readonly property real miniloginSize: Math.round(miniloginButton.width + miniloginButton.anchors.leftMargin)
|
||||
|
||||
implicitWidth: isFull ? root.width : taskbarSize
|
||||
LayoutMirroring.enabled: isMirror
|
||||
anchors.left: parent.left
|
||||
columns: (isHalf || isFull) ? 1 : 999
|
||||
columnSpacing: 0 // = Vertical (view) adjust.
|
||||
rowSpacing: 45
|
||||
|
||||
// From userlist to Skel.qml : Propagation "onClicked" like.
|
||||
signal userSelected()
|
||||
|
||||
// ==============
|
||||
// Row/Column 1/2
|
||||
// ==============
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: isFull ? root.width : isHalf ? taskbarSize : iconSize
|
||||
Layout.preferredHeight: grid.newUser ? newUserAvatar.height : userlist.height
|
||||
|
||||
UserList {
|
||||
id: userlist
|
||||
//width: isFull ? root.width : implicitWidth
|
||||
anchors.horizontalCenter : parent.horizontalCenter
|
||||
orientationUserlist: (isHalf || isFull) ? "horizontal" : "vertical"
|
||||
showUsername: (isHalf || isFull) ? true : false
|
||||
clip: (isFull || !isHalf) ? false : true
|
||||
visible: grid.newUser ? false : true
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
onUserSelected: grid.userSelected()
|
||||
}
|
||||
|
||||
User {
|
||||
id: newUserAvatar
|
||||
anchors.horizontalCenter : parent.horizontalCenter
|
||||
width: parent.width
|
||||
faceSize: config["userlist/icon.size"]
|
||||
borderSize: config["userlist/frame.spacing"]
|
||||
avatarPath: config["path/login.icon.default"]
|
||||
name: textConstants.prompt
|
||||
constrainText: true
|
||||
isCurrent: true
|
||||
showUsername: (isHalf || isFull) ? true : false
|
||||
visible: grid.newUser ? true : false
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
font.pointSize: 9
|
||||
font.bold: false
|
||||
font.italic: false
|
||||
onSelectMe: grid.userSelected()
|
||||
}
|
||||
}
|
||||
|
||||
// ==============
|
||||
// Row/Column 2/2
|
||||
// ==============
|
||||
|
||||
ColumnLayout {
|
||||
Layout.preferredWidth: isFull ? root.width : taskbarSize
|
||||
LayoutMirroring.enabled: isMirror
|
||||
|
||||
UsernameLabel {
|
||||
Layout.leftMargin: 4
|
||||
Layout.rightMargin: 4
|
||||
text: userlist.selectedUserName
|
||||
visible: ((taskbarSize - iconSize) >= implicitWidth) && !grid.newUser && !(isHalf || isFull)
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
}
|
||||
|
||||
NotificationMessage {
|
||||
id: notification
|
||||
LayoutMirroring.enabled: isMirror
|
||||
Layout.maximumWidth: isFull ? root.width : isHalf ? taskbarSize : (taskbarSize - iconSize)
|
||||
Layout.minimumWidth: (taskbarSize - iconSize)
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: text == "" ? 1 : implicitHeight
|
||||
Layout.leftMargin: 4
|
||||
Layout.rightMargin: 4
|
||||
horizontalAlignment: (isHalf || isFull) ? Text.AlignHCenter : Text.AlignLeft
|
||||
visible: textboxVisible()
|
||||
}
|
||||
|
||||
TextBox {
|
||||
id: usernameBox
|
||||
Layout.alignment: (isHalf || isFull) ? Qt.AlignCenter : Qt.AlignVCenter | Qt.AlignLeft
|
||||
Layout.preferredWidth: textboxWidth()
|
||||
Layout.topMargin: 5
|
||||
echoMode: TextInput.Normal
|
||||
placeholderText: textConstants.userName
|
||||
clearButtonShown: true
|
||||
revealPasswordButtonShown: false
|
||||
focus: visible ? true : false
|
||||
visible: textboxVisible() && grid.newUser
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
onAccepted: passwordBox.forceActiveFocus()
|
||||
// See : https://github.com/sddm/sddm/issues/202 (keyboard.layouts)
|
||||
Keys.onPressed: keyboardButton.displayText = keyboard.layouts[keyboard.currentLayout].longName;
|
||||
}
|
||||
|
||||
TextBox {
|
||||
id: passwordBox
|
||||
Layout.alignment: (isHalf || isFull) ? Qt.AlignCenter : Qt.AlignVCenter | Qt.AlignLeft
|
||||
Layout.preferredWidth: textboxWidth()
|
||||
Layout.topMargin: 5
|
||||
echoMode: TextInput.Password
|
||||
placeholderText: textConstants.password
|
||||
clearButtonShown: true
|
||||
revealPasswordButtonShown: true
|
||||
focus: usernameBox.visible ? false : true
|
||||
visible: textboxVisible()
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
onAccepted: grid.login()
|
||||
Keys.onPressed: keyboardButton.displayText = keyboard.layouts[keyboard.currentLayout].longName;
|
||||
}
|
||||
|
||||
LoginButton {
|
||||
id: loginButton
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.preferredWidth: passwordBox.width
|
||||
Layout.topMargin: 5
|
||||
text: textConstants.login
|
||||
enabled: (grid.newUser && grid.usernameValue == "") ? false : true
|
||||
visible: (isHalf || isFull) ? true : false
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
onClicked: grid.login()
|
||||
}
|
||||
|
||||
// *info : im not a ColumnLayout direct child.
|
||||
LoginButton {
|
||||
id: miniloginButton
|
||||
parent: passwordBox
|
||||
LayoutMirroring.enabled: isMirror
|
||||
anchors.left: parent.right
|
||||
anchors.leftMargin: 4
|
||||
text: isMirror ? "<" : ">"
|
||||
enabled: (grid.newUser && grid.usernameValue == "") ? false : true
|
||||
visible: !(isHalf || isFull) ? true : false
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: 500 } }
|
||||
onClicked: grid.login()
|
||||
}
|
||||
}
|
||||
|
||||
//Item { id: keepmeImAutoWidthAnchor; anchors.fill: parent } //finalydontkeepmeidoshit
|
||||
|
||||
function textboxWidth() {
|
||||
if (!isFull) {
|
||||
var size = (taskbarSize - iconSize) - miniloginSize;
|
||||
if (size < 0) return 0;
|
||||
if (size > parseInt(config["textfield/width"])) return parseInt(config["textfield/width"]);
|
||||
return size;
|
||||
}
|
||||
return parseInt(config["textfield/width"]);
|
||||
}
|
||||
|
||||
function textboxVisible() {
|
||||
if (!isFull) {
|
||||
var size = (taskbarSize - iconSize) - miniloginSize;
|
||||
if (size < parseInt(config["textfield/width.min"])) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ==============
|
||||
// Misc
|
||||
// ==============
|
||||
|
||||
Keys.onPressed: {
|
||||
if (event.key == Qt.Key_Left) userlist.decrementCurrentIndex();
|
||||
if (event.key == Qt.Key_Right) userlist.incrementCurrentIndex();
|
||||
if (event.key == Qt.Key_Up) userlist.incrementCurrentIndex();
|
||||
if (event.key == Qt.Key_Down) userlist.decrementCurrentIndex();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: sddm
|
||||
onLoginSucceeded: grid.opacity = 0
|
||||
onLoginFailed: {
|
||||
notification.msg = textConstants.loginFailed;
|
||||
passwordBox.selectAll();
|
||||
passwordBox.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
function login() {
|
||||
if (grid.usernameValue !== "") {
|
||||
loginButton.visible ? loginButton.forceActiveFocus() : miniloginButton.forceActiveFocus();
|
||||
sddm.login(grid.usernameValue, grid.passwordValue, sessionButton.currentIndex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Layouts 1.3
|
||||
import "components"
|
||||
import "components/artwork/fonts"
|
||||
|
||||
Skel {
|
||||
id: root
|
||||
width: 1920
|
||||
height: 1080
|
||||
|
||||
// Init.
|
||||
Fonts { id: fonts }
|
||||
TextConstants { id: textConstants }
|
||||
|
||||
|
||||
menu: Item { id: menu; anchors.fill: parent }
|
||||
free: Item { id: free; anchors.fill: parent }
|
||||
|
||||
|
||||
|
||||
// ===================
|
||||
// Objects
|
||||
// ===================
|
||||
|
||||
Screensaver { id: screensaver; anchors.fill: parent }
|
||||
|
||||
Login {
|
||||
id: login
|
||||
parent: isFull ? free : menu
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: isMini ? false : true
|
||||
//Rectangle {anchors.fill: parent; color: "red"; opacity: 0.1} //DEBUG
|
||||
}
|
||||
|
||||
Clock { id: clock; parent: free }
|
||||
|
||||
// Session and Keyboard buttons.
|
||||
RowLayout {
|
||||
id: combobox
|
||||
z: 2
|
||||
parent: free
|
||||
height: 30
|
||||
spacing: 4
|
||||
anchors.margins: 4
|
||||
LayoutMirroring.enabled: isMirror
|
||||
SessionButton {
|
||||
id: sessionButton
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: 160
|
||||
Layout.fillHeight: false
|
||||
Layout.preferredHeight: 28
|
||||
Layout.rightMargin: 4
|
||||
visible: true
|
||||
}
|
||||
KeyboardButton {
|
||||
id: keyboardButton
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: 140
|
||||
Layout.fillHeight: false
|
||||
Layout.preferredHeight: 28
|
||||
Layout.rightMargin: 4
|
||||
visible: true
|
||||
}
|
||||
}
|
||||
|
||||
// SDDM actions buttons.
|
||||
RowLayout {
|
||||
id: actionButton
|
||||
parent: free
|
||||
anchors.margins: 0
|
||||
spacing: 32
|
||||
ActionButton {
|
||||
id: suspendButton
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: visible ? config["action.button/icon.size"] : 0
|
||||
Layout.margins: 2
|
||||
visible: root.conf("enable.button.suspend")
|
||||
enabled: visible ? sddm.canSuspend : false
|
||||
//enabled: true
|
||||
iconSource: "components/"+config["path/action.icon.suspend"]
|
||||
text: textConstants.suspend
|
||||
onClicked: sddm.suspend()
|
||||
}
|
||||
ActionButton {
|
||||
id: rebootButton
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: visible ? config["action.button/icon.size"] : 0
|
||||
Layout.margins: 2
|
||||
visible: root.conf("enable.button.reboot")
|
||||
enabled: visible ? sddm.canReboot : false
|
||||
//enabled: true
|
||||
text: textConstants.reboot
|
||||
iconSource: "components/"+config["path/action.icon.reboot"]
|
||||
onClicked: sddm.reboot()
|
||||
}
|
||||
ActionButton {
|
||||
id: shutdownButton
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: visible ? config["action.button/icon.size"] : 0
|
||||
Layout.margins: 2
|
||||
visible: root.conf("enable.button.shutdown")
|
||||
enabled: visible ? sddm.canPowerOff : false
|
||||
//enabled: true
|
||||
text: textConstants.shutdown
|
||||
iconSource: "components/"+config["path/action.icon.shutdown"]
|
||||
onClicked: sddm.powerOff()
|
||||
}
|
||||
ActionButton {
|
||||
id: switchButton
|
||||
Layout.fillWidth: false
|
||||
Layout.preferredWidth: visible ? config["action.button/icon.size"] : 0
|
||||
Layout.margins: 2
|
||||
visible: root.conf("enable.button.otheruser")
|
||||
enabled: visible
|
||||
iconSource: "components/"+config["path/action.icon.switchuser"]
|
||||
onClicked: login.newUser = login.newUser ? false : true
|
||||
|
||||
//i18nd : https://doc.qt.io/qt-5/qtquick-internationalization.html
|
||||
Component.onCompleted: {
|
||||
switch (Qt.locale().name.substring(0,2)) {
|
||||
case "en": switchButton.text = "Different User"; break;
|
||||
case "fr": switchButton.text = "Utilisateur différent"; break;
|
||||
case "es": switchButton.text = "Usuario diferente"; break;
|
||||
case "it": switchButton.text = "Utente diverso"; break;
|
||||
case "de": switchButton.text = "Anderer Benutzer"; break;
|
||||
default: switchButton.text = "Different User";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Button for switch in "full" view.
|
||||
ActionButton {
|
||||
id: fullsizeButton
|
||||
parent: free
|
||||
y: root.mousePosY
|
||||
anchors.left: parent.left
|
||||
LayoutMirroring.enabled: isMirror
|
||||
mirror: isMirror
|
||||
activeFocusOnTab : false
|
||||
visible: root.conf("enable.button.fullscreen.switch")
|
||||
opacity: isFull ? 0.1 : 0.1
|
||||
iconSize: 24
|
||||
iconSource: "components/"+config["path/action.icon.fullscreen"]
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
drag.target: parent; drag.axis: Drag.XAxis
|
||||
onMouseXChanged: if (drag.active) root.updateLayout(mouseX)
|
||||
onReleased: if (drag.active) root.mirrorLayout(mouseX)
|
||||
onClicked: taskbar.width = (isMini || isFull) ? halfSize : 0
|
||||
}
|
||||
}
|
||||
|
||||
// KDE Plasma stuff.
|
||||
Loader {
|
||||
id: battery
|
||||
parent: free
|
||||
anchors.margins: 4
|
||||
LayoutMirroring.enabled: isMirror
|
||||
source: "components/Battery.qml"
|
||||
}
|
||||
|
||||
// Virtual Keyboard (opt).
|
||||
Loader {
|
||||
id: virtualKeyboard
|
||||
z: 200
|
||||
parent: free
|
||||
active: primaryScreen
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: actionButton.height + 22
|
||||
width: 800
|
||||
state: "hidden"
|
||||
source: "components/VirtualKeyboard.qml"
|
||||
property bool keyboardActive: item ? item.active : false
|
||||
onKeyboardActiveChanged: state = keyboardActive ? "visible" : "hidden"
|
||||
function show() {
|
||||
state = "visible";
|
||||
Qt.inputMethod.show();
|
||||
virtualKeyboard.item.activated = true;
|
||||
}
|
||||
|
||||
function hide() {
|
||||
state = "hidden";
|
||||
Qt.inputMethod.hide();
|
||||
virtualKeyboard.item.activated = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Virtual Keyboard (opt).
|
||||
SwitchButton {
|
||||
id: virtualKeyboardButton
|
||||
z: 2
|
||||
parent: free
|
||||
anchors.margins: 4
|
||||
anchors.leftMargin: 8
|
||||
anchors.rightMargin: 8
|
||||
LayoutMirroring.enabled: isMirror
|
||||
text: qsTr("Virtual Keyboard")
|
||||
position: 0
|
||||
visible: virtualKeyboard.status == Loader.Ready
|
||||
onPositionChanged: position == 1 ? virtualKeyboard.show() : virtualKeyboard.hide()
|
||||
//onClicked: position === 1 ? virtualKeyboard.show() : virtualKeyboard.hide()
|
||||
}
|
||||
|
||||
|
||||
// ==============
|
||||
// Misc
|
||||
// ==============
|
||||
|
||||
// See : https://github.com/sddm/sddm/issues/202 (keyboard.layouts)
|
||||
Keys.onPressed: keyboardButton.displayText = keyboard.layouts[keyboard.currentLayout].longName;
|
||||
|
||||
Component.onCompleted: {
|
||||
getPosition(clock, root.conf("position.clock"));
|
||||
getPosition(combobox, root.conf("position.combobox"));
|
||||
getPosition(actionButton, root.conf("position.button.action"));
|
||||
getPosition(battery, root.conf("position.battery"));
|
||||
getPosition(virtualKeyboardButton, root.conf("position.button.virtual.keyboard"));
|
||||
// getPosition(fullsizeButton, root.conf("position.button.fullsize"));
|
||||
}
|
||||
|
||||
|
||||
function getPosition(id, pos) {
|
||||
var p = id.parent;
|
||||
var o = id.anchors;
|
||||
if (pos == "top") { id.anchors.top = p.top; id.anchors.horizontalCenter = p.horizontalCenter; return ""; }
|
||||
if (pos == "bottom") { id.anchors.bottom = p.bottom; id.anchors.horizontalCenter = p.horizontalCenter; return ""; }
|
||||
if (pos == "left") { id.anchors.left = p.left; id.anchors.verticalCenter = p.verticalCenter; return ""; }
|
||||
if (pos == "right") { id.anchors.right = p.right; id.anchors.verticalCenter = p.verticalCenter; return ""; }
|
||||
if (pos == "top-left") { id.anchors.top = p.top; id.anchors.left = p.left; return ""; }
|
||||
if (pos == "top-right") { id.anchors.top = p.top; id.anchors.right = p.right; return ""; }
|
||||
if (pos == "bottom-left") { id.anchors.bottom = p.bottom; id.anchors.left = p.left; return ""; }
|
||||
if (pos == "bottom-right") { id.anchors.bottom = p.bottom; id.anchors.right = p.right; return ""; }
|
||||
}
|
||||
|
||||
function conf(key) {
|
||||
var val = config[key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,217 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import "components"
|
||||
import "components/style" as Style
|
||||
|
||||
Style.Background {
|
||||
id: control
|
||||
|
||||
property alias menu: taskbar.data
|
||||
property alias free: freespace.data
|
||||
property alias taskbar: taskbar // Hook for Full-view button switch.
|
||||
|
||||
property string position: config['menu.default.position'] // left, right.
|
||||
property string defaultSize: config['menu.default.size'] // mini, icon, tiny, half.
|
||||
property real taskbarMaxSize: 600
|
||||
|
||||
property real miniSize // "max size" of each states.
|
||||
property real iconSize
|
||||
property real tinySize
|
||||
property real halfSize
|
||||
property real fullSize
|
||||
property string menuState: updateMenuState() // get the current menu state (mini, icon, tiny, half).
|
||||
|
||||
readonly property bool isMini: root.menuState == "mini"
|
||||
readonly property bool isIcon: root.menuState == "icon"
|
||||
readonly property bool isTiny: root.menuState == "tiny"
|
||||
readonly property bool isHalf: root.menuState == "half"
|
||||
readonly property bool isFull: root.menuState == "full"
|
||||
readonly property bool isRight: position == "right"
|
||||
readonly property bool isMirror: isRight ? true : false
|
||||
|
||||
readonly property real taskbarSize: taskbar.width
|
||||
readonly property real gripSize: config['menu/border.size']
|
||||
|
||||
property real mousePosY
|
||||
|
||||
Component.onCompleted: initSize()
|
||||
|
||||
Text {
|
||||
anchors.fill: parent; z: 999; color: "red"
|
||||
visible: false
|
||||
text: (
|
||||
" TaskbarSize : "+ taskbar.width +
|
||||
"\n ● state : "+menuState+
|
||||
"\n ● mini : "+miniSize+" - "+isMini+
|
||||
"\n ● icon : "+iconSize+" - "+isIcon+
|
||||
"\n ● tiny : "+tinySize+" - "+isTiny+
|
||||
"\n ● half : "+halfSize+" - "+isHalf+
|
||||
"\n ● full : "+fullSize+" - "+isFull+
|
||||
"\n - screensaver : "+screensaver.chrono+
|
||||
"\n - Mouse.Y : "+mousePosY)
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.fill: parent ; spacing: 0
|
||||
LayoutMirroring.enabled: control.isMirror
|
||||
|
||||
Item {
|
||||
id: taskbar
|
||||
width: getDefaultSize()
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Connections {
|
||||
target: login
|
||||
onUserSelected: if (isIcon) taskbar.width = tinySize
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: screensaver.chrono = 0
|
||||
//onPositionChanged: screensaver.chrono = 0
|
||||
onDoubleClicked: if (!isFull) taskbar.width = miniSize
|
||||
//onEntered:
|
||||
//onExited:
|
||||
//onReleased:
|
||||
onPositionChanged: {
|
||||
screensaver.chrono = 0;
|
||||
mousePosY = mouse.y;
|
||||
}
|
||||
}
|
||||
|
||||
Style.MenuBorder {
|
||||
id: border
|
||||
z: 100
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
LayoutMirroring.enabled: control.isMirror
|
||||
visible: !control.isFull
|
||||
|
||||
menuState: control.menuState // shared with skel.
|
||||
isPressed: borderArea.pressed // Share borderArea event with MenuBorderStyle.
|
||||
isMouse: borderArea.containsMouse // Share borderArea event with MenuBorderStyle.
|
||||
|
||||
MouseArea {
|
||||
id: borderArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
drag.target: parent; drag.axis: Drag.XAxis
|
||||
onMouseXChanged: if (drag.active) control.updateLayout(mouseX)
|
||||
onReleased: if (drag.active) control.mirrorLayout(mouseX)
|
||||
onEntered: if (isMini) taskbar.width = iconSize
|
||||
}
|
||||
}
|
||||
Style.MenuBackground { anchors.fill: parent; LayoutMirroring.enabled: control.isMirror }
|
||||
// <MENU STUFF GO HERE YEAAAH>
|
||||
}
|
||||
|
||||
Item {
|
||||
id: freespace
|
||||
width: control.width - taskbar.width
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
propagateComposedEvents: true
|
||||
onClicked: screensaver.chrono = 0
|
||||
//onPositionChanged: screensaver.chrono = 0
|
||||
onDoubleClicked: if (isMini) taskbar.width = iconSize
|
||||
onPositionChanged: {
|
||||
screensaver.chrono = 0;
|
||||
mousePosY = mouse.y;
|
||||
}
|
||||
}
|
||||
// <FREE STUFF GO HERE YEAAAH>
|
||||
}
|
||||
}
|
||||
|
||||
function updateMenuState() {
|
||||
// Update menuState property.
|
||||
var w = taskbar.width;
|
||||
if (w == fullSize) return "full";
|
||||
if (w >= fullSize && w < iconSize) return "mini";
|
||||
if (w == iconSize) return "icon";
|
||||
if (w >= iconSize && w < halfSize) return "tiny";
|
||||
return "half";
|
||||
}
|
||||
|
||||
function initSize() {
|
||||
var facesize = parseInt(config['userlist/icon.size']);
|
||||
var bordersize = parseInt(config['userlist/frame.spacing']);
|
||||
var textfield = parseInt(config["textfield/width"]);
|
||||
var nbrVisibleUser = 3; //userModel.count
|
||||
|
||||
// this is purely cosmetic and can be safe remove.
|
||||
var gripMargin = 36;
|
||||
|
||||
// Update property values.
|
||||
fullSize = 0;
|
||||
miniSize = gripSize;
|
||||
iconSize = facesize + (bordersize*2);
|
||||
tinySize = iconSize + textfield + login.miniloginSize;
|
||||
halfSize = iconSize * nbrVisibleUser;
|
||||
|
||||
// Adjust with gripSize & margins
|
||||
iconSize += gripSize;
|
||||
tinySize += gripMargin;
|
||||
|
||||
if (halfSize <= tinySize) { halfSize = tinySize + 1; }
|
||||
}
|
||||
|
||||
function getDefaultSize() {
|
||||
if (defaultSize == "mini") return miniSize;
|
||||
if (defaultSize == "icon") return iconSize;
|
||||
if (defaultSize == "tiny") return tinySize;
|
||||
if (defaultSize == "half") return halfSize;
|
||||
if (defaultSize == "halfmax") return taskbarMaxSize; // Alternative.
|
||||
if (defaultSize == "full") return 0;
|
||||
return iconSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateLayout(mousex) {
|
||||
var pos = taskbar.width;
|
||||
isRight
|
||||
? pos -= mousex
|
||||
: pos += mousex
|
||||
if (pos <= (miniSize + 20)) { pos = miniSize } else { if (pos < iconSize) pos = iconSize }
|
||||
if (pos > taskbarMaxSize) pos = taskbarMaxSize;
|
||||
taskbar.width = pos;
|
||||
if (pos > iconSize && pos < taskbarMaxSize && isRight) taskbar.x += mousex;
|
||||
}
|
||||
|
||||
function mirrorLayout(mousex) {
|
||||
var drop = width - taskbar.width;
|
||||
isRight
|
||||
? drop += mousex
|
||||
: drop -= mousex
|
||||
if (drop < 300) {
|
||||
position = isRight ? "left" : "right";
|
||||
if (drop < iconSize) drop = iconSize;
|
||||
if (drop > taskbarMaxSize) drop = taskbarMaxSize;
|
||||
taskbar.width = drop;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Controls 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Item {
|
||||
id: control
|
||||
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
||||
property alias text: label.text
|
||||
property alias iconSource: icon.source
|
||||
property alias mirror: icon.mirror
|
||||
property int iconSize: conf("icon.size")
|
||||
readonly property bool noLabel: text == ""
|
||||
|
||||
signal clicked
|
||||
activeFocusOnTab: true
|
||||
|
||||
implicitWidth: noLabel ? Math.max(iconSize) : Math.max(iconSize + label.contentWidth + label.anchors.leftMargin + label.anchors.rightMargin)
|
||||
implicitHeight: noLabel ? Math.max(iconSize) : Math.max(iconSize + label.implicitHeight + label.anchors.topMargin + label.anchors.bottomMargin)
|
||||
|
||||
Image {
|
||||
id: icon
|
||||
width: iconSize ; height: iconSize
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
opacity: (control.enabled ? mouseArea.containsMouse || control.focus
|
||||
? conf("opacity.hover") : conf("opacity.normal") : conf("opacity.disabled")
|
||||
)
|
||||
smooth: true
|
||||
mipmap: true
|
||||
antialiasing: true
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: control.clicked()
|
||||
onEntered: label.visible = conf("text.visible")
|
||||
onExited: label.visible = conf("text.visible") ? !conf("text.autohide") : false
|
||||
}
|
||||
// Shadow
|
||||
layer.enabled: !control.softwareRendering
|
||||
layer.effect: DropShadow {
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 1
|
||||
samples: 32
|
||||
radius: conf("shadow.radius")
|
||||
spread: conf("shadow.spread")
|
||||
color: conf("shadow.color")
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: label
|
||||
anchors.topMargin: 4
|
||||
anchors.top: icon.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignTop
|
||||
visible: conf("text.visible") ? !conf("text.autohide") : false
|
||||
color: (mouseArea.pressed
|
||||
? conf("text.color.press")
|
||||
: control.focus
|
||||
? mouseArea.containsMouse ? conf("text.color.hover") : conf("text.color.focus")
|
||||
: mouseArea.containsMouse ? conf("text.color.hover") : conf("text.color.normal")
|
||||
)
|
||||
font.pointSize: conf("text.size")
|
||||
font.italic: conf("text.italic")
|
||||
font.bold: conf("text.bold")
|
||||
wrapMode: Text.WordWrap
|
||||
opacity: (control.enabled ? mouseArea.containsMouse || control.focus
|
||||
? conf("opacity.hover") : conf("opacity.normal") : conf("opacity.disabled")
|
||||
)
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
}
|
||||
|
||||
Keys.onEnterPressed: clicked()
|
||||
Keys.onReturnPressed: clicked()
|
||||
Keys.onSpacePressed: clicked()
|
||||
|
||||
Accessible.onPressAction: clicked()
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: label.text
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "action.button" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2016 Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
import QtQuick 2.2
|
||||
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
import org.kde.plasma.workspace.components 2.0 as PW
|
||||
|
||||
Row {
|
||||
spacing: units.smallSpacing
|
||||
visible: pmSource.data["Battery"]["Has Cumulative"]
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: pmSource
|
||||
engine: "powermanagement"
|
||||
connectedSources: ["Battery", "AC Adapter"]
|
||||
}
|
||||
|
||||
PW.BatteryIcon {
|
||||
id: battery
|
||||
hasBattery: pmSource.data["Battery"]["Has Battery"] || false
|
||||
percent: pmSource.data["Battery"]["Percent"] || 0
|
||||
pluggedIn: pmSource.data["AC Adapter"] ? pmSource.data["AC Adapter"]["Plugged in"] : false
|
||||
|
||||
height: batteryLabel.height
|
||||
width: height
|
||||
}
|
||||
|
||||
PlasmaComponents.Label {
|
||||
id: batteryLabel
|
||||
height: undefined
|
||||
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","%1%", battery.percent)
|
||||
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Battery at %1%", battery.percent)
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Item {
|
||||
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
||||
|
||||
property date dateTime: new Date()
|
||||
width: (daynum.width + month.width) <= day.width ? day.width : (daynum.width + month.width)
|
||||
height: day.height + daynum.height
|
||||
anchors.topMargin: 12
|
||||
|
||||
//Rectangle {anchors.fill: parent; color: "red"; opacity: 0.1} //DEBUG
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 1000; running: true; repeat: true;
|
||||
onTriggered: clock.dateTime = new Date()
|
||||
}
|
||||
|
||||
Text {
|
||||
id: day
|
||||
text : Qt.formatDate(clock.dateTime, "dddd")
|
||||
color: conf("date.color")
|
||||
font.pointSize: 62
|
||||
font.letterSpacing: 12
|
||||
font.italic: conf("date.italic")
|
||||
font.bold: conf("date.bold")
|
||||
visible: conf("date.visible")
|
||||
font.capitalization: Font.AllUppercase
|
||||
Component.onCompleted: if (conf("date.font") != "") font.family = conf("date.font")
|
||||
}
|
||||
|
||||
Text {
|
||||
id: daynum
|
||||
anchors.top: day.bottom
|
||||
anchors.topMargin: -26
|
||||
text : Qt.formatDate(clock.dateTime, "dd")
|
||||
color: "#c5c2c4"
|
||||
font.pointSize: 82
|
||||
font.italic: conf("date.italic")
|
||||
font.bold: conf("date.bold")
|
||||
visible: conf("date.visible")
|
||||
font.capitalization: Font.AllUppercase
|
||||
Component.onCompleted: if (conf("date.font") != "") font.family = conf("date.font")
|
||||
}
|
||||
|
||||
Text {
|
||||
id: month
|
||||
anchors.top: day.bottom
|
||||
anchors.left: daynum.right
|
||||
anchors.topMargin: -14
|
||||
text : Qt.formatDate(clock.dateTime, " MMMM yyyy")
|
||||
color: "#c5c2c4"
|
||||
font.pointSize: conf("date.size")
|
||||
font.italic: conf("date.italic")
|
||||
font.bold: conf("date.bold")
|
||||
visible: conf("date.visible")
|
||||
font.capitalization: Font.AllUppercase
|
||||
Component.onCompleted: if (conf("date.font") != "") font.family = conf("date.font")
|
||||
}
|
||||
|
||||
Text {
|
||||
id: time
|
||||
anchors.top: month.bottom
|
||||
anchors.left: daynum.right
|
||||
anchors.topMargin: -10
|
||||
text : Qt.formatTime(clock.dateTime, conf("time.format"))
|
||||
color: conf("time.color")
|
||||
font.pointSize: conf("time.size")
|
||||
font.italic: conf("time.italic")
|
||||
font.bold: conf("time.bold")
|
||||
visible: conf("time.visible")
|
||||
Component.onCompleted: if (conf("time.font") != "") font.family = conf("time.font")
|
||||
}
|
||||
|
||||
|
||||
// Shadow
|
||||
layer.enabled: !softwareRendering
|
||||
layer.effect: DropShadow {
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 2
|
||||
radius: conf("shadow.radius")
|
||||
samples: 32
|
||||
spread: conf("shadow.spread")
|
||||
color: conf("shadow.color")
|
||||
}
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "clock" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,228 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Controls 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
ComboBox {
|
||||
id: control
|
||||
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
||||
hoverEnabled: true
|
||||
|
||||
implicitWidth: Math.max(background ? background.implicitWidth : 0,
|
||||
contentItem.implicitWidth + leftPadding + rightPadding) + indicator.implicitWidth + rightPadding
|
||||
|
||||
implicitHeight: Math.max(background ? background.implicitHeight : 0)
|
||||
|
||||
leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
|
||||
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
|
||||
|
||||
|
||||
// Combobox : Background.
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: conf("radius")
|
||||
border.width: (control.pressed
|
||||
? conf("border.size.press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf("border.size.hover") : conf("border.size.focus")
|
||||
: control.hovered ? conf("border.size.hover") : conf("border.size.normal")
|
||||
)
|
||||
border.color: (control.pressed
|
||||
? conf("border.color.press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf("border.color.hover") : conf("border.color.focus")
|
||||
: control.hovered ? conf("border.color.hover") : conf("border.color.normal")
|
||||
)
|
||||
color: (control.pressed
|
||||
? conf("background.color.press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf("background.color.hover") : conf("background.color.focus")
|
||||
: control.hovered ? conf("background.color.hover") : conf("background.color.normal")
|
||||
)
|
||||
|
||||
// Shadow
|
||||
layer.enabled: !softwareRendering
|
||||
layer.effect: DropShadow {
|
||||
transparentBorder: true
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 0
|
||||
samples: 32
|
||||
radius: conf("shadow.radius")
|
||||
spread: conf("shadow.spread")
|
||||
color: conf("shadow.color")
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
onWheel: {
|
||||
if (wheel.pixelDelta.y < 0 || wheel.angleDelta.y < 0) {
|
||||
control.currentIndex = Math.min(control.currentIndex + 1, delegateModel.count -1);
|
||||
} else {
|
||||
control.currentIndex = Math.max(control.currentIndex - 1, 0);
|
||||
}
|
||||
control.activated(control.currentIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Combobox : Text.
|
||||
contentItem: Text {
|
||||
id: textStyle
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
leftPadding: 12
|
||||
rightPadding: 0
|
||||
text: control.displayText
|
||||
color: (control.pressed
|
||||
? conf("text.color.press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf("text.color.hover") : conf("text.color.focus")
|
||||
: control.hovered ? conf("text.color.hover") : conf("text.color.normal")
|
||||
)
|
||||
font.pointSize: conf("text.size")
|
||||
font.italic: conf("text.italic")
|
||||
font.bold: conf("text.bold")
|
||||
elide: Text.ElideRight
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
}
|
||||
|
||||
|
||||
// Popup content : (text / background row).
|
||||
delegate: ItemDelegate {
|
||||
id: delegate
|
||||
width: control.popup.width
|
||||
height: 42
|
||||
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
|
||||
highlighted: control.highlightedIndex === index
|
||||
hoverEnabled: control.hoverEnabled
|
||||
|
||||
contentItem: Item {
|
||||
anchors.fill: parent
|
||||
Image {
|
||||
id: flag
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: visible ? 8 : 0
|
||||
source: visible ? conf_path("combobox.folder.flags") + "/%1.png".arg(modelData.shortName) : ""
|
||||
fillMode: Image.PreserveAspectFit
|
||||
height: visible ? conf_menu("flag.size") : 0
|
||||
visible: (Array.isArray(control.model) ? (modelData.shortName == "" || conf_menu("flag.visible") == false) ? false : true : false)
|
||||
}
|
||||
Text {
|
||||
anchors.left: flag.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
leftPadding: 6
|
||||
rightPadding: 18
|
||||
text: delegate.text
|
||||
color: (delegate.pressed
|
||||
? conf_menu("text.color.press")
|
||||
: delegate.focus
|
||||
? delegate.hovered ? conf_menu("text.color.hover") : conf_menu("text.color.focus")
|
||||
: delegate.hovered ? conf_menu("text.color.hover") : conf_menu("text.color.normal")
|
||||
)
|
||||
font.pointSize: conf_menu("text.size")
|
||||
font.italic: conf_menu("text.italic")
|
||||
font.weight: control.currentIndex === index ? Font.Bold : Font.Normal
|
||||
elide: Text.ElideRight
|
||||
Component.onCompleted: if (conf_menu("text.font") != "") font.family = conf_menu("text.font")
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: (delegate.pressed
|
||||
? conf("background.color.press")
|
||||
: delegate.focus
|
||||
? delegate.hovered ? conf_menu("background.color.hover") : conf_menu("background.color.focus")
|
||||
: delegate.hovered ? conf_menu("background.color.hover") : conf_menu("background.color.normal")
|
||||
)
|
||||
radius: conf_menu("radius")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
popup: Popup {
|
||||
id: popup
|
||||
y: control.height + 4
|
||||
width: control.width
|
||||
implicitHeight: Math.max(contentItem.implicitHeight + (padding * 2))
|
||||
padding: 3
|
||||
|
||||
contentItem: ListView {
|
||||
clip: true
|
||||
implicitHeight: contentHeight
|
||||
model: control.popup.visible ? control.delegateModel : null
|
||||
currentIndex: control.highlightedIndex
|
||||
ScrollIndicator.vertical: ScrollIndicator { }
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
border.color: conf_popup("border.color.normal")
|
||||
border.width: 1
|
||||
color: conf_popup("background.color.normal")
|
||||
radius: conf_popup("radius")
|
||||
|
||||
// Shadow
|
||||
layer.enabled: !softwareRendering
|
||||
layer.effect: DropShadow {
|
||||
transparentBorder: true
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 0
|
||||
samples: 32
|
||||
radius: conf_popup("shadow.radius")
|
||||
spread: conf_popup("shadow.spread")
|
||||
color: conf_popup("shadow.color")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
indicator: Image {
|
||||
x: control.mirrored ? control.padding : control.width - width - control.padding
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
source: conf_path("combobox.icon.arrow")
|
||||
opacity: enabled ? 1 : 0.3
|
||||
visible: conf("arrow.visible")
|
||||
}
|
||||
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "combobox" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
|
||||
function conf_popup(key) {
|
||||
return conf(key, "combobox.popup");
|
||||
}
|
||||
|
||||
function conf_menu(key) {
|
||||
return conf(key, "combobox.menu");
|
||||
}
|
||||
|
||||
function conf_path(key) {
|
||||
return config['path/' + key];
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
|
||||
ComboBoxMenu {
|
||||
visible: true
|
||||
textRole: "longName"
|
||||
model: keyboard.layouts
|
||||
|
||||
Component.onCompleted: {
|
||||
currentIndex = keyboard.currentLayout;
|
||||
displayText = keyboard.layouts[currentIndex].longName;
|
||||
}
|
||||
|
||||
onActivated: {
|
||||
keyboard.currentLayout = currentIndex;
|
||||
displayText = keyboard.layouts[currentIndex].longName;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
Button {
|
||||
id: control
|
||||
activeFocusOnTab : false
|
||||
padding: 6
|
||||
spacing: 6
|
||||
hoverEnabled: true
|
||||
|
||||
opacity: enabled ? 1 : 0.8
|
||||
|
||||
contentItem: Text {
|
||||
text: control.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: (control.down
|
||||
? conf("text.color.press") : control.hovered
|
||||
? conf("text.color.hover") : conf("text.color.normal")
|
||||
)
|
||||
font.pointSize: conf("text.size")
|
||||
font.italic: conf("text.italic")
|
||||
font.bold: conf("text.bold")
|
||||
elide: Text.ElideRight
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
implicitHeight: Math.max(conf("height") - (border.width * 2))
|
||||
color: (control.down
|
||||
? conf("background.color.press") : control.hovered
|
||||
? conf("background.color.hover") : conf("background.color.normal")
|
||||
)
|
||||
border.color: (control.down
|
||||
? conf("border.color.press") : control.hovered
|
||||
? conf("border.color.hover") : conf("border.color.normal")
|
||||
)
|
||||
border.width: (control.down
|
||||
? conf("border.size.press") : control.hovered
|
||||
? conf("border.size.hover") : conf("border.size.normal")
|
||||
)
|
||||
radius: conf("radius")
|
||||
}
|
||||
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "button" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
|
||||
Text {
|
||||
id: notification
|
||||
property string caps: keyboard.capsLock ? textConstants.capslockWarning : ""
|
||||
property string msg
|
||||
onCapsChanged: text = caps
|
||||
onMsgChanged: { if (msg) { text = msg; reset.start(); }; }
|
||||
Timer {
|
||||
id: reset ; interval: 3000
|
||||
onTriggered: { notification.text = notification.caps ; notification.msg = ""; }
|
||||
}
|
||||
|
||||
color: conf("text.color")
|
||||
font.pointSize: conf("text.size")
|
||||
font.italic: conf("text.italic")
|
||||
font.bold: conf("text.bold")
|
||||
wrapMode: Text.WordWrap
|
||||
opacity: text == "" ? 0 : 1
|
||||
Behavior on opacity { NumberAnimation { duration: 300 } }
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "alert.message" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import "style" as Style
|
||||
|
||||
|
||||
Style.Background {
|
||||
id: control
|
||||
property real timer: conf("timer.secondes")
|
||||
property real chrono: 0
|
||||
|
||||
readonly property bool isRunning: chrono >= timer
|
||||
readonly property bool neverVisible: config['enable.primary_screen_only'] == "true" && !primaryScreen
|
||||
|
||||
visible: neverVisible ? true : isRunning
|
||||
opacity: visible ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: neverVisible ? 0 : 1000 } }
|
||||
|
||||
|
||||
Clock {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: neverVisible ? false : control.conf("clock.visible")
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 1000; running: !neverVisible; repeat: !neverVisible;
|
||||
onTriggered: if (!isRunning) parent.chrono += 1
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
hoverEnabled: true
|
||||
focus: parent.visible ? true : false
|
||||
onPositionChanged: parent.chrono = 0
|
||||
Keys.onPressed: parent.chrono = 0
|
||||
}
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "screensaver" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
|
||||
ComboBoxMenu {
|
||||
visible: true
|
||||
textRole: "name"
|
||||
model: sessionModel
|
||||
|
||||
Component.onCompleted: {
|
||||
currentIndex = sessionModel.lastIndex;
|
||||
}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
Switch {
|
||||
id: control
|
||||
implicitWidth: Math.max(indicator.implicitWidth + leftPadding + rightPadding)
|
||||
implicitHeight: Math.max(indicator.implicitHeight + bottomPadding + topPadding)
|
||||
|
||||
padding: 6
|
||||
spacing: 6
|
||||
hoverEnabled: true
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: conf("width")
|
||||
implicitHeight: conf("height")
|
||||
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
radius: (height / 2)
|
||||
border.width: (control.pressed
|
||||
? conf("border.size.press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf("border.size.hover") : conf("border.size.focus")
|
||||
: control.hovered ? conf("border.size.hover") : conf("border.size.normal")
|
||||
)
|
||||
border.color: control.color("border.color")
|
||||
color: control.color("background.color")
|
||||
|
||||
Rectangle {
|
||||
x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
|
||||
y: (parent.height - height) / 2
|
||||
width: conf("indicator.size")
|
||||
height: width
|
||||
radius: width / 2
|
||||
color: control.color("indicator.color")
|
||||
border.width: (control.pressed
|
||||
? conf("indicator.border.size.press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf("indicator.border.size.hover") : conf("indicator.border.size.focus")
|
||||
: control.hovered ? conf("indicator.border.size.hover") : conf("indicator.border.size.normal")
|
||||
)
|
||||
border.color: control.color("indicator.border.color")
|
||||
Behavior on x {
|
||||
enabled: !control.down
|
||||
SmoothedAnimation { velocity: 200 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function color(item) {
|
||||
var state = control.checked ? ".on" : ".off";
|
||||
return (control.pressed
|
||||
? conf(item + state + ".press")
|
||||
: control.visualFocus
|
||||
? control.hovered ? conf(item + state + ".hover") : conf(item + state + ".focus")
|
||||
: control.hovered ? conf(item + state + ".hover") : conf(item + state + ".normal")
|
||||
);
|
||||
}
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "switch" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
TextField {
|
||||
id: control
|
||||
property bool clearButtonShown: true
|
||||
property bool revealPasswordButtonShown: false
|
||||
property real iconSize: conf("icon.size")
|
||||
|
||||
padding: 8
|
||||
topPadding: padding - 7
|
||||
bottomPadding: padding - 5
|
||||
rightPadding: Math.max(padding + row.implicitWidth + row.anchors.rightMargin)
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
|
||||
color: mouseArea.containsMouse ? conf("text.color.hover") : conf("text.color.normal")
|
||||
selectionColor: conf("text.color.select.bg")
|
||||
selectedTextColor: conf("text.color.select")
|
||||
|
||||
font.pointSize: conf("text.size")
|
||||
font.italic: conf("text.italic")
|
||||
font.bold: conf("text.bold")
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
|
||||
passwordMaskDelay: 500
|
||||
passwordCharacter: "\u25cf" //●
|
||||
|
||||
Row {
|
||||
id: row
|
||||
anchors.verticalCenter: control.verticalCenter
|
||||
anchors.right: control.right
|
||||
anchors.rightMargin: control.padding
|
||||
spacing: 4
|
||||
|
||||
Image {
|
||||
id: passwordButton
|
||||
height: control.iconSize
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: conf_path("textfield.icon.visible")
|
||||
sourceSize: Qt.size(control.iconSize, control.iconSize)
|
||||
opacity: (control.length > 0 && revealPasswordButtonShown && control.enabled) ? 1 : 0
|
||||
visible: opacity > 0
|
||||
asynchronous: true
|
||||
cache: true
|
||||
mipmap: true
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 500
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
control.echoMode = (control.echoMode == TextInput.Normal ? TextInput.Password : TextInput.Normal);
|
||||
control.forceActiveFocus();
|
||||
passwordButton.opacity = (control.echoMode == TextInput.Normal ? 0.8 : 1);
|
||||
passwordButton.source = (control.echoMode == TextInput.Normal ? conf_path("textfield.icon.hidden") : conf_path("textfield.icon.visible"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: clearButton
|
||||
height: control.iconSize
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: conf_path("textfield.icon.clear")
|
||||
sourceSize: Qt.size(control.iconSize, control.iconSize)
|
||||
opacity: (control.length > 0 && clearButtonShown && control.enabled) ? 1 : 0
|
||||
visible: opacity > 0
|
||||
asynchronous: true
|
||||
cache: true
|
||||
mipmap: true
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 1000
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
control.text = "";
|
||||
control.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
} // (row end)
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: Math.max(parent.width ? parent.width : (conf("width") - (border.width * 2)))
|
||||
implicitHeight: Math.max(conf("height") - (border.width * 2))
|
||||
border.width: (mouseArea.containsMouse
|
||||
? conf("border.size.hover") : control.activeFocus
|
||||
? conf("border.size.focus") : conf("border.size.normal")
|
||||
)
|
||||
border.color: (mouseArea.containsMouse
|
||||
? conf("border.color.hover") : control.activeFocus
|
||||
? conf("border.color.focus") : conf("border.color.normal")
|
||||
)
|
||||
color: (mouseArea.containsMouse
|
||||
? conf("background.color.hover") : control.activeFocus
|
||||
? conf("background.color.focus") : conf("background.color.normal")
|
||||
)
|
||||
radius: conf("radius")
|
||||
}
|
||||
|
||||
selectByMouse: true
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.IBeamCursor
|
||||
acceptedButtons: Qt.NoButton
|
||||
}
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "textfield" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
|
||||
function conf_path(key) {
|
||||
return config['path/' + key];
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2013 Nikita Mikhailov <nslqqq@gmail.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
* OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
QtObject {
|
||||
readonly property string capslockWarning: qsTr("Warning, Caps Lock is ON!")
|
||||
readonly property string layout: qsTr("Layout")
|
||||
readonly property string login: qsTr("Login")
|
||||
readonly property string loginFailed: qsTr("Login failed")
|
||||
readonly property string loginSucceeded: qsTr("Login succeeded")
|
||||
readonly property string password: qsTr("Password")
|
||||
readonly property string prompt: qsTr("Enter your username and password")
|
||||
readonly property string promptSelectUser: qsTr("Select your user and enter password")
|
||||
readonly property string promptUser: qsTr("Enter your username")
|
||||
readonly property string promptPassword: qsTr("Enter your password")
|
||||
readonly property string reboot: qsTr("Reboot")
|
||||
readonly property string session: qsTr("Session")
|
||||
readonly property string shutdown: qsTr("Shutdown")
|
||||
readonly property string suspend: qsTr("Suspend")
|
||||
readonly property string hibernate: qsTr("Hibernate")
|
||||
readonly property string userName: qsTr("User name")
|
||||
readonly property string welcomeText: qsTr("Welcome to %1")
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Item {
|
||||
id: user
|
||||
// QML shadows aren't supported with software rendering.
|
||||
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
||||
property bool isCurrent
|
||||
property string name
|
||||
property string userName
|
||||
property string avatarPath
|
||||
property string iconSource
|
||||
property real faceSize
|
||||
property real borderSize
|
||||
property string orientationUserlist // vertical, horizontal.
|
||||
property string orientationUsername // left, right.
|
||||
property bool constrainText
|
||||
property bool showUsername
|
||||
|
||||
// Hook for id: newUserAvatar (login.qml).
|
||||
property alias font: username.font
|
||||
property bool isDefaultUser: avatarPath == config["path/login.icon.default"]
|
||||
|
||||
implicitHeight: user.getImplicitHeight()
|
||||
implicitWidth: user.getImplicitWidth()
|
||||
|
||||
width: implicitWidth
|
||||
height: implicitHeight
|
||||
|
||||
opacity: isCurrent ? 1 : 0.6
|
||||
|
||||
//Signaux ENVOYES
|
||||
signal selectMe()
|
||||
signal move_next()
|
||||
signal move_prev()
|
||||
|
||||
//Behavior on opacity { OpacityAnimator { duration: 100 } }
|
||||
//Behavior on faceSize { NumberAnimation { duration: 100 } }
|
||||
|
||||
|
||||
GridLayout {
|
||||
id: grid
|
||||
anchors.fill: parent
|
||||
columns: user.orientationUserlist == "vertical" ? 999 : 1
|
||||
layoutDirection: user.orientationUsername == "left" ? Qt.RightToLeft : Qt.LeftToRight
|
||||
columnSpacing: 5 // = vertical spacing.
|
||||
rowSpacing: 0
|
||||
|
||||
Item {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.fillWidth: false
|
||||
Layout.fillHeight: false
|
||||
Layout.preferredWidth: faceSize
|
||||
Layout.preferredHeight: faceSize
|
||||
Image {
|
||||
id: avatar
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: user.avatarPath
|
||||
sourceSize: Qt.size(faceSize, faceSize)
|
||||
visible: true
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
Component.onCompleted: avatar.status != Image.Error && avatar.status != Image.Null || (avatar.source = user.iconSource)
|
||||
layer.enabled: isDefaultUser ? conf("icon.round.defaultface") : conf("icon.round")
|
||||
layer.effect: OpacityMask {
|
||||
source: avatar
|
||||
maskSource: roundMask
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: roundMask
|
||||
width: faceSize
|
||||
height: faceSize
|
||||
radius: faceSize / 2
|
||||
visible: false
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: username
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: user.isCurrent ? user.name : ""
|
||||
color: user.isCurrent ? conf("text.color.focus") : conf("text.color.normal")
|
||||
font.pointSize: user.isCurrent ? conf("text.size.focus") : conf("text.size.normal")
|
||||
font.bold: user.isCurrent ? conf("text.bold.focus") : conf("text.bold.normal")
|
||||
font.italic: conf("text.italic")
|
||||
font.capitalization: Font.Capitalize
|
||||
visible: showUsername && constrainText
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
}
|
||||
}
|
||||
|
||||
// Shadow
|
||||
layer.enabled: !softwareRendering
|
||||
layer.effect: DropShadow {
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 2
|
||||
samples: 32
|
||||
radius: conf("shadow.radius")
|
||||
spread: conf("shadow.spread")
|
||||
color: conf("shadow.color")
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: user.selectMe()
|
||||
onWheel: {
|
||||
wheel.accepted = true;
|
||||
if (wheel.angleDelta.y > 0) user.move_next();
|
||||
if (wheel.angleDelta.y < 0) user.move_prev();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Accessible.name: name
|
||||
Accessible.role: Accessible.Button
|
||||
function accessiblePressAction() { user.selectMe() }
|
||||
|
||||
|
||||
function getImplicitWidth() {
|
||||
var count = faceSize + (borderSize*2);
|
||||
if (username.visible && orientationUserlist == "vertical") {
|
||||
count += (grid.columnSpacing + username.implicitWidth);
|
||||
}
|
||||
return Math.round(count);
|
||||
}
|
||||
|
||||
function getImplicitHeight() {
|
||||
var count = faceSize + (borderSize*2);
|
||||
if (username.visible && orientationUserlist == "horizontal") count += (grid.rowSpacing + username.implicitHeight);
|
||||
return Math.round(count);
|
||||
}
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "userlist" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
|
||||
ListView {
|
||||
id: view
|
||||
readonly property string selectedUserLogin: currentItem ? currentItem.userName : ""
|
||||
readonly property string selectedUserName: currentItem ? currentItem.name : ""
|
||||
|
||||
property string orientationUsername // left, right.
|
||||
property string orientationUserlist // horizontal, vertical.
|
||||
property bool showUsername
|
||||
|
||||
property real faceSize: conf("icon.size")
|
||||
property real borderSize: conf("frame.spacing")
|
||||
readonly property real userSize: (faceSize + (borderSize*2))
|
||||
|
||||
orientation: view.orientationUserlist == "horizontal" ? ListView.Horizontal : ListView.Vertical
|
||||
highlightRangeMode: ListView.StrictlyEnforceRange
|
||||
activeFocusOnTab : false
|
||||
|
||||
model: userModel
|
||||
currentIndex: userModel.lastIndex
|
||||
//highlightFollowsCurrentItem: count == 2 // Visual PATCH 2 users.
|
||||
|
||||
signal userSelected()
|
||||
|
||||
|
||||
// Extend scrollzone.
|
||||
Rectangle {
|
||||
anchors.fill: parent; z: -999
|
||||
opacity: 0
|
||||
color: "red"
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.NoButton
|
||||
onWheel: {
|
||||
wheel.accepted = true;
|
||||
if (wheel.angleDelta.y > 0) view.incrementCurrentIndex();
|
||||
if (wheel.angleDelta.y < 0) view.decrementCurrentIndex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delegate: User {
|
||||
userName: model.name
|
||||
name: (model.realName === "") ? model.name : model.realName
|
||||
avatarPath: model.icon || ""
|
||||
iconSource: model.iconName || config['path/login.icon.default']
|
||||
|
||||
faceSize: ListView.view.faceSize
|
||||
borderSize: ListView.view.borderSize
|
||||
|
||||
orientationUserlist: ListView.view.orientationUserlist
|
||||
orientationUsername: ListView.view.orientationUsername
|
||||
|
||||
// If we only one user.
|
||||
//constrainText: ListView.view.count > 1
|
||||
constrainText: true
|
||||
showUsername: ListView.view.showUsername
|
||||
|
||||
isCurrent: ListView.isCurrentItem
|
||||
|
||||
onMove_next: ListView.view.incrementCurrentIndex()
|
||||
onMove_prev: ListView.view.decrementCurrentIndex()
|
||||
|
||||
onSelectMe: {
|
||||
ListView.view.currentIndex = index;
|
||||
ListView.view.userSelected();
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (orientationUserlist == "vertical" && showUsername == true) {
|
||||
if (orientationUsername == "right") anchors.left = parent.left;
|
||||
if (orientationUsername == "left") anchors.right = parent.right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Keys Naviguation.
|
||||
Keys.onEscapePressed: view.userSelected()
|
||||
Keys.onEnterPressed: view.userSelected()
|
||||
Keys.onReturnPressed: view.userSelected()
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
implicitWidth = getImplicitWidth(orientationUserlist);
|
||||
implicitHeight = getImplicitHeight(orientationUserlist);
|
||||
updateHighlight();
|
||||
}
|
||||
|
||||
onOrientationUserlistChanged: {
|
||||
implicitWidth = getImplicitWidth(orientationUserlist);
|
||||
implicitHeight = getImplicitHeight(orientationUserlist);
|
||||
updateHighlight();
|
||||
}
|
||||
|
||||
// Hack recquire for recenter item on view change.
|
||||
// https://doc.qt.io/qt-5/qml-qtquick-listview.html
|
||||
onXChanged: {
|
||||
//currentIndex = userModel.lastIndex;
|
||||
if (count > 1) positionViewAtIndex(currentIndex, ListView.SnapPosition);
|
||||
//if (count > 2) positionViewAtIndex(currentIndex, ListView.SnapPosition); // Visual PATCH 2 users.
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getImplicitWidth(orientation) {
|
||||
if (orientation == "horizontal") {
|
||||
//var nbrVisibleUser = 3; //count;
|
||||
var nbrVisibleUser = count == 1 ? 1 : 3; //count;
|
||||
return userSize * nbrVisibleUser;
|
||||
} else {
|
||||
return userSize;
|
||||
}
|
||||
}
|
||||
|
||||
function getImplicitHeight(orientation) {
|
||||
if (orientation == "horizontal") {
|
||||
return userSize + (conf("text.size.focus") * 1.72);
|
||||
} else {
|
||||
//var nbrVisibleUser = 3; //count;
|
||||
var nbrVisibleUser = count == 1 ? 1 : 3; //count;
|
||||
return userSize * nbrVisibleUser;
|
||||
}
|
||||
}
|
||||
|
||||
function updateHighlight() {
|
||||
|
||||
// Visual PATCH 2 users.
|
||||
// if (count == 2) {
|
||||
// preferredHighlightBegin = 0;
|
||||
// preferredHighlightEnd = (orientationUserlist == "horizontal") ? width : height;
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
var hSize = (faceSize / 2) + borderSize;
|
||||
if (orientationUserlist == "horizontal") {
|
||||
preferredHighlightBegin = (width / 2) - hSize;
|
||||
} else {
|
||||
preferredHighlightBegin = (height / 2) - hSize;
|
||||
}
|
||||
preferredHighlightEnd = preferredHighlightBegin + hSize;
|
||||
}
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "userlist" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.8
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
Text {
|
||||
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
||||
|
||||
color: conf("text.color")
|
||||
font.pointSize: conf("text.size")
|
||||
font.italic: conf("text.italic")
|
||||
font.bold: conf("text.bold")
|
||||
font.capitalization: Font.Capitalize
|
||||
visible: text === "" ? false : true
|
||||
opacity: visible ? 1 : 0
|
||||
Component.onCompleted: if (conf("text.font") != "") font.family = conf("text.font")
|
||||
|
||||
// Shadow
|
||||
layer.enabled: !softwareRendering
|
||||
layer.effect: DropShadow {
|
||||
horizontalOffset: 0
|
||||
verticalOffset: 0
|
||||
samples: 32
|
||||
radius: conf("shadow.radius")
|
||||
spread: conf("shadow.spread")
|
||||
color: conf("shadow.color")
|
||||
}
|
||||
|
||||
|
||||
// Conf
|
||||
function conf(key, section) {
|
||||
var sec = (section === undefined ? "label.username" : section);
|
||||
var val = config[sec + "/" + key];
|
||||
if (val === "true") {return true;}
|
||||
if (val === "false") {return false;}
|
||||
return val;
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright 2019 Romain V. <contact@rokin.in> - <https://github.com/Rokin05>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this program; if not, see <https://www.gnu.org/licenses>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.VirtualKeyboard 2.1
|
||||
|
||||
InputPanel {
|
||||
id: inputPanel
|
||||
property bool activated: false
|
||||
active: activated && Qt.inputMethod.visible
|
||||
visible: active
|
||||
width: parent.width
|
||||
|
||||
Item {
|
||||
id: gripTop
|
||||
z: 1000
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 6
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.target: inputPanel; drag.axis: Drag.XAndYAxis
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: gripLeft
|
||||
z: 1000
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
width: 36
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.target: inputPanel; drag.axis: Drag.XAndYAxis
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: gripRight
|
||||
z: 1000
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
width: 36
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.target: inputPanel; drag.axis: Drag.XAndYAxis
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: gripBottom
|
||||
z: 1000
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: 26
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
drag.target: inputPanel; drag.axis: Drag.XAndYAxis
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 410 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 491 B |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 175 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 219 B |
After Width: | Height: | Size: 677 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 797 B |
After Width: | Height: | Size: 885 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 247 B |
After Width: | Height: | Size: 1009 B |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 457 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 253 B |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 993 B |
After Width: | Height: | Size: 221 B |
After Width: | Height: | Size: 2.4 KiB |